История одного кастомного маркетплейса и его эволюция с нуля
До энтерпрайз решения
Как правильно готовить монолитную архитектуру и почему не стоит использовать микросервисы везде и всегда
Как можно балансировать между требованием бизнеса и техническим долгом
4. ● NO microservice way: what is this?
● NOT about TDD, BDD, DDD, EDD,
EventSourcing, CQRS, каратэ,
кунг-фу и много страшных слов…
● Without code
Let’s begin about...
7. Let’s begin
actually
about
● Main domains in ecommerce apps
● Marketplace 3-years evolution
● Build architecture of …
Let’s begin actually
about...
8. Let’s begin
actually
about
● Main domains in ecommerce apps
● Marketplace 3-years evolution
● Build architecture of …
● Monolith!
Let’s begin actually
about...
16. FrontSite
(ZF2)
Concept idea: Use SOA
● Magento 1.x
● Custom app
● Akeneo
Magento
(ecommerce engine)
Elasticsearch
Akeneo
(PIM)
Customers
Backend
A long time ago in a
galaxy far far away
17. FrontSite
(ZF2)
● Easy bootstrap
● Fast & scalable storage
● Fulltext search, filters & aggregates built-in
Magento
(ecommerce engine)
Elasticsearch
Akeneo
(PIM)
Customers
Backend
A long time ago in a
galaxy far far away
18. FrontSite
(ZF2)
● Ready to handle shopping cart
● Checkout processing
● Order Management
● Seamless requests from front
Magento
(ecommerce engine)
Elasticsearch
Akeneo
(PIM)
Customers
Backend
A long time ago in a
galaxy far far away
19. FrontSite
(ZF2)
● Akeneo - ready PIM system
● PIM - Product Information Management
● Symfony + MongoDB
● Multichannel import / export connectors
Magento
(ecommerce engine)
Elasticsearch
Akeneo
(PIM)
Customers
Backend
A long time ago in a
galaxy far far away
25. First results
● Try (!not think) ready solutions as MVP
● Not use universal combines for unique
business problems
26. First results
● Try (!not think) ready solutions as MVP
● Not use universal combines for unique
business problems
● Custom solution - minimize relations
27. First results
● Try (!not think) ready solutions as MVP
● Not use universal combines for unique
business problems
● Custom solution - minimize relations
28. Monoliths are different
Zend Framework 2
MVC Factories DI
IoC
Services
Configs
Modularity
Apigility
Doctrine
ZfcUser
ScnSocialAuth
...
29. Negative moments
Zend Framework 2
MVC Factories DI
IoC
Services
Configs
Modularity
Apigility
Doctrine
ZfcUser
ScnSocialAuth
...
❖ What about update to
ZF3, PHP7, etc??
❖ Dependency HELL!
30.
31. ● No need duplicate clients behavior
Front site
Mobile App
Admin app
GatewayAPI
User
microservice
Catalog
microservice
Order
microservice
Microservices?
32. ● No need duplicate clients behavior
● Easy upgrade
Front site
Mobile App
Admin app
GatewayAPI
User
microservice
Catalog
microservice
Order
microservice
Microservices?
33. ● No need duplicate clients behavior
● Easy upgrade
● Develop in parallel
Front site
Mobile App
Admin app
GatewayAPI
User
microservice
Catalog
microservice
Order
microservice
Microservices?
34. ● No need duplicate clients behavior
● Easy upgrade
● Develop in parallel
● Scalability
Front site
Mobile App
Admin app
GatewayAPI
User
microservice
Catalog
microservice
Order
microservice
Microservices?
35. Front site
Mobile App
Admin app
GatewayAPI
User
microservice
Catalog
microservice
Order
microservice
Microservices? No!
● Increased size code
36. Front site
Mobile App
Admin app
GatewayAPI
User
microservice
Catalog
microservice
Order
microservice
Microservices? No!
● Increased size code
● Duplicate infrastructure code
Validate::email()
Validate::email()
37. Front site
Mobile App
Admin app
GatewayAPI
User
microservice
Catalog
microservice
Order
microservice
Microservices? No!
● Increased size code
● Duplicate infrastructure code
● Communications?
Validate::email()
Validate::email()
39. How to deal?
Can not update XXX XXX don’t support YYY
● Analysis & search
root causes of problems
Solutions:
● Remove XXX - 15h
● Add support YYY - 24h
52. ● Ecommerce - this is hard
● Monolith - this is not hard (32k LLOC) &
can be fast (4 devs)
Final results
53. ● Ecommerce - this is hard
● Monolith - this is not hard (32k LLOC) &
can be fast (4 devs)
● Firstly - business problem solving
Final results
54. ● Ecommerce - this is hard
● Monolith - this is not hard (32k LLOC) &
can be fast (4 devs)
● Firstly - business problem solving
● Secondly - refactoring
Final results
55. ● Ecommerce - this is hard
● Monolith - this is not hard (32k LLOC) &
can be fast (4 devs)
● Firstly - business problem solving
● Secondly - refactoring
● Include estimates on refactoring
Final results
56. ● Ecommerce - this is hard
● Monolith - this is not hard (32k LLOC) &
can be fast (4 devs)
● Firstly - business problem solving
● Secondly - refactoring
● Include estimates on refactoring
● Ping-Pong with clients
Final results