Posts

Showing posts with the label Microservices

Dockercon2020 - Monolithic to Microservices + Docker = SDLC on Steroids!

Image
Here is the link to my #Dockerccon2020 talk "Monolithic to Microservices + Docker = SDLC on Steroids!" 

EWF Service Decomposition Pattern

Image
EWF is another microservice decomposition pattern that I like to use when building services. It stands for Entity, Workflow & Functional services. In simplest terms, it’s an extension of Single Responsibility principle and allows for building independent testable services. To understand this pattern better, let’s start with an example. Imagine I want to write a signup service that allows user to signup to a website using their Google account. The service would perform the following:  Let user login into google account and fetch user’s basic information from Google upon successful sign-in. Apply more default settings associated to creating new user.  Persist the user in the database.  After successful registration, redirect the user to the homepage.  At a high level, this works just fine and gets the job done. But if you think about testability first and wants to test this service in isolation we have a problem! The entire testing paradigm relies on ...

Microservices and Testing Pyramid

Image
Adoption of microservices have changed the way we build software. It's a slim down version of SOA and impacts all areas of SDLC. A successful adoption will require mindset change of how we think, design, test, build, deploy and monitor our products. In this post, I want to discuss Testing methodology which took a 180 degree turn for me. Conventional testing pyramid implies that Unit tests are the most important form of tests. It carries the heaviest weightage. Unit test identifies a small unit of code and test it with combination of parameters. Unit tests are then followed by Service tests. Service tests are the API tests for your service. Usually it consist of a test-suite that includes spinning up the service under test and all its dependencies. A test client can call service API with different inputs and validate that the service is working as expected. At the top of the pyramid are the UI and E2E tests. A typical testing pyramid looks something like: This pyramid makes ...