Everyone has heard about microservices. Someone tries to implement them in practice. And only the bravests of us have already used them in production environment. But then why so many people hype around microservices, if the idea is not quite new? What are microservices? What is the difference between it and good old SOA approach? How can developers create modern enterprise applications in Java easily with the help of this approach?
Our guests should try to answer these questions and share their own experience related to live coding of imaginary startup ‘Hippos’.
The following topics will be covered:
What are microservices? Where is the theory, bro?
What kind of technologies should we choose? What have we chosen and why?
Why RPC is still competetive in REST-domination era?
How to pack and distribute microservices? How can SpringBoot and Docker help us to solve our problems?
Why is service discovery considered as one of the crucial components? How to cook Spring Cloud and what problems you may face in real life?
Security of microservices, API gateway and other.
Speakers will also cover other topics related to distributed system development.
16. In short, the microservice architectural style is an approach to developing
a single application as a suite of small services, each running in its own
process and communicating with lightweight mechanisms, often an HTTP
resource API. These services are built around business capabilities and
independently deployable by fully automated deployment machinery.
There is a bare minimum of centralized management of these services,
which may be written in different programming languages and use
different data storage technologies.
-- James Lewis and Martin Fowler
Что такое микросервисы?
16
17. In short, the microservice architectural style is an approach to developing
a single application as a suite of small services, each running in its own
process and communicating with lightweight mechanisms, often an HTTP
resource API. These services are built around business capabilities and
independently deployable by fully automated deployment machinery.
There is a bare minimum of centralized management of these services,
which may be written in different programming languages and use
different data storage technologies.
-- James Lewis and Martin Fowler
Что такое микросервисы?
17
18. Размер имеет значение?
● Method/Function = Microservice?
● 10-300 LOC = Microservice?
● 1 week = Microservice?
● 1 developer = Microservice?
18
19. Размер не имеет значения*
● Single Responsibility
● One capability
● Bounded context
“In your organization, you should be thinking not in terms
of data that is shared, but about the capabilities those
contexts provide the rest of the domain.”
– Sam Newman, Building Microservices
*до разумных пределов конечно
19
21. In short, the microservice architectural style is an approach to developing
a single application as a suite of small services, each running in its own
process and communicating with lightweight mechanisms, often an HTTP
resource API. These services are built around business capabilities and
independently deployable by fully automated deployment machinery.
There is a bare minimum of centralized management of these services,
which may be written in different programming languages and use
different data storage technologies.
-- James Lewis and Martin Fowler
Что такое микросервисы?
21
23. In short, the microservice architectural style is an approach to developing
a single application as a suite of small services, each running in its own
process and communicating with lightweight mechanisms, often an HTTP
resource API. These services are built around business capabilities and
independently deployable by fully automated deployment machinery.
There is a bare minimum of centralized management of these services,
which may be written in different programming languages and use
different data storage technologies.
-- James Lewis and Martin Fowler
Что такое микросервисы?
23
25. In short, the microservice architectural style is an approach to developing
a single application as a suite of small services, each running in its own
process and communicating with lightweight mechanisms, often an HTTP
resource API. These services are built around business capabilities and
independently deployable by fully automated deployment machinery.
There is a bare minimum of centralized management of these services,
which may be written in different programming languages and use
different data storage technologies.
-- James Lewis and Martin Fowler
Что такое микросервисы?
25
29. Принцип LSD
- L языков программирования
- S в среднем фреймворков на язык
- D типов источников данных
complexity = L * S * D
29
30. Пример
- три языка программирования
- два в среднем фреймворка на язык
- семь типов источников данных
- legacy WS, mongo db
- хранимые процедуры, JDBC-templates
- elasticsearch, neo4j
- мишкина база
complexity = 3 * 2 * 7 = 42 (!)
30
68. Парадокс (де)централизации микросервисов
Чтобы эффективно работать с распределенными
приложениями, нужно иметь очень хорошие
централизованные библиотеки/инструменты
Например: логирование, health-чеки, метрики,
обработку программных ошибок
68
69. Парадокс (де)централизации микросервисов
Чтобы эффективно работать с распределенными
приложениями, нужно иметь очень хорошие
централизованные библиотеки/инструменты
Но: не выносите бизнес-логику или доменные объекты
69
70. LSD вам в помощь
min (L * S * D) -> max (D)
70
72. Высокие теории
Sam Newman “Building Microservices”
Martin Fowler “Microservice TradeOff” “Microservices”
“The Twelwe-Factor App” http://12factor.net
Hystrix: managing failures in distributed systems - Tomasz Nurkiewicz https:
//www.youtube.com/watch?v=JadVts_prtA
72