View
363
Download
2
Category
Preview:
DESCRIPTION
Talks about the HTTP protocol and how it can be used for a service-oriented architecture. This was presented at the Internet Briefing developer conference on April 7, 2010 in Zurich, Switzerland.
Citation preview
memonic
Scalable applications with HTTPPatrice Neff, co-founder Memonic
patrice@memonic.comtwitter.com/pneff
20100407
© memonic
Memonic
• Founded in 2009
• Your personal digital notebook
• Easy web research
• Try it out for free: www.memonic.com
© memonic
About me
• Web developer
• Co-Founder Memonic
• Previously frontend developer at local.ch
• Details & Blog: patrice.ch
© memonic
I’ll talk about...
• Service-oriented architectures
• Motivation
• HTTP, the protocol
• Real-world example
© memonic
Glossary
Performance Scalability
©Prosper973 ©Kelinz1
Internet
Web ServerDB
© memonic
Service-oriented architectures
Internet
Frontend
Service 1 Service 3Service 2
© memonic
Key points
• Dependencies local to service• Database
• Queue
• Synchronization
• Try the simplest service that works
• Services are the new classes?Internet
Frontend
Service 1 Service 3Service 2
© memonic
Motivation
• Modularity• Team separation
• Clear boundaries
• Easier migrations / replacements
• Re-use of services
• Best tool for the job• Programming language
• Dependencies (Database, Queue, ...)
• Scalability
© memonic
Disadvantages
• Complex full-picture view
• Performance
• Data joins
©Eddi 07
© memonic
HTTP
• RFC 2616 defines HTTP 1.1
• Text protocol is debuggable
• Solved problems:• Caching
• Compression
• Error handling
• Authentication
• Content negotiation
• Documentation
© memonic
HTTP Example
GET /intl/en/about.html HTTP/1.1Host: www.google.ch
HTTP/1.1 200 OKDate: Wed, 24 Mar 2010 20:51:06 GMTExpires: -1Cache-Control: private, max-age=0Content-Type: text/html; charset=ISO-8859-1Server: gwsX-XSS-Protection: 0
<!doctype html>...
© memonic
Caching
• Cache-Control response header:• Allow or prohibit caching
• Specify cache validity
• ETag response header:• Client can validate it’s cache content
• Avoids re-transmission of content
© memonic
Caching Example
GET /1/83.76.244.123 HTTP/1.1Host: geoipAccept: application/json
HTTP/1.1 200 OKCache-Control: max-age=31536000Expires: Fri, 25 Mar 2011 17:28:44 GMTContent-Type: application/json; charset=UTF-8Content-MD5: a59a841c05fdddef931399ef2275f6d3
{"country_code": "CH"}
© memonic
Memonic Architecture
Internet
Frontend
staticpagegeoip
browser
html_cleanupmime
user label storage
screenshot
index
pipeline
© memonic
Links
http://www.memonic.com/user/pneff/set/presentation-http-scalability
or: http://mem.to/t/1Fsc
memonic
Thank you!Patrice Neff, co-founder Memonic
patrice@memonic.comtwitter.com/pneff
20100407
Recommended