Microservices at NewStore

54
BUILDING A SAAS E-COMMERCE SYSTEM WITH MICROSERVICES JAN-OLIVER PANTEL SOFTWARE ENGINEER @NEWSTORE

Transcript of Microservices at NewStore

BUILDING A SAAS E-COMMERCE SYSTEM WITH MICROSERVICES

JAN-OLIVER PANTEL SOFTWARE ENGINEER @NEWSTORE

BUILDING A SAAS ECOMMERCE SYSTEM WITH MICROSERVICES

AGENDA

▸ Company & Goals

▸ Object Oriented Microservices

▸ Aspect Oriented Microservices

▸ Bounded Context and Team Changes

▸ Where we’ve got

GOALS

ONE COMPANYWE WANT TO WORK AS

INDEPENDENT AND SCALABLE TEAMS

WE DO OUR BEST TO ENSURE

INDEPENDENTLY SCALABLE

WE WANT OUR SOFTWARE TO BE

OBJECT ORIENTED MICROSERVICES

OBJECT ORIENTED MICROSERVICES

SHIPMENT

PAYMENT

SALES ORDER RETURNS

PRODUCT

OBJECT ORIENTED MICROSERVICES

SHIPMENTPAYMENT

SALES ORDER RETURNS

PRODUCT

OBJECT ORIENTED MICROSERVICES

SHIPMENT

PAYMENT

SALES ORDER RETURNS

PRODUCT

NETWORK

DANGER OF THE DISTRIBUTED MONOLITH

A OBJECT ORIENTED MICROSERVICE ARCHITECTURE IS IN

SHARED CODEDISTRIBUTED MONOLITH

The evils of too much coupling between services are far worse than the problems caused by code duplication.

Jan Stenberg (infoQ)

OBJECT ORIENTED MICROSERVICES

HIGHLY DEPENDENT SERVICES

DISTRIBUTED MONOLITH

We can not just simply change that object. We don’t know what this will do to our system.

Developer working on a distributed monolith

OBJECT ORIENTED MICROSERVICES

When I change this in service A I also need to change that in service B.

Developer working on a distributed monolith

OBJECT ORIENTED MICROSERVICES

I need to know which other services I need to start so that your service does not crash.

Dev-Ops working on a distributed monolith

OBJECT ORIENTED MICROSERVICES

BUILD FUNCTIONALITY

WE DON’T WANT TO BUILD OBJECTS, WE WANT TO

ASPECT ORIENTED MICROSERVICES

FUNCTIONALITY NOT OBJECTS

SERVICES CARE ABOUT

CATALOG BROWSING CHECKOUT AUTHORISE CREDIT CARD ROUTE ORDER PICK AND PACK CHARGE CREDIT

CARD

PRODUCT PRODUCT PRODUCTPAYMENT PAYMENTORDER

ORDER ORDER

CATALOG BROWSING CHECKOUT PICK AND PACK

PRODUCT PRODUCT PRODUCT

•Price

•Tax class

•Weight

•Dimensions

•Image

•Name

• Image

•Price

The evils of too much coupling between services are far worse than the problems caused by code duplication.

Jan Stenberg (infoQ)

ASPECT ORIENTED MICROSERVICES

REPLICATE OVER SHARING

ALSO ON THE DATA LEVEL

ENTITIES EVOLVE INDEPENDENTLY

WE BECAME MORE FLEXIBLE WHEN WE LET

LESS SCHEMA COUPLING

SERVICES BECOME INDEPENDENT THROUGH

YOU CAN SCALE THE RIGHT PART

DEPENDING ON NEEDS

TO SHAPE A FINAL PRODUCT

COMPOSE FUNCTIONALITIES

TIME TO GET THERE

LOW INTER TEAM COMMUNICATION

TROUGH HIGH DISTRIBUTION

HIGH DEPENDENCIESLAYERED APPLICATION WITH

LACKING SCALABILITY

WE FOUND OURSELVES

Like any architectural style, microservices bring costs and benefits. To make a sensible choice you have to understand these and apply them to your specific context.

Martin Fowler

BUILDING A SAAS ECOMMERCE SYSTEM WITH MICROSERVICES

BOUNDED CONTEXTS

BUYEXPLORE OMS FULFILL

Browse and select productsCreate and checkout order

Route order to store and inform customerGuide associate through fulfilment

FOCUS TEAMS FOR EACH CONTEXT

WE BUILD

BUYEXPLORE OMS FULFILL

BUYEXPLORE FULFILLROUTING

FINANCE

ROUTING

FINANCE

CHECKOUT

MONITORING

CATALOG

RECOMMEND

SHIP

OPERATE

COMMUNICATE ACROSS TEAMS

WE LEARNED THE NEED TO

FIRST CHANGE THE ORGANISATION

AS CONWAY TAUGHT US

WHERE WE’VE GOT

INDEPENDENT THROUGH LESS COUPLING

TEAMS ARE MORE

END TO END IN ONE TEAM

FEATURES ARE DEVELOPED

WE CAN SPLIT INTO SMALLER TEAMS

WHEN THE TEAM GROWS

BUILDING FUNCTIONALITY NOT BEHAVIOUR

TEAMS CAN FOCUS ON

SCRUMWE REALLY HAVE FUN USING

A LONG WAY TO GO

GET IN TOUCH!

QUESTIONS?

APPENDIX

IMAGE SOURCES

https://pixabay.com/en/light-bulbs-hanging-lighting-918581/https://pixabay.com/en/letters-numbers-blocks-alphabet-691842/http://barnimages.com/wires/https://pixabay.com/en/diner-restaurant-room-people-336499/http://bossfight.co/wp-content/uploads/2015/05/boss-fight-free-stock-images-photos-photography-fingers-woman-string.jpghttps://www.pixabay.com/en/audience-crowd-people-persons-828584/https://stock.tookapic.com/photos/28518http://jaymantri.com/post/93427518193/downloadhttps://pixabay.com/en/books-library-education-literature-768426/https://static.pexels.com/photos/7096/people-woman-coffee-meeting.jpghttp://johnsonbrandon.com/assets/gallery_images/daily-scrum.jpghttps://pixabay.com/en/people-crowd-group-team-dock-690105/https://static.pexels.com/photos/7075/people-office-group-team.jpghttps://pixabay.com/en/mechanics-engine-springs-mechanic-424130/http://skitterphoto.com/?portfolio=car-enginehttps://pixabay.com/en/rollercoaster-looping-amusement-801833/https://stocksnap.io/photo/SWDR6XR7YShttps://stocksnap.io/photo/O7S9P51D9Mhttps://stock.tookapic.com/photos/7714https://pixabay.com/en/digital-camera-disassembly-336670/http://negativespace.co/photos/traffic-trails/http://www.splitshire.com/straight-country-road/http://skitterphoto.com/?portfolio=board-gamehttps://picjumbo.com/man-in-a-winner-pose-walking-on-the-road/https://static.pexels.com/photos/519/light-sign-typography-lighting.jpghttp://www.splitshire.com/people-enjoying-concert/https://www.pixabay.com/en/dart-target-aim-arrow-goal-point-444196/https://stock.tookapic.com/photos/539http://barnimages.com/old-mail-boxes/http://barnimages.com/using-mobile-phone-in-cafe/https://stock.tookapic.com/photos/31873