Splitting up your web app

27
How do you, like, split your web site up? You know what I mean? A tech talk at Paperless Post by Alex Payne November 2012

description

 

Transcript of Splitting up your web app

Page 1: 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

Page 2: Splitting up your web app
Page 3: Splitting up your web app
Page 4: Splitting up your web app
Page 5: Splitting up your web app

How do you organize the code for your site?

Beginner:

Page 6: Splitting up your web app

site.php

Page 7: Splitting up your web app

site.php

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

Page 8: Splitting up your web app

db.phpsite.php

Page 9: Splitting up your web app

db.phpsite.php

helpers.php

Page 10: Splitting up your web app

person.php auth.phplogin.php

Model View Controller

Page 11: Splitting up your web app
Page 12: Splitting up your web app

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

talk to one another?

Advancing:

Page 13: Splitting up your web app

dat_app

Page 14: Splitting up your web app

dat_app

Page 15: Splitting up your web app

dat_app

Databaseas point of coordination

nightly.rb

Page 16: Splitting up your web app

dat_app

Databasestoreas point of coordination

nightly.rb

Page 17: Splitting up your web app

dat_app

Cacheas point of coordination

hourly.rb

Page 18: Splitting up your web app

dat_app

Message Queues

worker1

worker2

Page 19: Splitting up your web app

RPCvia native serialization

dat_app

worker1

worker2search

chat

DRb

Page 20: Splitting up your web app

dat_app

worker1

worker2search

chat

RPCvia JSON

Page 21: Splitting up your web app

dat_app

worker1

worker2search

chat

RPCpro-style

Page 22: Splitting up your web app

«pause»

Page 23: Splitting up your web app

search

chat

site.php

Page 24: Splitting up your web app

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

WE STILL HAVEN'TTALKED ABOUT:

Page 25: Splitting up your web app

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

really quickly.

Page 26: Splitting up your web app

2. This is why the future belongs to PaaS.

Page 27: Splitting up your web app

Thanks!