Upgrade to Pro — share decks privately, control downloads, hide ads and more …

BizBook365 : With microservice architecture

Foyzul Karim
November 26, 2020

BizBook365 : With microservice architecture

Foyzul Karim

November 26, 2020
Tweet

More Decks by Foyzul Karim

Other Decks in Programming

Transcript

  1. @Me • Foyzul Karim • Started journey on 2009 •

    Details on LinkedIn [linkedin.com/in/foyzul] • Love to make videos [youtube.com/foyzulkarim] • Love to contribute open source [github.com/foyzulkarim] • Love to contribute on Facebook [facebook.com/foyzulsacademy]
  2. Use cases for a shop • Purchase product from supplier

    • Sale product to customer • Accept payment from customer • Give payment to supplier • Manage stock history
  3. Sale operations • Sale product • Update customer history •

    Update stock history • Receive payment from customer • Update customer history • Update account balance • Update Sale state • Update customer history • Update stock history
  4. Purchase operations • Purchase product • Update supplier credit history

    • Update stock history • Pay to supplier • Update supplier credit history • Update account balance
  5. Sale service Customer service Product service Stock service Transaction service

    Start Sale API Product API Stock API Customer API Transaction API Customer Message Handler Product Message Handler Stock Message Handler Transaction Message Handler Service identification and data flow for Sale Pay Sale Message Handler Read write Write Event Read
  6. What can the API have? • Plain and simple Web

    API Endpoints • It may split into two service depending on the need • Command APIs • Query APIs • Command and Query API may implement GraphQL or REST or gRPC mechanism depending on the need
  7. Technical detail • Sale service • Product service • Stock

    service • Customer service • Transaction service
  8. Sale service tech specification • Doesn’t change the business frequently

    • Need robust and reusable architecture • Technology: • ASP.NET API • SQL Server • Redis • Models • Sale, Sale detail, Sale state, Sale edit history • Project • Sale API • Sale message handler
  9. Product service tech specification • Product properties may change often

    • Need adaptable and fast releasable architecture • Technology: • Node.js • MongoDB • ElasticSearch • Models • Product category, Product, Product detail (product option) • Project • Product API • Product message handler
  10. Stock service • Stock properties may not change often •

    Need robust architecture • Technology: • ASP.NET API • SQL Server • Models • Stock summary, Stock history, Daily summary • Project • Stock API • Stock message handler
  11. Customer service • Customer properties may change often • Need

    adaptable and fast releasable architecture • Technology: • Node.js • MongoDB • ElasticSearch • Models • Customer, Address, Customer product, Customer history • Project • Customer API • Customer message handler • Customer report
  12. Transaction service • Transaction properties may not change often •

    Need robust architecture • Technology: • ASP.NET API • SQL Server • Models • Transaction summary, Transaction history, Daily summary • Project • Transaction API • Transaction message handler
  13. Cross cutting concerns • Auth service • Log service •

    Notification service • Timer service
  14. Auth service • Authentication/Authorization properties may not change often •

    Need robust architecture • Technology: • ASP.NET API (ASP.NET Identity) • SQL Server • Redis • Models • ASP.NET Identity models, Permission, Token • Project • Auth API
  15. RabbitMQ Message Broker Sale service Customer service Product service Stock

    service Transaction service Sale message handler Customer message handler Product message handler Stock message handler Transaction message handler Notification message handler Time message handler Time service Ocelot API Gateway Auth service Postman SPA Client BizBook365 : Microservice approach Log message handler
  16. Contact me and what’s next? • Let’s start building the

    first version • Send email to [email protected] • Send message to “Foyzul’s Academy” Facebook page