Top Banner
memonic Scalable applications with HTTP Patrice Neff, co-founder Memonic [email protected] twitter.com/pneff 20100407
16

Scalable applications with HTTP

Jul 03, 2015

Download

Technology

Patrice Neff

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.
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Scalable applications with HTTP

memonic

Scalable applications with HTTPPatrice Neff, co-founder Memonic

[email protected]/pneff

20100407

Page 2: Scalable applications with HTTP

© memonic

Memonic

• Founded in 2009

• Your personal digital notebook

• Easy web research

• Try it out for free: www.memonic.com

Page 3: Scalable applications with HTTP

© memonic

About me

• Web developer

• Co-Founder Memonic

• Previously frontend developer at local.ch

• Details & Blog: patrice.ch

Page 4: Scalable applications with HTTP

© memonic

I’ll talk about...

• Service-oriented architectures

• Motivation

• HTTP, the protocol

• Real-world example

Page 6: Scalable applications with HTTP

Internet

Web ServerDB

© memonic

Service-oriented architectures

Internet

Frontend

Service 1 Service 3Service 2

Page 7: Scalable applications with HTTP

© 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

Page 8: Scalable applications with HTTP

© 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

Page 9: Scalable applications with HTTP

© memonic

Disadvantages

• Complex full-picture view

• Performance

• Data joins

©Eddi 07

Page 10: Scalable applications with HTTP

© memonic

HTTP

• RFC 2616 defines HTTP 1.1

• Text protocol is debuggable

• Solved problems:• Caching

• Compression

• Error handling

• Authentication

• Content negotiation

• Documentation

Page 11: Scalable applications with HTTP

© 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>...

Page 12: Scalable applications with HTTP

© 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

Page 13: Scalable applications with HTTP

© 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"}

Page 14: Scalable applications with HTTP

© memonic

Memonic Architecture

Internet

Frontend

staticpagegeoip

browser

html_cleanupmime

user label storage

screenshot

index

pipeline

Page 15: Scalable applications with HTTP

© memonic

Links

http://www.memonic.com/user/pneff/set/presentation-http-scalability

or: http://mem.to/t/1Fsc

Page 16: Scalable applications with HTTP

memonic

Thank you!Patrice Neff, co-founder Memonic

[email protected]/pneff

20100407