jdd2014: how to rebuild monolithic application to micro services architecture? - tomasz lelek

50
Tomasz Lelek tomekl007 @tomekl007

Upload: proidea

Post on 01-Jul-2015

219 views

Category:

Software


2 download

DESCRIPTION

When creating application based on architecture of micro services, a team needs to face up many challenges. -building easily extensible architecture of micro services. When we creating new service, we always need data from other service. To be able to receive that data, we only need to import light client, which is the interface of another service. -How to use HTTP protocol properly, to change it to our biggest assets, and do not attempt to hide it unnecessarily. -Which functionalities of monolithic application pull out first. How to use domain driven design, to model the business domain specific for each micro service ? -How to manage configuration and deployment of various services ? -implementing Circuit Breaker patter, using Netfix Hystrix library -real time monitoring of micro services -aggregating logs from many servers in one central point, and analysing them -creating documentation, which could be use as a client of each service

TRANSCRIPT

Page 1: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek

Tomasz Lelek

                                                                         tomekl007      

                                                           @tomekl007  

Page 2: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek

How to rebuild monolithic application to micro services

architecture?    

Page 3: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek

Presentation Plan

1.  Business  context  2.  Technology  3.  Architecture  4.  Configura@on  management  5.  Monitoring  6.  Aggrega@ng  logs  7.  Deploying  (  vagrant,  docker  )  8.  Modern  documenta@on  

Page 4: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek

Monolith

Page 5: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek

Application Domain

Page 6: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek

One entity – multiple identities

Page 7: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek

Same functionality – ���new architecture

Page 8: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek

Redirecting request

Page 9: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek

��� Url Rewriting

 #Apache  rewrite  url,  work  for  post  request  RewriteEngine  On  RewriteRule  /generate        hTp://reportservice.no/generate  [P]  

Page 10: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek

Needs

Page 11: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek

i

Page 12: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek

���Embedded Container

Page 13: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek

Starting Service

 ./sbt  >container:start  [info]  Started  [email protected]:8090  [success]  Total  @me:  2  s  

Page 14: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek

How microservice looks like?

Page 15: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek

Using via imported client

Page 16: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek

Many clients

Page 17: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek

Scala java - interoperability

Page 18: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek

Rest, json, http

Page 19: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek

Architecture

Page 20: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek

Architecture Evolve

Page 21: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek

Managing configuration

Page 22: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek

Configuration Service

Page 23: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek

Asking for configuration

Page 24: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek

Switching configuration dynamically

Page 25: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek

Services monitoring - status

Page 26: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek

Monitoring of dependencies

Page 27: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek

Graph visualization

Page 28: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek

Visualization of dependencies

Page 29: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek

Where is service with configuration?

Page 30: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek

etcd

Page 31: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek

Circuit Breaker

Page 32: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek

Hystrix

Page 33: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek

Implementation

Page 34: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek

Many services = many logs

Page 35: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek

One aggregation point

Page 36: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek

+ logstash

Page 37: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek

Configuration of Logstash

Page 38: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek

/_search?pretty&type=batch-staging

Page 39: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek

���

Page 40: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek

Amazon EC2

Page 41: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek

���

vagrant  plugin  install  vagrant-­‐aws    vagrant  up  -­‐-­‐provider=aws    vagrant  ssh  <MACHINE  NAME>  

Page 42: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek

Page 43: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek

Technology stack

Page 44: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek

Proper documentation

Page 45: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek

Documentation

Page 46: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek

Generated json

Page 47: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek

Swagger-ui

hTps://github.com/wordnik/swagger-­‐ui  

Page 48: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek

Documentation as a client

Page 49: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek

Time for building microservices !

Page 50: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek

Thank You, Questions ?