size • Managing data becomes a challenge • Assurances of Reliability - Becomes harder as you grow, you have to solve dependency graphs and have proper testing frameworks in place • Continuous Deployment & Scalability becomes harder and harder • Different Computational Requirements • Stick to one single language, framework and Database
retrieval processes • How do different services communicate with each other • How to define services and make them discoverable for product development
Be language and framework agnostic ◦ Can be records in functional programing ◦ Can be Document in NoSQL ◦ Tuple in RDBMs • Abstraction ◦ Earth is sphere • Data Selection ◦ Want to represent spherical coordinates of earth on piece of paper • Map real world to your world - Formulaism ◦ Convert spherical coordinates to flat coordinates • Assertion ◦ Preserve direction between points
or none ◦ Consistent - A transaction cannot leave the database in an inconsistent state ◦ Isolated - No transaction interfere with each other ◦ Durable • Easy to say hard to implement in microservices • BASE ◦ Basic Availability ◦ Soft State ◦ Eventual Consistency
Events - Order Created, Amount Reserved, Transaction Completed, Order Confirmed, Rider Allocated …… • Event Bus or Message broker - All services push events here • Publisher of events - Each service will have one, pushes event to the event bus • Subscriber of events - Each service will have one, consumes the events from event bus • Event store - the time machine, stores the event with state - Published, Processed
request - one service One To Many One request multiple service Synchronous Timely response from service. Client may even block when it waits Request/Response Traditional HTTP APIs - Asynchronous Client doesn’t block itself waiting for the response. And the response if any is not necessarily sent immediately Notification No reply expected Publish/subscribe A service produces a message which can be consumed by many services (PubNub) Request/async Response Async reply expected Publish/async response Async response expected by the publisher
call multiple services to render a page. Ex: Amazon claims that 100 services are called to render a page • Handling different formats of communication with different services. Ex: One service might use GRPC, other might follow REST • Refactoring in a service might affect client app • Load balancing and throttling becomes really difficult • Less Secure
grained APIs of each microservice into tailor made response structure for each client • Routing request to right service • Load balancing and throttling • Caching and Reliability