jdd2014: how to rebuild monolithic application to micro services architecture? - tomasz lelek
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 serviceTRANSCRIPT
Tomasz Lelek
tomekl007
@tomekl007
How to rebuild monolithic application to micro services
architecture?
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
Monolith
Application Domain
One entity – multiple identities
Same functionality – ���new architecture
Redirecting request
��� Url Rewriting
#Apache rewrite url, work for post request RewriteEngine On RewriteRule /generate hTp://reportservice.no/generate [P]
Needs
i
���Embedded Container
Starting Service
./sbt >container:start [info] Started [email protected]:8090 [success] Total @me: 2 s
How microservice looks like?
Using via imported client
Many clients
Scala java - interoperability
Rest, json, http
Architecture
Architecture Evolve
Managing configuration
Configuration Service
Asking for configuration
Switching configuration dynamically
Services monitoring - status
Monitoring of dependencies
Graph visualization
Visualization of dependencies
Where is service with configuration?
etcd
Circuit Breaker
Hystrix
Implementation
Many services = many logs
One aggregation point
+ logstash
Configuration of Logstash
/_search?pretty&type=batch-staging
���
Amazon EC2
���
vagrant plugin install vagrant-‐aws vagrant up -‐-‐provider=aws vagrant ssh <MACHINE NAME>
Technology stack
Proper documentation
Documentation
Generated json
Swagger-ui
hTps://github.com/wordnik/swagger-‐ui
Documentation as a client
Time for building microservices !
Thank You, Questions ?