SlideShare a Scribd company logo
Symfony
e micro (mica tanto)
servizi
A bit of history…
Symfony e micro (non così tanto) services
Peaks on gen - jun - aug up to 70 M pg/mth
Peaks during big matches
Symfony e micro (non così tanto) services
PaaS Platform as a Service
(almost) Zero configuration
Put the code “on the cloud” and you’re done
Symfony e micro (non così tanto) services
In the beginning there was…
Symfony e micro (non così tanto) services
Hard limits on resource (e.g 50 db con)
Deploy via ftp (sf cache mess)
Blackbox: No realtime log, no access
PHP 5.3
Microservices FTW!
Symfony e micro (non così tanto) services
Symfony e micro (non così tanto) services
Symfony e micro (non così tanto) services
micro vs macro?
orchestration?
maintenance?
security?
test?
micro vs macro
How many ways can you split
an app?
Symfony e micro (non così tanto) services
Web: the main web (sf1)
Mobile: mobile version (sf components)
Vxl: community site (sf2 v2.8)
Talk: api for comments, votes, ratings (sf2 v2.8)
Adv: api for ads serving (sf2 v2.8)
Media: api for images mgnt (sf2 v2.8)
Symfony e micro (non così tanto) services
Talk api
/queue

/comments

/comments/totals

/comments/{idComment}

/comments/publish

/comments/{idComment}/votes

/comments/{idComment}/votes/{idVote}

/comments/best-users

/comments/week-best-users

/comments-with-replies

/users/{userId}/statistic

/users/{userId}/comments

/articles/most-commented-today
Media api
/collections

/collections/{idCollection}

/files

/files/multiple

/files/{idFile}

/files/{idFile}/publish
Why small is better?
Symfony e micro (non così tanto) services
Lines Of Code
Fits in my head
https://www.infoq.com/presentations/microservices-replaceability-
consistency
Symfony e micro (non così tanto) services
How services can interact?
Client Side
S1
S2
S3
Page
UI1 UI2
UI3
Symfony e micro (non così tanto) services
Symfony e micro (non così tanto) services
Client knows the endpoint
Endpoints are public (caching!)
Async loading, progressive enhancement
Server Side
S1
S2
S3
ProxyUI
Symfony e micro (non così tanto) services
Symfony e micro (non così tanto) services
Symfony e micro (non così tanto) services
Client knows only one endpoint
Do not expose the underlying architecture
Provide high level apis
Symfony e micro (non così tanto) services
What if something goes wrong?
Symfony e micro (non così tanto) services
All services are on subdomains
vxl.calciomercato.com
www.calciomercato.com
Login set cookie on .calciomercato.com
web
vxl
login Cookie
PHPSESSID: b22j6…
Domain: .calciomercato.com
Api services are token based
talk.calciomercato.com
adv.calciomercato.com
media.calciomercato.com
token expires with session
Deploy
How can we deploy a feature
involving a single service?
How can you deploy a feature
involving n services?
Keep Backward Compatibility!
What if you are removing an endpoint?
What if you are adding an endpoint?
What if you are modifying an endpoint?
Maintenance
n smaller app to keep updated
MicroKernelTrait
Testing
Test a service in isolation
Symfony e micro (non così tanto) services
Symfony e micro (non così tanto) services
Test interaction of several
services?
S1
S2
S3
SUT
What we learned so far?
Michele Orselli
CTO@Ideato
_orso_
micheleorselli / ideatosrl
mo@ideato.it
Thank you!
https://joind.in/talk/92907
https://electric-cloud.com/blog/author/ecloud/page/5/
http://www.magnasoma.com/content/images/Magnasoma-Monolith-3-01.jpg
https://sudo.hailoapp.com/assets/posts/journey-to-microservices/wheel-of-doom-
highlighted.png
http://www.arabamerica.com/wp-content/uploads/2016/05/20160422-the-wire-so-and-so-
animated-gif-1.gif
http://blogs.versionone.com/agile-development/wp-content/uploads/sites/4/2013/04/
ContextMap2.png
https://cdn.infoq.com/statics_s1_20161011-0321_2/resource/articles/qcon-london-2015/en/
resources/8-a.jpg
http://www.uqasar.eu/wp-content/uploads/2014/05/Metrics.jpg
http://pad1.whstatic.com/images/thumb/8/8c/Cheat-at-Card-Games-Step-3.jpg/728px-Cheat-
at-Card-Games-Step-3.jpg

More Related Content

PDF
Vagrant for real (codemotion rome 2016)
ODP
Abstract Symfony2 CMF
KEY
Building a-self-sufficient-team
PDF
Server side data sync for mobile apps with silex
PDF
Exposing M2M to the REST of us
PDF
A recommendation engine for your php application
PDF
Hopping in clouds - phpuk 17
PDF
Dependency Management with Composer
Vagrant for real (codemotion rome 2016)
Abstract Symfony2 CMF
Building a-self-sufficient-team
Server side data sync for mobile apps with silex
Exposing M2M to the REST of us
A recommendation engine for your php application
Hopping in clouds - phpuk 17
Dependency Management with Composer

Similar to Symfony e micro (non così tanto) services (20)

PDF
Microservice architecture
PPTX
Think Small To Go Big - Introduction To Microservices
PPTX
Microservices.pptx
PPTX
Microservices pros and cons dark
PPTX
PHP Symfony MicroServices Migration @MeeticTech
PPTX
A soa approximation on symfony
PPTX
A SOA approximation on symfony
PPTX
Microservices pros and cons
PDF
Microservices for java architects it-symposium-2015-09-15
PDF
Building Microservices Software practics
PDF
Microservices pros and cons - houston tech fest
PDF
Microservice Architecture
PDF
meetPHP#8 - PHP startups prototypes
PDF
Microservices - when, why and how incontrodevops.it
PPTX
Microservices
PDF
Scaling PHP apps
PDF
Scaling symfony apps
PDF
PHP Frameworks and Symfony
PPTX
Grokking microservices in 5 minutes
PPTX
Yuriy Chapran - Building microservices.
Microservice architecture
Think Small To Go Big - Introduction To Microservices
Microservices.pptx
Microservices pros and cons dark
PHP Symfony MicroServices Migration @MeeticTech
A soa approximation on symfony
A SOA approximation on symfony
Microservices pros and cons
Microservices for java architects it-symposium-2015-09-15
Building Microservices Software practics
Microservices pros and cons - houston tech fest
Microservice Architecture
meetPHP#8 - PHP startups prototypes
Microservices - when, why and how incontrodevops.it
Microservices
Scaling PHP apps
Scaling symfony apps
PHP Frameworks and Symfony
Grokking microservices in 5 minutes
Yuriy Chapran - Building microservices.
Ad

More from Michele Orselli (20)

PDF
Tackling Tech Debt with Rector
PDF
Comunicare, condividere e mantenere decisioni architetturali nei team di svil...
PDF
A dive into Symfony 4
PDF
A recommendation engine for your applications codemotion ams
PDF
A recommendation engine for your applications phpday
PDF
Hopping in clouds: a tale of migration from one cloud provider to another
PDF
Vagrant for real codemotion (moar tips! ;-))
PDF
Migrare a Symfony 3
PDF
Vagrant for real
PDF
Implementing data sync apis for mibile apps @cloudconf
PDF
Continuous, continuous, continuous
PDF
Deploy a PHP App on Google App Engine
PDF
Implementing Server Side Data Synchronization for Mobile Apps
PDF
Deploy a php app on Google App Engine
PDF
PDF
Manage a project portfolio
PDF
Developing sustainable php projects
PDF
Zend Framework 2 per chi viene da Symfony2
PDF
BDD - Buzzword Driven Development - Build the next cool app for fun and for.....
PDF
Extreme automation
Tackling Tech Debt with Rector
Comunicare, condividere e mantenere decisioni architetturali nei team di svil...
A dive into Symfony 4
A recommendation engine for your applications codemotion ams
A recommendation engine for your applications phpday
Hopping in clouds: a tale of migration from one cloud provider to another
Vagrant for real codemotion (moar tips! ;-))
Migrare a Symfony 3
Vagrant for real
Implementing data sync apis for mibile apps @cloudconf
Continuous, continuous, continuous
Deploy a PHP App on Google App Engine
Implementing Server Side Data Synchronization for Mobile Apps
Deploy a php app on Google App Engine
Manage a project portfolio
Developing sustainable php projects
Zend Framework 2 per chi viene da Symfony2
BDD - Buzzword Driven Development - Build the next cool app for fun and for.....
Extreme automation
Ad

Recently uploaded (20)

PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PPTX
Odoo POS Development Services by CandidRoot Solutions
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
System and Network Administraation Chapter 3
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PPT
Introduction Database Management System for Course Database
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PPTX
Introduction to Artificial Intelligence
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
Softaken Excel to vCard Converter Software.pdf
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Design an Analysis of Algorithms II-SECS-1021-03
Odoo Companies in India – Driving Business Transformation.pdf
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
How to Choose the Right IT Partner for Your Business in Malaysia
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Odoo POS Development Services by CandidRoot Solutions
Operating system designcfffgfgggggggvggggggggg
System and Network Administraation Chapter 3
Adobe Illustrator 28.6 Crack My Vision of Vector Design
CHAPTER 2 - PM Management and IT Context
Wondershare Filmora 15 Crack With Activation Key [2025
Introduction Database Management System for Course Database
Upgrade and Innovation Strategies for SAP ERP Customers
2025 Textile ERP Trends: SAP, Odoo & Oracle
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Introduction to Artificial Intelligence
PTS Company Brochure 2025 (1).pdf.......
Softaken Excel to vCard Converter Software.pdf
VVF-Customer-Presentation2025-Ver1.9.pptx

Symfony e micro (non così tanto) services