Published Sep 3, 2019

Episode 213: James Lewis on Microservices

James Lewis delves into the nuances of microservices architecture, highlighting its evolution and contrast with service-oriented architectures, while offering insights on infrastructure, deployment, and team dynamics crucial for successful implementation. With a focus on testing complexities, Lewis shares advanced strategies like executable specifications and consumer-driven contracts to manage and optimize complex service environments.
Episode Highlights
Software Engineering Radio - the podcast for professional software developers logo

Popular Clips

Episode Highlights

  • Testing Challenges

    Testing microservices presents unique challenges, particularly in ensuring that all components work seamlessly together. highlights the complexity of testing microservices due to their asynchronous nature and the need to verify business processes across multiple systems 1. He explains that while unit testing is straightforward, integration testing becomes more complex as it involves multiple services working in tandem. To address these challenges, some organizations are adopting innovative approaches such as testing in production environments, supported by robust monitoring and logging systems 2.

    The problems come when you've got behavior that spans multiple systems. So how do you test business processes, say, across multiple, multiple microservices?

    ---

    This approach allows for real-time testing and quicker identification of issues, although it requires a shift in traditional testing mindsets 3.

       

    Executable Specs

    Executable specifications and consumer-driven contracts offer innovative solutions for managing microservices. describes executable specifications as a way for clients to define how they expect a service to behave, which can then be tested by service maintainers 4. This method ensures that any changes in the service do not break existing contracts, facilitating smoother integrations. Consumer-driven contracts take this concept further by allowing clients to write tests for downstream services, which are then run by the service owners themselves 5.

    The idea of consumer driven contracts is kind of flipping that on its head. And rather than me as the client of the downstream service running the tests, I still write the tests, but I hand them off to the service owners themselves and they run them as part of their own.

    ---

    This approach enhances collaboration between teams and ensures that services remain reliable and consistent 6.

Related Episodes