php is the king, nodejs is the prince and python is the fool - alessandro cinelli - codemotion rome...
TRANSCRIPT
![Page 1: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/1.jpg)
ROME 27-28 march 2015
Alessandro Cinelli (cirpo)
PHP is the king, nodejs is the prince, Python the fool
![Page 2: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/2.jpg)
ROME 27-28 march 2015
Alessandro Cinelli (cirpo)
![Page 3: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/3.jpg)
![Page 4: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/4.jpg)
dubai
![Page 5: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/5.jpg)
dubai
![Page 6: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/6.jpg)
namshi
![Page 7: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/7.jpg)
namshinamshi
![Page 8: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/8.jpg)
Namshi
almost 3 years old
~350 ppl
IT team ~15 ppl
million+ visits per month
serving the UAE and GCC
![Page 9: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/9.jpg)
![Page 10: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/10.jpg)
![Page 11: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/11.jpg)
![Page 12: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/12.jpg)
![Page 13: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/13.jpg)
![Page 14: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/14.jpg)
![Page 15: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/15.jpg)
![Page 16: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/16.jpg)
ARCHITECTURE
![Page 17: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/17.jpg)
a monolithic architecture
![Page 18: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/18.jpg)
so far so good… but we started growing…
![Page 19: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/19.jpg)
“we need a brand new feature for the warehouse…”
![Page 20: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/20.jpg)
SOA
![Page 21: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/21.jpg)
Service Oriented Architecture
![Page 22: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/22.jpg)
“A software design based on discrete software components, "services", that collectively
provide the functionalities of the larger software application”
– A.Nadalin (@_odino_)
![Page 23: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/23.jpg)
“Microservice Architecture" […] a particular way of designing software applications as suites of
independently deployable services…”
– M.Fowler
FULL STACK IS DEAD!
![Page 24: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/24.jpg)
services as LEGO bricks
![Page 25: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/25.jpg)
UNIX Philosophy
“Write programs that do one thing and do it well.”
![Page 26: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/26.jpg)
SOA BENEFITS
![Page 27: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/27.jpg)
SOA BENEFITS
scalability
![Page 28: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/28.jpg)
SOA BENEFITS
scalability avoid single point of failure
![Page 29: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/29.jpg)
SOA BENEFITS
scalability avoid single point of failure easier and faster deploys
![Page 30: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/30.jpg)
SOA BENEFITS
scalability avoid single point of failure easier and faster deploys isolation
![Page 31: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/31.jpg)
SOA BENEFITS
scalability avoid single point of failure easier and faster deploys isolation maintainability
![Page 32: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/32.jpg)
SOA BENEFITS
scalability avoid single point of failure easier and faster deploys isolation maintainability easier to replace existing parts
![Page 33: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/33.jpg)
How do you connect services?
![Page 34: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/34.jpg)
HTTP
A protocol that is almost 25 years old and is here to stay!
![Page 35: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/35.jpg)
GET vs POST
![Page 36: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/36.jpg)
GET vs POST“The difference is that in
a GET request you have the parameters in the url ,
with
a POST the parameters are in the request’s body”
answered by 80% of candidates during the interview
![Page 37: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/37.jpg)
![Page 38: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/38.jpg)
“you don’t know HTTP? you shall not pass”
- Gandalf
![Page 39: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/39.jpg)
RabbitMq
![Page 40: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/40.jpg)
using crons!
![Page 41: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/41.jpg)
RabbitMq
publish consume
q u e u e
![Page 44: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/44.jpg)
RabbitMq
Language and protocol format agnostic
![Page 45: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/45.jpg)
RabbitMq
Language and protocol format agnostic You can easily create an event driven architecture
![Page 46: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/46.jpg)
RabbitMq
Language and protocol format agnostic You can easily create an event driven architecture Messages stay in the queue if a service goes down
![Page 47: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/47.jpg)
RabbitMq
Language and protocol format agnostic You can easily create an event driven architecture Messages stay in the queue if a service goes down Too many messages? add more consumers!
![Page 48: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/48.jpg)
PHP
![Page 49: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/49.jpg)
PHPIt follows standards (PSR-*)
![Page 50: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/50.jpg)
PHPIt follows standards (PSR-*)
Decoupled components
![Page 51: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/51.jpg)
PHPIt follows standards (PSR-*)
Decoupled components
Huge and active opensource community
![Page 52: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/52.jpg)
PHPIt follows standards (PSR-*)
Decoupled components
Huge and active opensource community
Easy to plug in your domain code
![Page 53: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/53.jpg)
PHPIt follows standards (PSR-*)
Decoupled components
Huge and active opensource community
Easy to plug in your domain code
Not just a framework, but a project…
![Page 54: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/54.jpg)
PHPIt follows standards (PSR-*)
Decoupled components
Huge and active opensource community
Easy to plug in your domain code
Not just a framework, but a project…
Designed starting from the HTTP protocol
![Page 55: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/55.jpg)
PHP
bundle -> app -> service
![Page 56: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/56.jpg)
PHP
UserBundle
WarehouseBundle
CheckoutBundle
ProductBundle
[…]
![Page 57: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/57.jpg)
Once you have a SOLID set of api foundation you can easily start building other awesome applications
![Page 58: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/58.jpg)
PHP - Silex
the PHP micro-framework based on Symfony2 Components
![Page 59: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/59.jpg)
PHP - Silex
![Page 60: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/60.jpg)
Let’s eat those apis!
![Page 61: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/61.jpg)
Javascript
![Page 62: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/62.jpg)
JavascriptTwo way data-binding Single page application Built-in services on top of XHR Routing Controller Model
![Page 63: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/63.jpg)
JavascriptTwo way data-binding Single page application Built-in services on top of XHR Routing Controller Model
it’s a MVW framework: Model-View-Whatever
![Page 64: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/64.jpg)
Javascript
![Page 65: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/65.jpg)
Javascript
![Page 66: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/66.jpg)
Javascript
![Page 67: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/67.jpg)
Javascript
![Page 68: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/68.jpg)
party time!
![Page 69: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/69.jpg)
FROM STATEFUL TO STATELESS
Removed server sessions Sessions on the client (localstorage)
![Page 70: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/70.jpg)
STATELESS
JSON Web Signaturehttp://tools.ietf.org/html/draft-jones-json-web-signature-04
![Page 72: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/72.jpg)
PHP -JWS
![Page 73: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/73.jpg)
PHP -JWS
![Page 74: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/74.jpg)
double party time!
![Page 75: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/75.jpg)
let’s do the same with the desktop website!
![Page 76: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/76.jpg)
some customers were experiencing some issues…
![Page 77: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/77.jpg)
JAVASCRIPT
![Page 78: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/78.jpg)
JAVASCRIPT
![Page 79: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/79.jpg)
JAVASCRIPT
![Page 80: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/80.jpg)
we rebuilt the desktop website in two weeks!
![Page 81: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/81.jpg)
JAVASCRIPT
Rapid application development Quick setup Event driven Javascript!
why node?
![Page 82: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/82.jpg)
github.com/namshi/mockserver
mockserver mock your APIs in a matter of seconds!
JAVASCRIPT
![Page 83: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/83.jpg)
JAVASCRIPT
![Page 84: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/84.jpg)
JAVASCRIPT
mockserver
![Page 85: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/85.jpg)
JAVASCRIPTusers_GET.mock file
mockserver
![Page 86: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/86.jpg)
JAVASCRIPT
mockserver
![Page 88: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/88.jpg)
JAVASCRIPT
shisha
.smoke file
![Page 89: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/89.jpg)
JAVASCRIPT
shisha
![Page 90: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/90.jpg)
REDIS
![Page 91: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/91.jpg)
REDISKey types: lists, hashes, sets, sorted sets
![Page 92: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/92.jpg)
REDISKey types: lists, hashes, sets, sorted sets Persistent to disk
![Page 93: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/93.jpg)
REDISKey types: lists, hashes, sets, sorted sets Persistent to disk Up to 512MB per key
![Page 94: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/94.jpg)
REDISKey types: lists, hashes, sets, sorted sets Persistent to disk Up to 512MB per key Pub/sub
![Page 95: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/95.jpg)
REDISKey types: lists, hashes, sets, sorted sets Persistent to disk Up to 512MB per key Pub/sub Transactions with optimistic locking
![Page 97: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/97.jpg)
PYTHON
![Page 98: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/98.jpg)
PYTHONData analysis
Small app with flask
Sys scripts
![Page 99: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/99.jpg)
DOCKER
![Page 100: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/100.jpg)
“Operating-system-level virtualization is a virtualization method where the kernel of an
operating system allows for multiple isolated user space instances, instead of just one.
Such instances, often called CONTAINERS, or jails, may look and feel like a real server from
the point of view of its owners and users.”
http://en.wikipedia.org/wiki/Docker_%28software%29
![Page 101: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/101.jpg)
![Page 102: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/102.jpg)
lego
![Page 103: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/103.jpg)
![Page 104: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/104.jpg)
![Page 105: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/105.jpg)
![Page 106: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/106.jpg)
![Page 107: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/107.jpg)
ONE CONTAINER =
ONE COMMAND
![Page 108: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/108.jpg)
DIFFERENCE BETWEEN A VM AND DOCKER
HOST OS
GUEST OS
HYPERVISOR
BIN/ LIBS
APP A
APP CAPP B
GUEST OS
BIN/ LIBS
APP Z
APP HAPP B
GUEST OS
BIN/ LIBS
APP A
APP DAPP L
HOST OSDOCKER ENGINE
BIN/ LIBS
APP ABIN/ LIBS
APP ZBIN/ LIBS
APP DBIN/ LIBS
APP B{ {
VM
![Page 109: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/109.jpg)
CURRENT ARCHITECTURE
other clients
![Page 110: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/110.jpg)
WHAT’S NEXT?
(more)
(maybe)
![Page 111: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/111.jpg)
il mondo è bello perché è vario
The world is beautiful because it is varied
il mondo è bello perché è vario
![Page 112: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/112.jpg)
il mondo è bello perché è vario
The world is beautiful because it is varied
open your mind…
![Page 113: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/113.jpg)
use the right tool
![Page 114: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/114.jpg)
you can solve problems in different ways
![Page 116: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/116.jpg)
thanks
![Page 117: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/117.jpg)
tech.namshi.com/join-us
tech.namshi.com
github.com/namshi
@TechNamshi we are hiring!
![Page 118: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/118.jpg)
thanks
![Page 119: PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cinelli - Codemotion Rome 2015](https://reader033.vdocuments.us/reader033/viewer/2022042818/55b2012bbb61eb224c8b464e/html5/thumbnails/119.jpg)
https://farm3.staticflickr.com/2199/2365883747_3a5c753719_o.jpg https://www.flickr.com/photos/karen_roe/8912245799
https://www.flickr.com/photos/anaxila/367953499/sizes/l https://www.flickr.com/photos/onigiri_chang/5356325784/sizes/o/
http://www.slideshare.net/odino/soa-with-symfony2-confoo-2014-in-montreal-ca https://www.flickr.com/photos/ejpphoto/2314610838/sizes/o/
https://www.flickr.com/photos/cesarastudillo/3981364314/sizes/l https://www.flickr.com/photos/piers_nye/2501994750/sizes/o/
https://www.flickr.com/photos/36247316@N00/3108399560/sizes/o/ https://www.flickr.com/photos/ironpoison_photos_69/9604127837/sizes/k/
https://www.flickr.com/photos/chrisschoenbohm/5104367911/sizes/l
credits