In a development environment like scrum, XP the branching strategy can significantly impact the overall speed of delivery of the product. There has been detailed documentation on the various branching strategies, and you can encounter TBD (Trunk based development), feature branching. In this article, am covering the various factors that can impact the success or failure of a these branching strategy.
What is feature branching:
In this method, there is a code branch created for each and every feature. In agile based environments, typically, a branch is created for every story in the sprint.
What is Trunk based Development (TBD): When a single trunk/branch is used to create all the features of the product, then its called Trunk based development. Often a release branch is created when ever there is a release that is pushed to production.
Following are the various factors to look at before selecting Trunk based vs feature branching.
location of team members: when team members are co-located, the trunk is the best bet, helps us to get faster feedback. Also team can just talk about the code changes directly. Since the feedback will be faster in a single trunk, the team need to sync up more frequently. Co-location enables this sync trunk changes to happen frequently and faster. When there is a distributed environment (often in our teams), feature branching works best.
speed development environment: In a high speed dev environment, the trunk just shines as there are less and less process overhead, like branching, Pull request, review etc. Feature branching shines well when there is less speed in churning code.
size of code base: Insanely higher number of code lines can be better handled using feature branching. But for smaller code base, the cost of creating branches etc can be higher.
In our team meetings, we often talk about the right tools for the problem at hand. And using the right branching strategy is an important decision. We often question ourselves if the strategy is right for the given epic/sprint. If the answer is NO for few sprints, we know, we need to change something!
How many times have you encountered a situation where the software built on one platform doesn’t work on another platform? It is a very expensive affair to ensure that your software works on all the platforms (Mobile, Tablets, PC and so on). This is one of the crucial problems which Docker helps you to resolve but this is not it. There is much more to Docker which we will explore as we move in my upcoming blogs.
Docker is a container management service or a tool which is designed to help developers to deploy and run applications by using containers. It ensures that the code will behave the same regardless of environment/platform.
Key components of a Docker
Docker File – A dockerfile is a text document that contains series of all the commands a user a make use of to create a Docker Image. The Docker images are automatically built by reading the instructions from a dockerfile.
Docker Image – It’s a lightweight snapshot of a virtual machine. It is essentially an application with all its requirements and dependencies (read-only copy of OS libraries, application libraries etc.). When you run a Docker image, you get a Docker container. Once a Docker image is created, it guarantees to run on any Docker platform. These can be retrieved to create a container in any environment.
Docker Registry – A Docker image can also be stored at online repository called Docker hub. You can also store your image in this cloud repository (https://hub.docker.com/). You can also save these images to your version control system.
Docker Container – A Docker container is nothing but a Runtime instances of Docker images.
Benefits of a Docker
Build your application once and use it in multiple environments without the need of building or configuring once again. The application built on dev environment guaranteed to work in prod environment.
Centralized Docker repository makes it very easy to store and retrieve. Moreover, you don’t need to build the image from scratch. You can always leverage existing image and go from there. The sharing of an image becomes very simple as well.
Version Control – You can always create next image and version control them.
Isolation – Every application works inside its own container and never interfere with other containers. If you no longer need an application, you can delete its container. Every container has it’s own resources hence there is going to be no challenge.
Security – The isolation ensures that the applications that are running on containers are completely segregated. The container cannot look into or have a provision to control processes running on other containers. This greatly enhances security.
Multi-cloud platforms/Portability – The image built on Amazon EC2 would very well be ported to Microsoft Azure.
Productivity – This is an implicit benefit of using Docker. The speed of development is much faster as the main focus is writing code and business over worrying extensively about deployment/testing.