Another day, another buzzword in the world of software development! ‘Microservices’ is a new approach to structuring server-side software. But is it really new? In this talk I’ll walk you through the birth and ‘raison d’etre’ of microservices and tell about pro’s and con’s of the approach.
Having laid the foundation, we will take a look at best-practices and patterns for building micro service architectures and combine this with a tour of current technologies and development tools.
Finally, I will take a quick look at the future and discuss some of the remaining challenges. All parts of the presentation will be accompanied by structural examples based on a real ecommerse system.
9. Small? Logical?
“Write services that do one thing and do it well.
Write services to work together.
Write services to handle RESTful http, because that is a universal interface.”
10. Small? Logical?
“For us, a service is micro if we can rewrite it in 2 weeks or less”
11. Breaking up Magento
System
Products
Customers
EAV
Sales
Get /products/21
POST /transactions
12. How is this different from SOA?
-Less specs (WS-*)
-Focus on being small
-Fit with Agile
-JSON > XML
-??
31. HTTP (REST)
Products
Customers
Sales
API Gateway: Authentication&Routing
HTTP
HTTP
HTTP
HTTP
System
32. Message Queue (MQ)
Products
Customers
Sales
API Gateway: Authentication&Routing
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
System
33. How to Transitioning from A Monolith?
Piece by piece: “Whenever a big new feature change came along, we asked ourselves? Can we split this into a seperate microservice?”
Sales
HTTP
35. Step1 : Write something
Tools& Techs:
-JAVA
-Go
-.Net
-Node.js
…
Standard(s)?:
Simple to run (separate) processes
36. Step 2: Test it
Tools& Techs:
-REST Clients (Paw,
Postman)
-Language specific test/mock frameworks
Standard(s)?:
Ad hoc testing
37. Step 3: Commit it
Tools& Techs:
-GitHub
-BitBucket
-Launchpad
-In-house hosting
Standard(s)?:
Support many repo’s, easy to use (GitHub?)
38. Step 4: Encapsulate it
Tools& Techs:
-Docker
-(platform specific process encapsulation)
Standard(s):
Docker
39. Step 5: Wire it up
Tools& Techs:
-Docker based:
-(google) Kubernetes
-(openshift) GearD
-(spotify) Helios
-Many more…
-DNS service disco
-Immutable:
-Terraform & Packer
Standard(s):
None, very much in flux, also check: http://www.mindmeister.com/389671722/docker-ecosystem
40. Step 6: Keeping Track
Tools& Techs:
-ELK stack
-Nagios
-Statsd/Graphite
-…
Standard(s):
Whatever your company is comfortable with and has support for your poly glot env
45. 3: Development tools are needed for (contract) testing and isolation
Products
Customers
Sales
API Gateway: Authentication&Routing
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
System