Getting Your Team Ready for Microservices — Part 1
Once you're on board with the benefits microservices offers, help your team understand and choose this software architecture with these tips.
Join the DZone community and get the full member experience.Join For Free
it is a known fact that customers have high expectations from businesses, and they expect the businesses to accommodate their high demands while remaining flexible. businesses need to be very competitive to accommodate these requests — not just that, but they must be the first-to-market to get that unique advantage! we need software organizations to be agile, user-friendly, innovative, competitive, listen closely to respond quickly, able to conceptualize different solutions and deliver them to meet the reality and drive value and results for the businesses. basically, customers want businesses to be on steroids! this is no longer a wish for businesses, but a necessity.
being in software development organizations for over a decade, i understand that not everything can be done at once or there is no magic pill. but, we must take an incremental approach in embedding this competitive steadfastness in the design/development teams. once we know that we are building the right thing that the customer needs, an agile and devops framework offers a lot that can be done process wise and to instill a mindset of continuous delivery. another aspect of software development which doesn't get as much focus is the architecture of the product. we cannot deliver value frequently to delight the customers unless the underlying architecture enables us to do so.
once "you" are convinced that a new architecture, in this case, microservices-driven architecture, addresses most of the concerns posed by the current architecture, the most important stakeholders who need to buy into this decision for using or changing the architecture are the design/development teams. on average, teams make a better decision than any individual or executive because the teams think as a collective wearing many hats. their diverse skills and perspectives make them very effective at making decisions. based on this discussion with your team, you might consider moving on to the new microservices architecture, or, be prepared, for you may revisit your decisions.
how would you get a team buy-in to change and adapt to the new microservices-driven architecture?
- expose the problems with the current architecture your teams are facing.
- educate them on the advantages that microservices architecture can bring.
- do not forget to go through the trade-offs you would have to make with microservices architecture.
- most importantly, let them make the decision!
in this article, i would like to go through the problems associated with developing applications using monolithic architecture.
first, go through some of the basic assumptions. we had strict compliance eith technologies/3pps that can be used, so that helped a bit. some of the other assumptions include that the framework that was decided was jee and the database choices made, so that must be adhered to by every application.above is a simple layered monolithic architecture.
the products that my teams were working on was built on a monolithic architecture. though it was built as a strictly layered architecture as depicted above in the figure, the interaction between the layers was not always smooth.
1. code duplication
though we started off as a nice, small product with the best spirit of software craftsmanship, the architecture let us down because, as the product started gaining momentum, there was more demand for more features and, obviously, the executive management decided to add more design teams to roll out the features. this led to overlapping requirements and duplication, which led to teams stepping on other components boundaries. at times, we could see the same feature developed by two different teams that essentially did the same thing, but invoked different apis. this was more evident when the teams needed access to the same service for their features, for instance: when teams wanted a query to fetch something from the database and the database layer didn't provide a common api yet, this led to teams developing this local api themselves.
such invocations made it difficult for the database team to optimize the queries or work on providing common apis for other features because there would almost always be a huge inflow of support tickets/defects/query improvement requests on the team.
with more teams and more features came a variety of defects that had to be handled by the existing teams. often, ownership of the code led to a lot of resistance from the teams: to own the defect and fix the issue, let alone implementing certain preventive measures. this led to our defect backlog slowly started to increase. we couldn't meet the sla (service level agreement) for the defects, which made the customers unhappy. so, we had to lower the number of features delivered to enable the teams to work on the defects. which further made the customers unhappy. the team's metrics took a hit, because of the defects. to enable teams to debug, more logging was added which consumed space, which meant that we could hold the logs only for a small time before it was cleaned up. so, the teams had issues trying to understand the underlying problem and diagnose. most of the defects started to get closed for not being able to reproduce. we were just waiting for the problem to reoccur again before we could do anything else.
because of more context switching between the different defects, and between the defects and the mr. the defects were overwhelming, and this eventually led to the delay in the project release.
the continuous integration/continuous delivery loops posed a problem primarily because it was not envisaged to be a machinery for the magnum of the product that it grew to become. so as the number of build jobs increased, the hardware gave up and the load balancing became a regular problem. and most of the jobs failed because the dependencies were not grouped together, or the jobs were not triggered in the right order. since the entire application was packaged as one unit, the built times started to increase. so, by the time design teams got feedback, it was too late to debug. a massive amount of time was spent on troubleshooting why the build failed, and most of the times, it turned out the problem was the dependency on another application which had introduced a backward incompatible 3pp or an api. the governance of the features lined up for the build took a lot of time.
4. non-functional requirements
the product my teams developed were deployed on jboss containers and the product itself was built on jee architecture. as the size of the product grew, there were persistent issues with robustness, scalability, stability, and the availability of the product. we could no longer just accept the default tunings that we could have leveraged from jboss, but each application had to do tuning and profiling. and when they looked independently at their feature, they would overutilize memory, for instance, depriving other applications on the same instance of memory and the application failed with an out-of-memory exception. each time there was delivery, the product became more susceptible to failure in the non-functional aspects.
5. development and test environments
the development environments could no longer keep with the product growth, and it became a limitation for the development in terms of availability and stability. every step towards scalability meant a few steps back in terms of development and testing. there was no way the development environment could accommodate running the entire product to enable development. so that meant the designers had to rely on a centralized hardware for testing and ensuring their code didn't have a negative consequence on the system. this meant more lead time. the user story cycle time and the sla of the defects extended from days to weeks as the dependency on external hardware resources increased. that implied that the resources had to be contained in the team to help them be autonomous. the lack of having a good development environment led to poor quality design code and tests. because in most cases, the unit tests had a lot of mocking and this led to an increased time in test loops and a lot of manual testing efforts. sometimes the integration tests became complex too to accommodate huge dependencies.
6. adopting new technologies
with monolithic architecture, we always had to rethink when upgrading the 3pp or the platform to a newer and a better version. though the upgrade meant that most of our problems would go away or at least be reduced, the cost involved in migrating or upgrading was huge. this would take sprints/months together to just to a small upgrade of the jdk. the major upgrades of the databases or the linux platform were unthinkable. this was a disappointment to the designers because though they solution at hand and was well tested in the software industry they couldn't do anything about it. everything had to be done right the first time, there was no scope or very limited scope to do it again the second time.
7. communication & coordination
as the number of design teams increases, the number of communication channels increase.
the total number of communication channels is calculated by n (n - 1) /2, where n represents the number of stakeholders, in this case, team members or teams. for example, for a team of size 8, the number of potential communication channels is 8 (8 - 1) /2 = 28.
this tells us the importance of maintaining a consistent and a uniform communication across all the stakeholders/ teams. this becomes increasingly difficult when the product is developed across geographically distributed teams. to enable this and early prevention of duplication, a lot of meetings must be embedded in the process of development, the likes of technical coordination meetings, product owner coordination meetings, dependency coordination meetings, scrums, a scrum of scrums, executive summary meetings etc. so, the productive time for development or doing actual work does get shorter.
a lot of effort should be spent in getting communication correct and consistent over the geographical and cultural borders. a better way of working need to be formalized and established for all teams to follow to ensure a common way of working.
well, the monolithic architecture so far exposed:
- the problem of duplication of code
- core component teams becoming the bottleneck
- lack of communication: of course, the new addition of teams warranted a need for a different structure to handle communication, manage projects. having a new structure in place is a partial fix. the underlying problem had to be addressed
- increased frustration in the team.
- backward incompatibility between apis and the 3pps
- failure to keep up with the non-functional requirements.
- inability to adopt new and better technologies
this had further knock-on effects like:
- delay in delivery
- lack of customer satisfaction
- more micro-management trying to help- but doing otherwise
- lack of pride in the product which was demonstrated by the lack of ownership and leadership
- blame culture
- not enough sharing of knowledge
- waiting on last-minute fixes
- lack of quality
- delay in the release
- governance/gatekeeping of the applications/features
- the complex way of working
basically, it was a downward spiral. we gave rise to a new problem every time we wanted to solve an existing problem.
so, if any of the above points seem familiar in your development experience or in your teams, the major issue the underlying architecture.
i don't imply to say that these problems will not arise if we are to embrace microservices-driven architecture, but the extent of the problem is on a smaller scale as compared to a growing monolithic product. the aspects like bringing in a uniform way-of-working, governance should still be tackled irrespective of the architecture, but not at the level to which you would have to if on a monolithic. to clearly understand and make an informed evaluated decision, we need to know the advantages or the pros of developing applications using microservices architecture and the disadvantages associated with that.
Published at DZone with permission of Sowmya Halappa, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.