microservice architecture

Download Microservice Architecture

If you can't read please download the document

Post on 16-Apr-2017

139 views

Category:

Technology

0 download

Embed Size (px)

TRANSCRIPT

MicroServices

October 30, 2014

Page 1

February 11, 2015

Page 2

2

Why a shift in Architectural Paradigm?

February 11, 2015

Page 4

February 11, 2015

Page 5

Decomposing big things into smaller more manageable chunks

Subroutines, classes, packages, functions are programming constructs that help us in providing solutions

February 11, 2015Page 6

We deploy as a MONOLITH

Huge Java EE Container

To Do- Put an arrow mark for Java EE Container6February 11, 2015

Page 7

In a MONOLITHIC application where is the memory leak?

Supportability Challenges

7February 11, 2015

February 11, 2015Page 8

Q In a monolithic application - what fails when you see OutOfMemoryException?

Do you see isolated or catastrophic cascading failure?

8February 11, 2015

February 11, 2015Page 9

It all starts out GREAT but what an entangled web of classes we weave ?

Too BIG to fit in developers brain

Hard to ADD / MODIFY dependencies Leading to stale stacks

Functional areas to be regression tested when a class / component changes?

Release cycles

Maintainability Challenges

9February 11, 2015

Page 10

MONOLITHIC application may take ages to build & deploy

Serviceability Challenges

Availability Challenges

To Do- Put image of application log file which highlights high build time of application10February 11, 2015

Page 11

Impedes productivity of team

TOO many COOKS SPOIL the BROTH

11February 11, 2015

What is a Micro-Service & its implications ?

Page 13

The UNIX philosophy?

Write programs that do ONE thing . . . And does it Extremely WELL !

Write programs that work together

> # ! /bin/sh> cat test.txt | tr \n | sort | uniq c | sort -rn

13February 11, 2015

Page 14

Small

Replaceable

Independent

Runs in its own O/S process (daemon)

Easily consumable (HTTP + JSON)

Upgradeable

Encapsulation

Single Responsibility Principle

Forever Young

Testable

Free of temporal coupling

Fast and Easy to startup

What is a micro-service?

14February 11, 2015

Page 15

Complexity Displacement

Many processes to manage

Operational Complexity

More moving parts

What are the costs of micro-services?

Increase in overall memory consumption

Latency

15February 11, 2015

How ?

Page 17

Design Considerations Good OO Design principles are equally applicable for the design of micro-services

17February 11, 2015

Page 18

Domain Driven Design (DDD)is complementary toMicro-Service based architectures

18February 11, 2015

Page 19

For brown field projectsThe hardest part is going to be finding the seams in a monolithic application to form the boundaries of the micro-services

19February 11, 2015

Page 20Services working together

Avoid synchronous RPC calls Why?

If you still feel you need to do this, first ask did I get the BOUNDARIES right?

Page 21Contd.

If you still feel you need to do this, then consider a circuit breaker (Netflix Hystrix)

Page 22Contd.

Prefer async pub/sub Why?

Page 23Blueprint

Circuit Breakers to avoid cascading failures

Each service has its own config. set and log location

Async messaging backbone provides loosely coupled way for services to work together Like PIPE

Each service can beTESTEDVERSIONEDRELEASED independently

Eliminate side effects each service may have its own db

Services with a SR providing integration point

Services tuned individually allocate only what they need

Each service has its own automated test suite

Each service has built in diagnostic and performance monitoring capabilities

Cross Cutting Concerns

Execution Considerations

Page 25

POLYGLOT Be aware of polyglut

For brown field projects carve off micro services incrementally

25February 11, 2015

Page 26

What ?

Why ?

When ?

How ?

26February 11, 2015

27Thank You !

shah_d_p@yahoo.com@dhaval201279https://in.linkedin.com/in/dhavalshah201279