AWS re:Invent 2020: Application modernization
![AWS re:Invent 2020: Application modernization AWS re:Invent 2020: Application modernization](/pic/aws_re_invent_2020_application_modernization/Q2RFRGhXZG11dFE_.jpeg)
welcome to application modernization i am brian landerman and i'm on the aws enterprise strategy team and we're a group of former cios and ctos that all led large-scale migrations of our company's infrastructure to aws while tackling the people process and cultural changes necessary to really drive business agility i talked to customers hundreds of customers over the last couple years and what i found is that we're all facing similar challenges where we're trying to drive business agility or respond to digital disruption but we have this legacy technology a state that's largely holding us back but we hear modern applications we tend to discuss serverless uh technologies like aws lambda or aws fargate and that can feel very far away when you have this old outdated legacy technology so today i want to talk about some patterns and techniques that will help you modernize that technology to really capture that business agility you're after we know this is important because uh if you look at this data from gartner almost 50 of ceos said they're being challenged by their board of directors to make progress in digital business well two out of three business leaders believe that they must pick up pick up the pace of digitalization to remain competitive so my team talks to customers and and we often present on this idea of becoming a high frequency enterprise and we talk about these seven patterns we've identified that that low frequency enterprises tend to follow and seven patterns that they're really looking to adopt to embrace that high frequency environment those those patterns fall into three categories it's really about deciding what to work on how you organize that work and then really the the delivery of the work itself and what we see is that enterprises tend to focus on these four areas to emerge from that low frequency environment and it's really about breaking up the work investing in your workforce automating your bureaucracy and building it in don't bolt it on now when i talk about application modernization i tend to focus on two areas however given the time we have today i'm going to dive deep into break up the work now as you see it says monolith to microservices but it's not just about creating smaller components it's also the people side of things and so we'll start there with building smaller teams that own products and services and organize around customer outcomes it's really important to tackle both pieces because small components without small teams really just increases your complexity so when we're talking about our people i think it's important to look at the history of our organization of our leadership of the types of employees we've hired and what we've asked them to deliver you know if you look back at autocratic leadership where we're organized around activities and our employees are order takers delivering tasks we certainly moved away from that in embracing more project oriented delivery and being more democratic in our leadership and and built our organization around functions and i t that's everything from qa to operations or development or security and our employees are largely participants working together kind of emerging out of these these functional areas to deliver a project together but then returning to that that functional area or shifting to another project but modern application development and modern organizations have really embraced this new way of working this team-based organization where leadership is now focused on serving those teams on removing blockers and ensuring that the the teams have an environment where they can be successful where they can optimize their work because we've moved away from telling our employees what to do and instead we're hiring problem solvers and we're bringing problems to them we're providing them with all the context that they need to solve that problem so they can deeply understand that customer problem so they can work to deliver outcomes that that the customer cares about that your business cares about so it's a very different way of working and requires very different leadership paired with that though we also need to to break down this segregated set of outcomes where it is typically focused on operational excellence on cost optimization or security and compliance while the business is you know really focused on driving speed and agility agility value and results new ideas and innovation our customers care about all of these things and it's important that we put all of these things on the table and prioritize the right efforts and ensure that from a customer perspective we're focused on the right things and and moving them forward in an appropriate manner after all our customers fuel our products and services so we should within product delivery really be focused on that customer experience after all that customer experience drives usage the more our products get used the more feedback we get we can get the data about which areas of our our product or service that they're they're using most or where it's falling short or you know perhaps where the next set of improvements should should go and those improvements lead to improve customer experience which leads to the growth of our products and services of our business which then allows us to create new experiments new products new customer experience and round and round we go in this flywheel it's really important to have both that focus on the customer as well as the opportunity and the space to gather that data and respond to that that feedback that you're getting so with that in mind at cox automotive so i was the cto there prior to joining aws in february of last year we had this challenge where we wanted to accomplish those things we had grown through over 40 acquisitions we had everything from ibm rpg on the i-series oracle exadata ibm data power oracle coherence java.net and python i had 2500 in my group across 15 primary locations and each one of those locations was roughly one to one with an acquisition so they each had a diverse set of culture and technologies and techniques and it made it very difficult to deliver on what our customers wanted which was an integrated set of products following these acquisitions our customers said hey look you have autotrader.com kbb.com you have uh dealer.com with a platform powering 60 of dealership websites in the us and then you built a crm and an erp in a service management solution that sits in our dealership and improves our operations along with other solutions but you are really in a position to improve consumer car buying to increase transparency and trust and also make it much easier once you've made your uh you know narrowed your purchase decision or made the decision to come in store and make it really easy to complete that that transaction and and to return to the dealer and and have all of that be very efficient for the dealership we were in a position to improve upon that and so our customers desperately needed to connect those solutions so we took scale digital framework off the shelf and largely did scrum so we had um these small teams that we created and you know what amazon would call two pizza teams and you can argue whether or not that's appropriate if the idea is that you they're small enough to be fed by two pizzas they're roughly five to ten people in size maybe two and a half or three pizza team i don't know but um we had about 350 scrum teams that we brought online across the entire enterprise and we use scaled agile framework to really create a structure on top of these teams that allowed us to create connectivity in our priorities and a common cadence because we chose to have each scrum team start their sprint on the same day and end their sprint on the same day we did program increment planning everyone planned at the same time started on the same day ended on the same day so when we're working to say hey i need this you know team a could you complete your work on this new api on sprint two because i plan to adopt it in sprint four and that would allow us to collaborate in sprint three we could do that sort of thing because we were planning at the same time because our sprints started and ended at the same time so we use scale digital framework to create that common cadence where previously we had different ways of delivering different different cadences and really different practices and so we use the framework also to create a level playing field we thought it was really important that we take that customer perspective and we bring it into how we operate you know devsecops talks a lot about tooling and technology and behaviors and and there's a lot in the mix but one of the things that i really like about it is it's also about breaking down the silos and unifying our customers concerns so yes they care about feature development yes they care about security and operations and reliability and performance all of those things matter to our customers so why are we why have we internally segmented those things and have different groups caring about different aspects of it with no one really caring about the entire picture so we said look we have lines of business we have each line of business has a precedent each line of business had multiple business units those business units had gms so we chose to align scout digital framework to that existing structure because that's how our pnls were aligned as well but we took product engineering and architecture and we created leaders that aligned to those business partners but could surface which was a new muscle for us but they work to surface those architectural concerns architectural runway or performance and reliability or from an engineering perspective hey look if we worked on these improvements we could deliver value much more quickly so we wanted to create that level playing field so that well while ultimately our business leader had the final say in prioritization we needed to provide them with all the things that matter to our customers so that when we made those prioritization decisions they were kind of eyes wide open and the best set of decisions that we could make given all of the information so that was really important for us but then to to ensure that we are all aligned and accountable to deliver on those priorities we changed our organizational structure and for me this is really important we talk a lot in the industry the technology industry about this idea of the frozen middle where you set to transform your your broader organization but middle management or um you know middle areas of the organization really aren't incentivized to make the change or don't understand what it means for them so it's important for us to create this connectivity where essentially your manager cared about the things that you were delivering because they had agreed with their business partner that their teams were going to deliver these things and and so on down the line so for us you take the media portfolio there was dealer.com was a business unit and a solution train there was an svp of engineering for media there was a vp of engineering for dealer.com dealer.com had a website product that
was a product line that that had a release train there was a director of engineering on that release train and then there were a bunch of teams contributing to that product line well the managers of those teams reported to the director of engineering of the website release train and and up the chain and so it made sure that what we were we were all focused on delivery and we're all connected to the same set of priorities now we complemented this with central organizations like architecture and agile delivery and engineering operations so that they could really work from kind of the side of this structure to ensure that we were building well architected solutions that we the behaviors that we had in place and the outcomes we were looking to measure and um and the problems we were bringing to our cust our teams were all the right things in the right way of of thinking about it or from an operations perspective that we were improving our delivery practice so we complemented that structure but but chose to do this within engineering to really create that alignment around delivery and that accountability so that's just a little bit about you know kind of one way to break up teams and and make smaller teams and scale that within your enterprise to get more focused on your customer and with that you can now break up your components and give those teams ownership of these smaller components to allow them to release on their own cadence and be more independent and autonomous so naturally when we talk about smaller components we'll talk monolith to microservices and just a quick example you know um i'm sure you you understand the difference but a simple example of let's take a blog it has has users that might be commenting or creating threads on on posts and so we might present this in a common um user interface we could certainly accomplish it on the left as a model if a single application a single database or we could break it up into its independent concerns users threads and posts and we can have separate apis and separate databases maybe even separate user interfaces that come together through a common user experience so before we kind of dive in and we're not going to debate the monolith versus microservices there's no battle coming here but i think it's important to really ground ourselves in some anti-patterns as we look at how we might build towards microservices so a couple that i'll call out one is the premature optimization i think one of the the pitfalls of microservices is that the name implies this uh small thing very small thing and you could easily start in this this move to microservices by thinking that you need to make all of these very small components that would require you to prematurely optimize those components without fully understanding everything about the component instead i think it's best to shrink and refactor over time now the other is changing um your your code and and making updates to the software adding features really tends to result in complexity increasing complexity of your solution the alternative is to really use that change to intentionally simplify your solution and also moving away from this idea of big upfront assumptions that we know things in advance and instead constantly changing and learning and improving what we have or how we go about doing things one of the the challenges here though is that in order to accomplish these things on the right you really need to have ownership and so when we're creating these small teams it's important that they own features and functions as you saw in the structure that we had at cox automotive each of those small teams owned a feature or function that rolled up into a product that we brought to market so it's important that we have that ownership so that they can they have the space to shrink and refactor that they own the improvements over time and instead of just kind of dropping in making some changes and leaving because the reality is is that you know and i'm again i'm not encouraging that you build monoliths i think 12 factor apps is a really great starting point but i absolutely would encourage you to build coarse grained services and to live in this sweet spot for a period of time in this the space of learning the idea of learning and so in that sweet spot you can look at you know what are the boundaries how do my my data or or functionality how do they relate to each other and or affect each other what are the usage patterns are are users kind of really interested in in one area but but maybe not so much in the other or they only need it you know few times here and there versus every day on a regular basis and what about the rate of change how often are we you know our new feature requests coming in or are we having to improve the experience of this individual thing all of those things will help you understand the the boundaries and how to break things apart because the the reality is that this course grain set of services is only good for a period of time that there is a pivot point and a decline of productivity coming and again i that's really because change increases complexity over time so we want to use that change to intentionally simplify so we need to forecast that pivot point and make sure that we're breaking down our coarse grain services or our monolith in time to avoid that decline of productivity and so the good news is that there's a handful of patterns that that enterprises are using to really break down those monoliths or coarse grained services and and make them finer grained the first is event decoupling so a simple example that you should be familiar with let's say you're going to a restaurant there's counter surface you know fast food restaurant and imagine if the person taking your order then ran back and and threw your burger on the grill and then ran over and dropped your fries in and then filled up your drink and grabbed the top and straw and then ran back and flipped your burger and then went and packaged your fries and then threw cheese on your burger and then packaged the burger and and came back to the counter with your order fully complete certainly possible uh sounds pretty chaotic though i think but really this is what we're asking our monoliths to do is this this work that is very much related to each other it's all it's all a single order for a single person but they're very it's a very different set of work and so we can take this and we can use venti coupling to break this down and we can say hey look the by actually placing the order when that order is placed that's an event at that point i know that a cheeseburger was ordered that a large fry was ordered and a lemonade was ordered and so i can tell these individual stations go make a cheeseburger package some you know make a large fry and when they're complete these kind of black box things can produce the burger the fries the drink we can package that back together and still provide the same experience of single point for order to delete order place single point for order delivery but we're accomplishing it in a very different way this is how we would accomplish microservices we would take each of these stations and consider them a microservice and we use we use events to kind of partition off and and parse out the the different activities but then unify them back together to to create that common experience so that's event as the couplers and it's a great pattern because it pairs well with another pattern which is the strangler pattern so martin fowler wrote about this back in 2004 after visiting the queensland coast of australia where he experienced the strangler figs which would um root they'd start off in in the upper branches of of a tree and then eventually make their way down and root in the soil and they would eventually kind of strangle strangle their tree their host um eventually killing their host and so he recognized this as uh an interesting analogy for the way that we go about breaking down our applications we had historically embarked on these large transformations of solutions or re-architectures and they tended to fail because we were tackling too much at once and so he saw this pattern as a as a way to say look well if we can slowly do this over time and that's a more appropriate approach and so what we should really be doing is prioritizing our work we should be looking at our applications and saying where is change happening most often or where are we slowest and and that's having a negative impact on our business let's prioritize that area first and let's modernize that and then once that's done let's take a fresh look and and prioritize the next piece so by using event decoupling it's one of the the techniques that you can use once you have that prioritization you can use venti coupling to kind of separate out that that thing essentially put a shim in place so that your monolith and this new uh modernized component can co-exist so the strangler pattern is a great way to to slowly improve this over time based on actual business needs versus assuming that the entire thing should be written and and uh maybe kind of falling down along the way so the last pattern that i'd like to cover is domain driven design now i'll admit that the event decoupling and strangler pattern are much more of an iterative approach domain driven design definitely requires some upfront thinking and design work and that's because it takes a pretty complex problem and and looks to break it down into smaller pieces so that again these smaller teams can own the various pieces so you can take this example of the sales context or support context so this this notion of bounded context is that there are um different data sets necessary when you're doing different things but there tends to be connectivity between them so when i'm supporting a customer yes i need to know the customer i need to know the products they have but there might be tickets and defects that they've reported on that product so i need to know all of that information in order for me to properly support them well in the sales context i might also need to know the tickets that they've submitted but i may be organizing or going to sell them a product based on um you know opportunities and and how we've segmented our territories internally so there's different data sets in different contexts they're unified through this linkage which you see on customer and product so domain driven design takes that not big problem which you might say is my customer database or my you know my customer data set that that could be a monolithic data set instead let's break it down into the individual pieces still create that connectivity so i can traverse the entire model but i have them them broken down into the smaller pieces so that i can have smaller teams working on them now one example of of using this model was from bmw and they had this configurator platform where you know if you were to go to bmwusa.com and and let's say you it to configure the five series and you wanted to make it your own well you can pick different entertainment systems or different wheels or engines but there's only there's a certain set of combinations that are actually able to be manufactured so there's a lot of logic that goes into figuring out um what is possible and there's lots of different times that you might want to know what's possible what goes together and and you know a great example is accessories or parts that you might want to add after the fact well what what fits with what um based on you know different certain scenarios so so they had this this complex system that they knew really well but the problem is that they had really traversed this path that we talked about where they had gone past this pivot point and reached this decline of productivity the development speed had become slower and slower and even minor changes led to large refactorings they knew they needed to to move out of this place and so they embarked on a journey to build these small self-contained microservices but in order to do so they they wanted to break down this this broad data set this complex environment that they had they use domain-driven design to do that to really understand those bounded contexts and in opportunities to create connectivity while separating the the data models and they use that to drive the design of their restful services but they took it a step further where they also broke out their batch processes so it wasn't just from the api consumer perspective that they had segregate segregated duties but also on the back side so that their data could be processed independently and could be tailored to the needs of that specific api um could also be scaled based on the needs of that api and so that holistic approach and by starting with domain-driven design they took this really complex problem and and were able to simplify it and build these small independent microservices so i want to leave you with this quote from brenton at petco because we just covered a lot we covered uh break you know from a people perspective organizational structure team how teams are are set up and organized and what they own how we connect our delivery practice how that then connects into uh how we've broken down our components the different techniques and and iterating on that improvement over time it's a lot it's it's certainly a lot but as he says you have to remember that this is a journey this is we want to move away from a project that starts and ends and really embark on this journey and it's really about starting and choosing something impactful kind of what we talked about with the strangler pattern and and working to decompose it and iterate over time i think it's really important to to be creative and to keep progressing because you know you may encounter some things that that you can't really decompose or maybe aren't a priority to decompose so how do you get creative about that to allow your these components to co-exist in the environment as you're working through this prioritized set of of refactoring or re-architecture i think that that making progress and keeping progressing is a really important aspect of this journey so i'll leave you with a couple links here executive insights is a great resource for ebooks and lots of conversations we have a podcast out there that my team does we talk about some of the challenges that that enterprises are facing as they embark on this transformation journey we have a blog that it looks at all sorts of different things again a lot around leadership and transformation governance and that sort of thing if you want take a picture of my qr code here connect with me on linkedin i'd be happy to share my presentation with you thank you so much for joining me i truly appreciate it please don't forget to take the survey at the end of this session cheers
2021-02-07 23:01