JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek
description
Transcript of JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek
![Page 1: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek](https://reader033.fdocuments.us/reader033/viewer/2022052907/55933aa31a28ab012d8b4691/html5/thumbnails/1.jpg)
Tomasz Lelek
tomekl007
@tomekl007
![Page 2: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek](https://reader033.fdocuments.us/reader033/viewer/2022052907/55933aa31a28ab012d8b4691/html5/thumbnails/2.jpg)
How to rebuild monolithic application to micro services
architecture?
![Page 3: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek](https://reader033.fdocuments.us/reader033/viewer/2022052907/55933aa31a28ab012d8b4691/html5/thumbnails/3.jpg)
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](https://reader033.fdocuments.us/reader033/viewer/2022052907/55933aa31a28ab012d8b4691/html5/thumbnails/4.jpg)
Monolith
![Page 5: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek](https://reader033.fdocuments.us/reader033/viewer/2022052907/55933aa31a28ab012d8b4691/html5/thumbnails/5.jpg)
Application Domain
![Page 6: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek](https://reader033.fdocuments.us/reader033/viewer/2022052907/55933aa31a28ab012d8b4691/html5/thumbnails/6.jpg)
One entity – multiple identities
![Page 7: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek](https://reader033.fdocuments.us/reader033/viewer/2022052907/55933aa31a28ab012d8b4691/html5/thumbnails/7.jpg)
Same functionality – ���new architecture
![Page 8: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek](https://reader033.fdocuments.us/reader033/viewer/2022052907/55933aa31a28ab012d8b4691/html5/thumbnails/8.jpg)
Redirecting request
![Page 9: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek](https://reader033.fdocuments.us/reader033/viewer/2022052907/55933aa31a28ab012d8b4691/html5/thumbnails/9.jpg)
��� 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](https://reader033.fdocuments.us/reader033/viewer/2022052907/55933aa31a28ab012d8b4691/html5/thumbnails/10.jpg)
Needs
![Page 11: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek](https://reader033.fdocuments.us/reader033/viewer/2022052907/55933aa31a28ab012d8b4691/html5/thumbnails/11.jpg)
i
![Page 12: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek](https://reader033.fdocuments.us/reader033/viewer/2022052907/55933aa31a28ab012d8b4691/html5/thumbnails/12.jpg)
���Embedded Container
![Page 13: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek](https://reader033.fdocuments.us/reader033/viewer/2022052907/55933aa31a28ab012d8b4691/html5/thumbnails/13.jpg)
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](https://reader033.fdocuments.us/reader033/viewer/2022052907/55933aa31a28ab012d8b4691/html5/thumbnails/14.jpg)
How microservice looks like?
![Page 15: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek](https://reader033.fdocuments.us/reader033/viewer/2022052907/55933aa31a28ab012d8b4691/html5/thumbnails/15.jpg)
Using via imported client
![Page 16: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek](https://reader033.fdocuments.us/reader033/viewer/2022052907/55933aa31a28ab012d8b4691/html5/thumbnails/16.jpg)
Many clients
![Page 17: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek](https://reader033.fdocuments.us/reader033/viewer/2022052907/55933aa31a28ab012d8b4691/html5/thumbnails/17.jpg)
Scala java - interoperability
![Page 18: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek](https://reader033.fdocuments.us/reader033/viewer/2022052907/55933aa31a28ab012d8b4691/html5/thumbnails/18.jpg)
Rest, json, http
![Page 19: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek](https://reader033.fdocuments.us/reader033/viewer/2022052907/55933aa31a28ab012d8b4691/html5/thumbnails/19.jpg)
Architecture
![Page 20: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek](https://reader033.fdocuments.us/reader033/viewer/2022052907/55933aa31a28ab012d8b4691/html5/thumbnails/20.jpg)
Architecture Evolve
![Page 21: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek](https://reader033.fdocuments.us/reader033/viewer/2022052907/55933aa31a28ab012d8b4691/html5/thumbnails/21.jpg)
Managing configuration
![Page 22: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek](https://reader033.fdocuments.us/reader033/viewer/2022052907/55933aa31a28ab012d8b4691/html5/thumbnails/22.jpg)
Configuration Service
![Page 23: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek](https://reader033.fdocuments.us/reader033/viewer/2022052907/55933aa31a28ab012d8b4691/html5/thumbnails/23.jpg)
Asking for configuration
![Page 24: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek](https://reader033.fdocuments.us/reader033/viewer/2022052907/55933aa31a28ab012d8b4691/html5/thumbnails/24.jpg)
Switching configuration dynamically
![Page 25: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek](https://reader033.fdocuments.us/reader033/viewer/2022052907/55933aa31a28ab012d8b4691/html5/thumbnails/25.jpg)
Services monitoring - status
![Page 26: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek](https://reader033.fdocuments.us/reader033/viewer/2022052907/55933aa31a28ab012d8b4691/html5/thumbnails/26.jpg)
Monitoring of dependencies
![Page 27: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek](https://reader033.fdocuments.us/reader033/viewer/2022052907/55933aa31a28ab012d8b4691/html5/thumbnails/27.jpg)
Graph visualization
![Page 28: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek](https://reader033.fdocuments.us/reader033/viewer/2022052907/55933aa31a28ab012d8b4691/html5/thumbnails/28.jpg)
Visualization of dependencies
![Page 29: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek](https://reader033.fdocuments.us/reader033/viewer/2022052907/55933aa31a28ab012d8b4691/html5/thumbnails/29.jpg)
Where is service with configuration?
![Page 30: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek](https://reader033.fdocuments.us/reader033/viewer/2022052907/55933aa31a28ab012d8b4691/html5/thumbnails/30.jpg)
etcd
![Page 31: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek](https://reader033.fdocuments.us/reader033/viewer/2022052907/55933aa31a28ab012d8b4691/html5/thumbnails/31.jpg)
Circuit Breaker
![Page 32: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek](https://reader033.fdocuments.us/reader033/viewer/2022052907/55933aa31a28ab012d8b4691/html5/thumbnails/32.jpg)
Hystrix
![Page 33: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek](https://reader033.fdocuments.us/reader033/viewer/2022052907/55933aa31a28ab012d8b4691/html5/thumbnails/33.jpg)
Implementation
![Page 34: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek](https://reader033.fdocuments.us/reader033/viewer/2022052907/55933aa31a28ab012d8b4691/html5/thumbnails/34.jpg)
Many services = many logs
![Page 35: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek](https://reader033.fdocuments.us/reader033/viewer/2022052907/55933aa31a28ab012d8b4691/html5/thumbnails/35.jpg)
One aggregation point
![Page 36: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek](https://reader033.fdocuments.us/reader033/viewer/2022052907/55933aa31a28ab012d8b4691/html5/thumbnails/36.jpg)
+ logstash
![Page 37: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek](https://reader033.fdocuments.us/reader033/viewer/2022052907/55933aa31a28ab012d8b4691/html5/thumbnails/37.jpg)
Configuration of Logstash
![Page 38: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek](https://reader033.fdocuments.us/reader033/viewer/2022052907/55933aa31a28ab012d8b4691/html5/thumbnails/38.jpg)
/_search?pretty&type=batch-staging
![Page 39: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek](https://reader033.fdocuments.us/reader033/viewer/2022052907/55933aa31a28ab012d8b4691/html5/thumbnails/39.jpg)
���
![Page 40: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek](https://reader033.fdocuments.us/reader033/viewer/2022052907/55933aa31a28ab012d8b4691/html5/thumbnails/40.jpg)
Amazon EC2
![Page 41: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek](https://reader033.fdocuments.us/reader033/viewer/2022052907/55933aa31a28ab012d8b4691/html5/thumbnails/41.jpg)
���
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](https://reader033.fdocuments.us/reader033/viewer/2022052907/55933aa31a28ab012d8b4691/html5/thumbnails/42.jpg)
![Page 43: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek](https://reader033.fdocuments.us/reader033/viewer/2022052907/55933aa31a28ab012d8b4691/html5/thumbnails/43.jpg)
Technology stack
![Page 44: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek](https://reader033.fdocuments.us/reader033/viewer/2022052907/55933aa31a28ab012d8b4691/html5/thumbnails/44.jpg)
Proper documentation
![Page 45: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek](https://reader033.fdocuments.us/reader033/viewer/2022052907/55933aa31a28ab012d8b4691/html5/thumbnails/45.jpg)
Documentation
![Page 46: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek](https://reader033.fdocuments.us/reader033/viewer/2022052907/55933aa31a28ab012d8b4691/html5/thumbnails/46.jpg)
Generated json
![Page 47: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek](https://reader033.fdocuments.us/reader033/viewer/2022052907/55933aa31a28ab012d8b4691/html5/thumbnails/47.jpg)
Swagger-ui
hTps://github.com/wordnik/swagger-‐ui
![Page 48: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek](https://reader033.fdocuments.us/reader033/viewer/2022052907/55933aa31a28ab012d8b4691/html5/thumbnails/48.jpg)
Documentation as a client
![Page 49: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek](https://reader033.fdocuments.us/reader033/viewer/2022052907/55933aa31a28ab012d8b4691/html5/thumbnails/49.jpg)
Time for building microservices !
![Page 50: JDD2014: How to rebuild monolithic application to micro services architecture? - Tomasz Lelek](https://reader033.fdocuments.us/reader033/viewer/2022052907/55933aa31a28ab012d8b4691/html5/thumbnails/50.jpg)
Thank You, Questions ?