SlideShare a Scribd company logo
Microservice 
architecture 
Žilvinas Kuusas 
VilniusPHP 0x19, 2014
Who am I? 
Žilvinas Kuusas 
lead developer @ Estina / iSign.io 
t: @kuusas 
e: zilvinas@kuusas.lt
What is a microservice? 
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. 
Martin Fowler 
http://martinfowler.com/articles/microservices.html
Microservice 
● No long-term relationships with technology 
stack 
● Easy to adopt emerging technologies 
● Loose coupling 
● Single responsibility 
● Fault isolation 
● Scalability
UNIX philosophy 
rename 's/Airplane/Flight/' `find -name "*Airplane*.php”`
UNIX philosophy 
ls . | sort | tail -n 2 | sort -r | tail -n 1 | cut -c8-21
Microservice architecture 
Microservice architecture
Monolithic application 
Reality - monolithic application
Service Oriented Architecture (SOA)
Benefits of monolith 
● Quick development 
● Simple deployments 
● Easy to scale 
● Everything in one place
Drawbacks of monolith 
● Lots of LOC 
● Slow builds 
● Development is hard to scale 
● Continuous deployments becomes difficult 
● Scaling application can be difficult 
● Requires a long-term commitment to a 
technology stack
Microservices 
Think about microservice as small, single-purpose 
application. Simple?
Small application 
● Runs as individual process 
● Smaller means easier for developers to 
maintain 
● Changes does not affect whole system 
● Faster to build and deploy 
● ...or throw away and rewrite
Small application 
● Each service has it’s own database 
● Code duplication vs. code coupling 
● Shared code - libraries
Small application 
“If service is bigger than your 
head then it’s too big” 
Internet
Deploy independently 
● Each microservice runs in it’s own process, 
so deployment of one service won’t affect 
the whole application 
● Easier to scale development 
● Faster feature releases 
● Less downtime 
● Develop, build and deploy!
Flexible solutions 
● Modular 
● Polyglot data persistence 
● Multi-framework
Right tool for the job
Application: two layers 
● System layer 
○ gateway: defines interfaces, communication 
mechanisms 
○ rarely changes 
● Service layer 
○ services with different internal architectures 
○ different technology stacks 
○ evolves rapidly
Application: two layers 
Application: two layers
When to use it? 
● In the beginning it will slow down the 
development 
● Later - refactoring might be painful 
● It’s easier to merge services than split 
monolith into services 
● ...unless monolith already has loosely-coupled 
modules
Be realistic 
“Focus on building services that make 
development and deployment easier - not just 
tiny services”
Nanoservice antipattern 
A nanoservice is a service whose overhead 
(communications, maintenance, and so on) 
outweighs its utility.
How services communicate? 
● HTTP/REST 
● AMQP for asynchronous requests 
● Event Sourcing 
● Streams
Databases 
● DB instance per service 
● Relational databases, NoSQL, others
How to start? 
● ESI (Edge Side Includes) 
● RabbitMQ 
● Gearman 
● PHP multithreading
Shared data problem 
● ServiceA needs to read data which is 
managed by ServiceB
Solution A 
ServiceA calls ServiceB for data 
● Benefits 
○ quick implementation 
○ data is always fresh 
● Drawbacks 
○ slows down ServiceA 
○ ServiceB might be down at the moment
Solution B 
Data replication 
● Benefits 
○ availability 
○ speed 
● Drawbacks 
○ data replication overhead
Performance 
● Latency is your foe 
● Everything done asynchronously - no 
problem 
● Keep communication between services as 
effective as possible. No chit-chats.
Drawbacks 
● High level of distributed complexity
Automation 
● Automate everything 
○ CI 
○ deployments 
○ configuration 
○ error logging 
○ monitoring
PHP world 
PHP world
Symfony2 app as service 
● Symfony2 isn’t heavy… 
● ...if you know how to circumcise it 
● Avoid standard edition 
● Create your own minimal application 
http://www.whitewashing.de/2014/04/24/symfony_hello_world.html
Symfony2 benefits 
● HttpKernel component is one of the 
greatest things happened in PHP world in 
years 
● SF2 DIC: flexible and extendable way to 
grow your project 
● Console component for CLI utilities 
● Standardised solutions
Symfony2 as gateway 
● Basic SF2 application with dumb controllers 
for routing services 
○ via messaging 
● Rendering main views for ESI
Challenges 
● Define service boundaries 
● Continuous Integration 
○ Continuous Deployment 
● Error logging 
● Monitoring 
● System tests 
○ Consumer tests
More challenges... 
● Security layer 
● Shared configuration 
● Shared assets 
● Graceful degradation
Who is using 
~120 services to generate 1 page 
http://highscalability.com/amazon-architecture 
Has 600+ services in total 
http://techblog.netflix.com/ 
http://www.ebaytechblog.com/
Why microservice? 
● Scale development 
● Scale your application 
● Application availability 
● Use right tools for the job 
● Whole system becomes faster if done right
Dig more 
● Martin Fowler http://martinfowler. 
com/articles/microservices.html 
● Fred George https://www.youtube.com/watch? 
v=2rKEveL55TY 
● http://blog.arkency.com/2014/07/microservices-72- 
resources/
What’s next? 
Reactive architecture? 
http://www.reactivemanifesto.org/
Questions?
Join us 
hello@estina.com
Ad

More Related Content

What's hot (20)

Microservices Architecture
Microservices ArchitectureMicroservices Architecture
Microservices Architecture
Joshua Costa
 
Microservice Architecture
Microservice ArchitectureMicroservice Architecture
Microservice Architecture
Nguyen Tung
 
Introduction to microservices
Introduction to microservicesIntroduction to microservices
Introduction to microservices
Paulo Gandra de Sousa
 
Microservices Architecture - Bangkok 2018
Microservices Architecture - Bangkok 2018Microservices Architecture - Bangkok 2018
Microservices Architecture - Bangkok 2018
Araf Karsh Hamid
 
REST & RESTful Web Services
REST & RESTful Web ServicesREST & RESTful Web Services
REST & RESTful Web Services
Halil Burak Cetinkaya
 
Understanding MicroSERVICE Architecture with Java & Spring Boot
Understanding MicroSERVICE Architecture with Java & Spring BootUnderstanding MicroSERVICE Architecture with Java & Spring Boot
Understanding MicroSERVICE Architecture with Java & Spring Boot
Kashif Ali Siddiqui
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
MahmoudZidan41
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
Rishabh Indoria
 
Monoliths and Microservices
Monoliths and Microservices Monoliths and Microservices
Monoliths and Microservices
Bozhidar Bozhanov
 
Microservices, DevOps & SRE
Microservices, DevOps & SREMicroservices, DevOps & SRE
Microservices, DevOps & SRE
Araf Karsh Hamid
 
Prometheus design and philosophy
Prometheus design and philosophy   Prometheus design and philosophy
Prometheus design and philosophy
Docker, Inc.
 
Microservices Docker Kubernetes Istio Kanban DevOps SRE
Microservices Docker Kubernetes Istio Kanban DevOps SREMicroservices Docker Kubernetes Istio Kanban DevOps SRE
Microservices Docker Kubernetes Istio Kanban DevOps SRE
Araf Karsh Hamid
 
Introduction to Nexus Repository Manager.pdf
Introduction to Nexus Repository Manager.pdfIntroduction to Nexus Repository Manager.pdf
Introduction to Nexus Repository Manager.pdf
Knoldus Inc.
 
Loki - like prometheus, but for logs
Loki - like prometheus, but for logsLoki - like prometheus, but for logs
Loki - like prometheus, but for logs
Juraj Hantak
 
REST-API introduction for developers
REST-API introduction for developersREST-API introduction for developers
REST-API introduction for developers
Patrick Savalle
 
REST API and CRUD
REST API and CRUDREST API and CRUD
REST API and CRUD
Prem Sanil
 
Microservice intro
Microservice introMicroservice intro
Microservice intro
ramesh_sharma
 
What is DevOps | DevOps Introduction | DevOps Training | DevOps Tutorial | Ed...
What is DevOps | DevOps Introduction | DevOps Training | DevOps Tutorial | Ed...What is DevOps | DevOps Introduction | DevOps Training | DevOps Tutorial | Ed...
What is DevOps | DevOps Introduction | DevOps Training | DevOps Tutorial | Ed...
Edureka!
 
What is an API?
What is an API?What is an API?
What is an API?
Muhammad Zuhdi
 
Introduction to Docker - 2017
Introduction to Docker - 2017Introduction to Docker - 2017
Introduction to Docker - 2017
Docker, Inc.
 
Microservices Architecture
Microservices ArchitectureMicroservices Architecture
Microservices Architecture
Joshua Costa
 
Microservice Architecture
Microservice ArchitectureMicroservice Architecture
Microservice Architecture
Nguyen Tung
 
Microservices Architecture - Bangkok 2018
Microservices Architecture - Bangkok 2018Microservices Architecture - Bangkok 2018
Microservices Architecture - Bangkok 2018
Araf Karsh Hamid
 
Understanding MicroSERVICE Architecture with Java & Spring Boot
Understanding MicroSERVICE Architecture with Java & Spring BootUnderstanding MicroSERVICE Architecture with Java & Spring Boot
Understanding MicroSERVICE Architecture with Java & Spring Boot
Kashif Ali Siddiqui
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
MahmoudZidan41
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
Rishabh Indoria
 
Monoliths and Microservices
Monoliths and Microservices Monoliths and Microservices
Monoliths and Microservices
Bozhidar Bozhanov
 
Microservices, DevOps & SRE
Microservices, DevOps & SREMicroservices, DevOps & SRE
Microservices, DevOps & SRE
Araf Karsh Hamid
 
Prometheus design and philosophy
Prometheus design and philosophy   Prometheus design and philosophy
Prometheus design and philosophy
Docker, Inc.
 
Microservices Docker Kubernetes Istio Kanban DevOps SRE
Microservices Docker Kubernetes Istio Kanban DevOps SREMicroservices Docker Kubernetes Istio Kanban DevOps SRE
Microservices Docker Kubernetes Istio Kanban DevOps SRE
Araf Karsh Hamid
 
Introduction to Nexus Repository Manager.pdf
Introduction to Nexus Repository Manager.pdfIntroduction to Nexus Repository Manager.pdf
Introduction to Nexus Repository Manager.pdf
Knoldus Inc.
 
Loki - like prometheus, but for logs
Loki - like prometheus, but for logsLoki - like prometheus, but for logs
Loki - like prometheus, but for logs
Juraj Hantak
 
REST-API introduction for developers
REST-API introduction for developersREST-API introduction for developers
REST-API introduction for developers
Patrick Savalle
 
REST API and CRUD
REST API and CRUDREST API and CRUD
REST API and CRUD
Prem Sanil
 
What is DevOps | DevOps Introduction | DevOps Training | DevOps Tutorial | Ed...
What is DevOps | DevOps Introduction | DevOps Training | DevOps Tutorial | Ed...What is DevOps | DevOps Introduction | DevOps Training | DevOps Tutorial | Ed...
What is DevOps | DevOps Introduction | DevOps Training | DevOps Tutorial | Ed...
Edureka!
 
Introduction to Docker - 2017
Introduction to Docker - 2017Introduction to Docker - 2017
Introduction to Docker - 2017
Docker, Inc.
 

Viewers also liked (20)

Microservices Architecture
Microservices ArchitectureMicroservices Architecture
Microservices Architecture
Izzet Mustafaiev
 
Developing applications with a microservice architecture (svcc)
Developing applications with a microservice architecture (svcc)Developing applications with a microservice architecture (svcc)
Developing applications with a microservice architecture (svcc)
Chris Richardson
 
Microservices at Spotify
Microservices at SpotifyMicroservices at Spotify
Microservices at Spotify
Kevin Goldsmith
 
MicroService Architecture
MicroService ArchitectureMicroService Architecture
MicroService Architecture
Fred George
 
Informal invitation
Informal invitationInformal invitation
Informal invitation
melanisha
 
Creativity Lego เอก
 Creativity Lego เอก Creativity Lego เอก
Creativity Lego เอก
eakchait
 
Лабораторна робота LR4-5_4-5.1_kozachenko
Лабораторна робота LR4-5_4-5.1_kozachenkoЛабораторна робота LR4-5_4-5.1_kozachenko
Лабораторна робота LR4-5_4-5.1_kozachenko
kozachenko2019
 
Autonomic Application Delivery with Tonomi
Autonomic Application Delivery with TonomiAutonomic Application Delivery with Tonomi
Autonomic Application Delivery with Tonomi
Victoria Livschitz
 
Using Capifony for Symfony apps deployment.
Using Capifony for Symfony apps deployment.Using Capifony for Symfony apps deployment.
Using Capifony for Symfony apps deployment.
Žilvinas Kuusas
 
установка колонн летучек
установка колонн летучекустановка колонн летучек
установка колонн летучек
geoplast2007ru
 
Autonomic Management of Cloud Applications with Tonomi, Gluecon Keynote, 2015
Autonomic Management of Cloud Applications with Tonomi, Gluecon Keynote, 2015Autonomic Management of Cloud Applications with Tonomi, Gluecon Keynote, 2015
Autonomic Management of Cloud Applications with Tonomi, Gluecon Keynote, 2015
Victoria Livschitz
 
Makalah biologi
Makalah biologiMakalah biologi
Makalah biologi
melanisha
 
Revamping the math classroom
Revamping the math classroomRevamping the math classroom
Revamping the math classroom
camille541
 
High availability is not a luxury webcast
High availability is not a luxury webcastHigh availability is not a luxury webcast
High availability is not a luxury webcast
Gina Tragos
 
Autonomic Application Management with Qubell (and Docker)
Autonomic Application Management with Qubell (and Docker)Autonomic Application Management with Qubell (and Docker)
Autonomic Application Management with Qubell (and Docker)
Victoria Livschitz
 
технология селективной изоляции водопритока
технология селективной изоляции водопритокатехнология селективной изоляции водопритока
технология селективной изоляции водопритока
geoplast2007ru
 
Enterprise in your degree - Neil Coles
Enterprise in your degree - Neil ColesEnterprise in your degree - Neil Coles
Enterprise in your degree - Neil Coles
HEA_AH
 
Aleksander Królikowski
Aleksander KrólikowskiAleksander Królikowski
Aleksander Królikowski
Dysk
 
Ha cluster -Public to Private
Ha cluster -Public to PrivateHa cluster -Public to Private
Ha cluster -Public to Private
testslidesha12
 
Enhancing employability through enterprise education: BSc Business Enterprise...
Enhancing employability through enterprise education: BSc Business Enterprise...Enhancing employability through enterprise education: BSc Business Enterprise...
Enhancing employability through enterprise education: BSc Business Enterprise...
HEA_AH
 
Microservices Architecture
Microservices ArchitectureMicroservices Architecture
Microservices Architecture
Izzet Mustafaiev
 
Developing applications with a microservice architecture (svcc)
Developing applications with a microservice architecture (svcc)Developing applications with a microservice architecture (svcc)
Developing applications with a microservice architecture (svcc)
Chris Richardson
 
Microservices at Spotify
Microservices at SpotifyMicroservices at Spotify
Microservices at Spotify
Kevin Goldsmith
 
MicroService Architecture
MicroService ArchitectureMicroService Architecture
MicroService Architecture
Fred George
 
Informal invitation
Informal invitationInformal invitation
Informal invitation
melanisha
 
Creativity Lego เอก
 Creativity Lego เอก Creativity Lego เอก
Creativity Lego เอก
eakchait
 
Лабораторна робота LR4-5_4-5.1_kozachenko
Лабораторна робота LR4-5_4-5.1_kozachenkoЛабораторна робота LR4-5_4-5.1_kozachenko
Лабораторна робота LR4-5_4-5.1_kozachenko
kozachenko2019
 
Autonomic Application Delivery with Tonomi
Autonomic Application Delivery with TonomiAutonomic Application Delivery with Tonomi
Autonomic Application Delivery with Tonomi
Victoria Livschitz
 
Using Capifony for Symfony apps deployment.
Using Capifony for Symfony apps deployment.Using Capifony for Symfony apps deployment.
Using Capifony for Symfony apps deployment.
Žilvinas Kuusas
 
установка колонн летучек
установка колонн летучекустановка колонн летучек
установка колонн летучек
geoplast2007ru
 
Autonomic Management of Cloud Applications with Tonomi, Gluecon Keynote, 2015
Autonomic Management of Cloud Applications with Tonomi, Gluecon Keynote, 2015Autonomic Management of Cloud Applications with Tonomi, Gluecon Keynote, 2015
Autonomic Management of Cloud Applications with Tonomi, Gluecon Keynote, 2015
Victoria Livschitz
 
Makalah biologi
Makalah biologiMakalah biologi
Makalah biologi
melanisha
 
Revamping the math classroom
Revamping the math classroomRevamping the math classroom
Revamping the math classroom
camille541
 
High availability is not a luxury webcast
High availability is not a luxury webcastHigh availability is not a luxury webcast
High availability is not a luxury webcast
Gina Tragos
 
Autonomic Application Management with Qubell (and Docker)
Autonomic Application Management with Qubell (and Docker)Autonomic Application Management with Qubell (and Docker)
Autonomic Application Management with Qubell (and Docker)
Victoria Livschitz
 
технология селективной изоляции водопритока
технология селективной изоляции водопритокатехнология селективной изоляции водопритока
технология селективной изоляции водопритока
geoplast2007ru
 
Enterprise in your degree - Neil Coles
Enterprise in your degree - Neil ColesEnterprise in your degree - Neil Coles
Enterprise in your degree - Neil Coles
HEA_AH
 
Aleksander Królikowski
Aleksander KrólikowskiAleksander Królikowski
Aleksander Królikowski
Dysk
 
Ha cluster -Public to Private
Ha cluster -Public to PrivateHa cluster -Public to Private
Ha cluster -Public to Private
testslidesha12
 
Enhancing employability through enterprise education: BSc Business Enterprise...
Enhancing employability through enterprise education: BSc Business Enterprise...Enhancing employability through enterprise education: BSc Business Enterprise...
Enhancing employability through enterprise education: BSc Business Enterprise...
HEA_AH
 
Ad

Similar to Microservice architecture (20)

Microservices
MicroservicesMicroservices
Microservices
NewsCred Dhaka
 
Ledingkart Meetup #1: Monolithic to microservices in action
Ledingkart Meetup #1: Monolithic to microservices in actionLedingkart Meetup #1: Monolithic to microservices in action
Ledingkart Meetup #1: Monolithic to microservices in action
Mukesh Singh
 
Ato Z of Microservices Architecture by Systango
Ato Z of Microservices Architecture by SystangoAto Z of Microservices Architecture by Systango
Ato Z of Microservices Architecture by Systango
Systango
 
Introduction to Microservices Architecture - SECCOMP 2020
Introduction to Microservices Architecture - SECCOMP 2020Introduction to Microservices Architecture - SECCOMP 2020
Introduction to Microservices Architecture - SECCOMP 2020
Rodrigo Antonialli
 
Surviving microservices
Surviving microservicesSurviving microservices
Surviving microservices
Francesco Degrassi
 
micro services architecture (FrosCon2014)
micro services architecture (FrosCon2014)micro services architecture (FrosCon2014)
micro services architecture (FrosCon2014)
smancke
 
Yotpo microservices
Yotpo microservicesYotpo microservices
Yotpo microservices
Ron Barabash
 
linkerd.pdf
linkerd.pdflinkerd.pdf
linkerd.pdf
Vishwas N
 
The FN Project by Maximilian Jerg
The FN Project by Maximilian JergThe FN Project by Maximilian Jerg
The FN Project by Maximilian Jerg
Harald Schmaldienst
 
Not my problem - Delegating responsibility to infrastructure
Not my problem - Delegating responsibility to infrastructureNot my problem - Delegating responsibility to infrastructure
Not my problem - Delegating responsibility to infrastructure
Yshay Yaacobi
 
Building Microservices with .NET (speaker Anton Vasilenko, Binary Studio)
Building Microservices with .NET (speaker Anton Vasilenko, Binary Studio)Building Microservices with .NET (speaker Anton Vasilenko, Binary Studio)
Building Microservices with .NET (speaker Anton Vasilenko, Binary Studio)
Binary Studio
 
AppDev with Microservices
AppDev with MicroservicesAppDev with Microservices
AppDev with Microservices
Rishabh Dugar
 
Service-Mesh-Presentation.pdf
Service-Mesh-Presentation.pdfService-Mesh-Presentation.pdf
Service-Mesh-Presentation.pdf
chanhluc2112
 
Micro Front-End & Microservices - Plansoft
Micro Front-End & Microservices - PlansoftMicro Front-End & Microservices - Plansoft
Micro Front-End & Microservices - Plansoft
Miki Lombardi
 
Do You Need A Service Mesh?
Do You Need A Service Mesh?Do You Need A Service Mesh?
Do You Need A Service Mesh?
NGINX, Inc.
 
Microservices: an introduction
Microservices: an introductionMicroservices: an introduction
Microservices: an introduction
Daniel Baptista Dias
 
Unit No. II Architecture.pptx Cloud Microservices & Application
Unit No. II Architecture.pptx Cloud Microservices & ApplicationUnit No. II Architecture.pptx Cloud Microservices & Application
Unit No. II Architecture.pptx Cloud Microservices & Application
Priyanka855141
 
Evolution of Application Development
Evolution of Application DevelopmentEvolution of Application Development
Evolution of Application Development
WSO2
 
Evolution of Application Development
Evolution of Application DevelopmentEvolution of Application Development
Evolution of Application Development
kshanth2101
 
Nats in action a real time microservices architecture handled by nats
Nats in action   a real time microservices architecture handled by natsNats in action   a real time microservices architecture handled by nats
Nats in action a real time microservices architecture handled by nats
Raul Perez
 
Ledingkart Meetup #1: Monolithic to microservices in action
Ledingkart Meetup #1: Monolithic to microservices in actionLedingkart Meetup #1: Monolithic to microservices in action
Ledingkart Meetup #1: Monolithic to microservices in action
Mukesh Singh
 
Ato Z of Microservices Architecture by Systango
Ato Z of Microservices Architecture by SystangoAto Z of Microservices Architecture by Systango
Ato Z of Microservices Architecture by Systango
Systango
 
Introduction to Microservices Architecture - SECCOMP 2020
Introduction to Microservices Architecture - SECCOMP 2020Introduction to Microservices Architecture - SECCOMP 2020
Introduction to Microservices Architecture - SECCOMP 2020
Rodrigo Antonialli
 
micro services architecture (FrosCon2014)
micro services architecture (FrosCon2014)micro services architecture (FrosCon2014)
micro services architecture (FrosCon2014)
smancke
 
Yotpo microservices
Yotpo microservicesYotpo microservices
Yotpo microservices
Ron Barabash
 
The FN Project by Maximilian Jerg
The FN Project by Maximilian JergThe FN Project by Maximilian Jerg
The FN Project by Maximilian Jerg
Harald Schmaldienst
 
Not my problem - Delegating responsibility to infrastructure
Not my problem - Delegating responsibility to infrastructureNot my problem - Delegating responsibility to infrastructure
Not my problem - Delegating responsibility to infrastructure
Yshay Yaacobi
 
Building Microservices with .NET (speaker Anton Vasilenko, Binary Studio)
Building Microservices with .NET (speaker Anton Vasilenko, Binary Studio)Building Microservices with .NET (speaker Anton Vasilenko, Binary Studio)
Building Microservices with .NET (speaker Anton Vasilenko, Binary Studio)
Binary Studio
 
AppDev with Microservices
AppDev with MicroservicesAppDev with Microservices
AppDev with Microservices
Rishabh Dugar
 
Service-Mesh-Presentation.pdf
Service-Mesh-Presentation.pdfService-Mesh-Presentation.pdf
Service-Mesh-Presentation.pdf
chanhluc2112
 
Micro Front-End & Microservices - Plansoft
Micro Front-End & Microservices - PlansoftMicro Front-End & Microservices - Plansoft
Micro Front-End & Microservices - Plansoft
Miki Lombardi
 
Do You Need A Service Mesh?
Do You Need A Service Mesh?Do You Need A Service Mesh?
Do You Need A Service Mesh?
NGINX, Inc.
 
Unit No. II Architecture.pptx Cloud Microservices & Application
Unit No. II Architecture.pptx Cloud Microservices & ApplicationUnit No. II Architecture.pptx Cloud Microservices & Application
Unit No. II Architecture.pptx Cloud Microservices & Application
Priyanka855141
 
Evolution of Application Development
Evolution of Application DevelopmentEvolution of Application Development
Evolution of Application Development
WSO2
 
Evolution of Application Development
Evolution of Application DevelopmentEvolution of Application Development
Evolution of Application Development
kshanth2101
 
Nats in action a real time microservices architecture handled by nats
Nats in action   a real time microservices architecture handled by natsNats in action   a real time microservices architecture handled by nats
Nats in action a real time microservices architecture handled by nats
Raul Perez
 
Ad

More from Žilvinas Kuusas (9)

Use Symfony Messenger Component and CQRS!
Use Symfony Messenger Component and CQRS!Use Symfony Messenger Component and CQRS!
Use Symfony Messenger Component and CQRS!
Žilvinas Kuusas
 
Ansible: infrastructure automation for everyone
Ansible: infrastructure automation for everyoneAnsible: infrastructure automation for everyone
Ansible: infrastructure automation for everyone
Žilvinas Kuusas
 
Automated cryptocurrency trading
Automated cryptocurrency tradingAutomated cryptocurrency trading
Automated cryptocurrency trading
Žilvinas Kuusas
 
Continuous delivery
Continuous deliveryContinuous delivery
Continuous delivery
Žilvinas Kuusas
 
Continuously delivering value
Continuously delivering valueContinuously delivering value
Continuously delivering value
Žilvinas Kuusas
 
Code reviews
Code reviewsCode reviews
Code reviews
Žilvinas Kuusas
 
Baby steps to Domain-Driven Design
Baby steps to Domain-Driven DesignBaby steps to Domain-Driven Design
Baby steps to Domain-Driven Design
Žilvinas Kuusas
 
Community and open source
Community and open sourceCommunity and open source
Community and open source
Žilvinas Kuusas
 
Using Capifony for Symfony apps deployment (updated)
Using Capifony for Symfony apps deployment (updated)Using Capifony for Symfony apps deployment (updated)
Using Capifony for Symfony apps deployment (updated)
Žilvinas Kuusas
 
Use Symfony Messenger Component and CQRS!
Use Symfony Messenger Component and CQRS!Use Symfony Messenger Component and CQRS!
Use Symfony Messenger Component and CQRS!
Žilvinas Kuusas
 
Ansible: infrastructure automation for everyone
Ansible: infrastructure automation for everyoneAnsible: infrastructure automation for everyone
Ansible: infrastructure automation for everyone
Žilvinas Kuusas
 
Automated cryptocurrency trading
Automated cryptocurrency tradingAutomated cryptocurrency trading
Automated cryptocurrency trading
Žilvinas Kuusas
 
Continuously delivering value
Continuously delivering valueContinuously delivering value
Continuously delivering value
Žilvinas Kuusas
 
Baby steps to Domain-Driven Design
Baby steps to Domain-Driven DesignBaby steps to Domain-Driven Design
Baby steps to Domain-Driven Design
Žilvinas Kuusas
 
Using Capifony for Symfony apps deployment (updated)
Using Capifony for Symfony apps deployment (updated)Using Capifony for Symfony apps deployment (updated)
Using Capifony for Symfony apps deployment (updated)
Žilvinas Kuusas
 

Recently uploaded (20)

Douwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License codeDouwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License code
aneelaramzan63
 
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdfMicrosoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
TechSoup
 
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Dele Amefo
 
The Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdfThe Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdf
drewplanas10
 
Designing AI-Powered APIs on Azure: Best Practices& Considerations
Designing AI-Powered APIs on Azure: Best Practices& ConsiderationsDesigning AI-Powered APIs on Azure: Best Practices& Considerations
Designing AI-Powered APIs on Azure: Best Practices& Considerations
Dinusha Kumarasiri
 
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
University of Hawai‘i at Mānoa
 
Landscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature ReviewLandscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature Review
Hironori Washizaki
 
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New VersionPixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
saimabibi60507
 
How can one start with crypto wallet development.pptx
How can one start with crypto wallet development.pptxHow can one start with crypto wallet development.pptx
How can one start with crypto wallet development.pptx
laravinson24
 
Adobe After Effects Crack FREE FRESH version 2025
Adobe After Effects Crack FREE FRESH version 2025Adobe After Effects Crack FREE FRESH version 2025
Adobe After Effects Crack FREE FRESH version 2025
kashifyounis067
 
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
F-Secure Freedome VPN 2025 Crack Plus Activation  New VersionF-Secure Freedome VPN 2025 Crack Plus Activation  New Version
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
saimabibi60507
 
Societal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainabilitySocietal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainability
Jordi Cabot
 
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRYLEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
NidaFarooq10
 
Adobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest VersionAdobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest Version
kashifyounis067
 
Solidworks Crack 2025 latest new + license code
Solidworks Crack 2025 latest new + license codeSolidworks Crack 2025 latest new + license code
Solidworks Crack 2025 latest new + license code
aneelaramzan63
 
Kubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptxKubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptx
CloudScouts
 
Revolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptxRevolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptx
nidhisingh691197
 
Top 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docxTop 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docx
Portli
 
Download YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full ActivatedDownload YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full Activated
saniamalik72555
 
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
AxisTechnolabs
 
Douwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License codeDouwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License code
aneelaramzan63
 
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdfMicrosoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
TechSoup
 
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Dele Amefo
 
The Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdfThe Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdf
drewplanas10
 
Designing AI-Powered APIs on Azure: Best Practices& Considerations
Designing AI-Powered APIs on Azure: Best Practices& ConsiderationsDesigning AI-Powered APIs on Azure: Best Practices& Considerations
Designing AI-Powered APIs on Azure: Best Practices& Considerations
Dinusha Kumarasiri
 
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
University of Hawai‘i at Mānoa
 
Landscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature ReviewLandscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature Review
Hironori Washizaki
 
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New VersionPixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
saimabibi60507
 
How can one start with crypto wallet development.pptx
How can one start with crypto wallet development.pptxHow can one start with crypto wallet development.pptx
How can one start with crypto wallet development.pptx
laravinson24
 
Adobe After Effects Crack FREE FRESH version 2025
Adobe After Effects Crack FREE FRESH version 2025Adobe After Effects Crack FREE FRESH version 2025
Adobe After Effects Crack FREE FRESH version 2025
kashifyounis067
 
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
F-Secure Freedome VPN 2025 Crack Plus Activation  New VersionF-Secure Freedome VPN 2025 Crack Plus Activation  New Version
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
saimabibi60507
 
Societal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainabilitySocietal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainability
Jordi Cabot
 
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRYLEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
NidaFarooq10
 
Adobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest VersionAdobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest Version
kashifyounis067
 
Solidworks Crack 2025 latest new + license code
Solidworks Crack 2025 latest new + license codeSolidworks Crack 2025 latest new + license code
Solidworks Crack 2025 latest new + license code
aneelaramzan63
 
Kubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptxKubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptx
CloudScouts
 
Revolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptxRevolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptx
nidhisingh691197
 
Top 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docxTop 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docx
Portli
 
Download YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full ActivatedDownload YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full Activated
saniamalik72555
 
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
AxisTechnolabs
 

Microservice architecture

  • 1. Microservice architecture Žilvinas Kuusas VilniusPHP 0x19, 2014
  • 2. Who am I? Žilvinas Kuusas lead developer @ Estina / iSign.io t: @kuusas e: [email protected]
  • 3. What is a microservice? 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. Martin Fowler http://martinfowler.com/articles/microservices.html
  • 4. Microservice ● No long-term relationships with technology stack ● Easy to adopt emerging technologies ● Loose coupling ● Single responsibility ● Fault isolation ● Scalability
  • 5. UNIX philosophy rename 's/Airplane/Flight/' `find -name "*Airplane*.php”`
  • 6. UNIX philosophy ls . | sort | tail -n 2 | sort -r | tail -n 1 | cut -c8-21
  • 8. Monolithic application Reality - monolithic application
  • 10. Benefits of monolith ● Quick development ● Simple deployments ● Easy to scale ● Everything in one place
  • 11. Drawbacks of monolith ● Lots of LOC ● Slow builds ● Development is hard to scale ● Continuous deployments becomes difficult ● Scaling application can be difficult ● Requires a long-term commitment to a technology stack
  • 12. Microservices Think about microservice as small, single-purpose application. Simple?
  • 13. Small application ● Runs as individual process ● Smaller means easier for developers to maintain ● Changes does not affect whole system ● Faster to build and deploy ● ...or throw away and rewrite
  • 14. Small application ● Each service has it’s own database ● Code duplication vs. code coupling ● Shared code - libraries
  • 15. Small application “If service is bigger than your head then it’s too big” Internet
  • 16. Deploy independently ● Each microservice runs in it’s own process, so deployment of one service won’t affect the whole application ● Easier to scale development ● Faster feature releases ● Less downtime ● Develop, build and deploy!
  • 17. Flexible solutions ● Modular ● Polyglot data persistence ● Multi-framework
  • 18. Right tool for the job
  • 19. Application: two layers ● System layer ○ gateway: defines interfaces, communication mechanisms ○ rarely changes ● Service layer ○ services with different internal architectures ○ different technology stacks ○ evolves rapidly
  • 20. Application: two layers Application: two layers
  • 21. When to use it? ● In the beginning it will slow down the development ● Later - refactoring might be painful ● It’s easier to merge services than split monolith into services ● ...unless monolith already has loosely-coupled modules
  • 22. Be realistic “Focus on building services that make development and deployment easier - not just tiny services”
  • 23. Nanoservice antipattern A nanoservice is a service whose overhead (communications, maintenance, and so on) outweighs its utility.
  • 24. How services communicate? ● HTTP/REST ● AMQP for asynchronous requests ● Event Sourcing ● Streams
  • 25. Databases ● DB instance per service ● Relational databases, NoSQL, others
  • 26. How to start? ● ESI (Edge Side Includes) ● RabbitMQ ● Gearman ● PHP multithreading
  • 27. Shared data problem ● ServiceA needs to read data which is managed by ServiceB
  • 28. Solution A ServiceA calls ServiceB for data ● Benefits ○ quick implementation ○ data is always fresh ● Drawbacks ○ slows down ServiceA ○ ServiceB might be down at the moment
  • 29. Solution B Data replication ● Benefits ○ availability ○ speed ● Drawbacks ○ data replication overhead
  • 30. Performance ● Latency is your foe ● Everything done asynchronously - no problem ● Keep communication between services as effective as possible. No chit-chats.
  • 31. Drawbacks ● High level of distributed complexity
  • 32. Automation ● Automate everything ○ CI ○ deployments ○ configuration ○ error logging ○ monitoring
  • 33. PHP world PHP world
  • 34. Symfony2 app as service ● Symfony2 isn’t heavy… ● ...if you know how to circumcise it ● Avoid standard edition ● Create your own minimal application http://www.whitewashing.de/2014/04/24/symfony_hello_world.html
  • 35. Symfony2 benefits ● HttpKernel component is one of the greatest things happened in PHP world in years ● SF2 DIC: flexible and extendable way to grow your project ● Console component for CLI utilities ● Standardised solutions
  • 36. Symfony2 as gateway ● Basic SF2 application with dumb controllers for routing services ○ via messaging ● Rendering main views for ESI
  • 37. Challenges ● Define service boundaries ● Continuous Integration ○ Continuous Deployment ● Error logging ● Monitoring ● System tests ○ Consumer tests
  • 38. More challenges... ● Security layer ● Shared configuration ● Shared assets ● Graceful degradation
  • 39. Who is using ~120 services to generate 1 page http://highscalability.com/amazon-architecture Has 600+ services in total http://techblog.netflix.com/ http://www.ebaytechblog.com/
  • 40. Why microservice? ● Scale development ● Scale your application ● Application availability ● Use right tools for the job ● Whole system becomes faster if done right
  • 41. Dig more ● Martin Fowler http://martinfowler. com/articles/microservices.html ● Fred George https://www.youtube.com/watch? v=2rKEveL55TY ● http://blog.arkency.com/2014/07/microservices-72- resources/
  • 42. What’s next? Reactive architecture? http://www.reactivemanifesto.org/