Splitting up your web app

Post on 15-Jan-2015

2.658 views 0 download

Tags:

description

 

Transcript of Splitting up your web app

How do you, like,split your web site up?You know what I mean?

A tech talk at Paperless Postby Alex PayneNovember 2012

How do you organize the code for your site?

Beginner:

site.php

site.php

class Page {}class Login extends Page {}...

db.phpsite.php

db.phpsite.php

helpers.php

person.php auth.phplogin.php

Model View Controller

How do you break a web application into multipleprograms? How do they

talk to one another?

Advancing:

dat_app

dat_app

dat_app

Databaseas point of coordination

nightly.rb

dat_app

Databasestoreas point of coordination

nightly.rb

dat_app

Cacheas point of coordination

hourly.rb

dat_app

Message Queues

worker1

worker2

RPCvia native serialization

dat_app

worker1

worker2search

chat

DRb

dat_app

worker1

worker2search

chat

RPCvia JSON

dat_app

worker1

worker2search

chat

RPCpro-style

«pause»

search

chat

site.php

‣ Monitoring‣ Multi-datacenter support‣ Service discovery‣ Deployment‣ Schema migrations‣ Analytics/data mining‣ ....

WE STILL HAVEN'TTALKED ABOUT:

1. Web development isn't inherently difficult, but it gets really challenging

really quickly.

2. This is why the future belongs to PaaS.

Thanks!