Microservices in Action
Technologies are often described in terms of hype cycles and reality distortion fields — and sometimes with good reason, as some heralded technologies have yet to really pan out (looking at you, 3D TVs) while others have taken decades of starts and stops to achieve widely useful real world use cases (welcome to renewed relevance, neural networks!).
For many companies, it might be hard to judge just where microservices-based architectures currently fall on the hype continuum. Because they offer small, lightweight snippets of functionality that can be independently deployed, microservices have been almost mythologized in some circles for their ability to promote speed and scale — but they’ve also prompted some analysts to predict that a majority of microservices deployments will fail under mounting complexity. Sort of mixed signals, right?
The reality is that microservices-based architectures can be very complicated—but they’re far from hype. Those complexities are becoming increasingly manageable, and companies from all industries — not just digital natives such as Netflix—are using microservices to drive real business results, not just innovation projects and bespoke use cases.
Specifically, more companies are recognizing three things:
- As the number of microservices increases, so does complexity — but this complexity can be mitigated by employing a service mesh so that developers do not have to be relied upon to include elements of service-to-service communication in their code.
- Though microservices were originally intended to be shared only within small teams, many microservices express valuable functions that should be shared throughout the organization.
- This sharing can be efficiently and relatively easily facilitated by packaging and managing microservices as application programming interfaces (APIs).
To survey some of the possibilities, here are three enterprises, drawn from some of the companies that Google Cloud’s Apigee team has worked with, whose leaders are embracing microservices and APIs to drive results.
PricewaterhouseCoopers: Creating new services, innovating faster, and entering digital ecosystems
A part of “Big Four” accounting firm PricewaterhouseCoopers, PwC Australia is leveraging microservices and APIs to accelerate innovation and create new lines of business.
The organization has decades of experience in traditional professional services such as auditing, insurance, tax, legal, and management consulting, but over the last few years, PwC Australia’s Innovation and Venture group has set out to express these capabilities as software—including lightweight, single-function microservices made consumable to developers via APIs. Because these APIs abstract the complexity of microservices and other backend systems, the company can replace and update functionality without disrupting developers or users of the apps those developers build.
By enabling a faster, more granular approach to software development, microservices and APIs have helped the company to replace some of its backward-facing, reactive, and labor-intensive legacy methods with more forward-looking proactive services. Its Cashflow Coach product, for example, applies machine learning models to ledger and banking data in order to predict cash flows based not only on when invoices should be paid but also when customers have traditionally paid.
PwC’s efforts also include a microservices-based product that uses blockchain to prevent counterfeiting schemes in the meat industry, such as attempts to use fraudulent health and provenance information to sell old or sub-standard meat products that could be dangerous to consumers. The tool relies on a physical “krypto anchor” (an edible substance stamped on meat) that can be scanned at the point of unpacking in order to verify it matches a blockchain-based certificate. When it does, the meat’s data is verified.
The company is also packaging and monetizing services via APIs to open its data and technologies to new ecosystems of external partners and developers. Because these APIs are based on a microservices architecture, PwC can observe how its services are being used and responsively update particular aspects without disrupting the APIs developers use or breaking the end-user experiences those APIs enable.
“That really is the key part of our strategy,” said Trent Lund, head of PwC Australia’s Innovation and Ventures group. “We act as a middle layer. Extract, but don’t try to own the entire business ecosystem because you can’t grow fast enough.”
Walgreens: Rewarding customer loyalty
For the last several years, Walgreens has been blending the physical and digital retail experiences by extending its services to a range of partner apps powered by microservices and APIs.
“We’ve focused on making our services as light as possible and easy to develop on,” said Walgreens developer evangelist Drew Schweinfurth in an interview.
The company’s Photo Prints API, for example, has allowed external developers to build apps that let smartphone users snap a picture from their phone on their way to lunch, send the photo to a local Walgreens for processing, then drop by to pick up prints at the store on their way home.
Its Balance Rewards API, meanwhile, lets partners build Walgreens loyalty points into their health and wellness apps, allowing the apps to reward users with loyalty points when they do things such as take a jog or monitor their blood pressure. Apps that leverage the API reach hundreds of thousands of users and have distributed billions of rewards points.
Magazine Luiza: From brick-and-mortar to omnichannel
South American retailer Magazine Luiza is a strong testament to the results a company can achieve when it deploys microservices and APIs with vision and purpose. A traditional brick-and-mortar business for much of its history, the company has enjoyed soaring revenue and seen its stock become one of the hottest in Brazil as it has sharpened its focus on modernizing IT.
Just a few years ago, the company’s technology capabilities were relatively modest. Its e-commerce efforts relied on a monolithic backend built with over 150,000 lines of code. Functionality was tightly-coupled, which made it easy to introduce bugs when pushing updates, limited the company’s ability to scale functionality, and entrenched silos between business and IT teams.
A small development team’s switch to API-first approaches helped turn everything around. As the team moved faster and introduced new products, the company scaled out the team’s best practices, eventually distributing development efforts across many small, independent teams. When its transformation began, the company had been delivering only eight new software deployments monthly — today, it pushes more than 40 per day.
The speed and agility that Magazine Luiza’s new architecture offered have produced big business results. Prior to its shift to microservices, for example, the company offered modest e-commerce capabilities that supported fewer than 50,000 SKUs. Today, Magazine Luiza operates a vast and growing online marketplace that enables new merchants to join via an API and includes over 1.5 million SKUs from sellers around the globe.
The company was able to scale up its efforts so dramatically, including expanding from a handful of engineers to more than one hundred in just a few years, because executive leadership not only understood the company’s digital vision but also enforced mandates to align the organization, such as using APIs as a communication interface between microservices and other systems, so that functionality could be consumed for innovation throughout the company.
It’s not about scale or speed—it’s about customers
Many of the companies whose stories are included in this article have achieved the benefits that make microservices so alluring—faster software development, greater ability to scale services and resources, and more.
But these technology capabilities alone are not why these companies have enjoyed success. Rather, they’ve been successful because they’ve deployed these capabilities with purpose to serve customer needs. APIs can help companies make their microservices more manageable and valuable—but a customer focus remains the most important ingredient to success.