Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational...

58
Applications and Services in the Internet Jaakko Kangasharju Introduction Architectures for Internet Applications Client-Server Architectures Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured P2P Networks Applications and Services in the Internet Special Course in Data Communications Software (7 cr) Jaakko Kangasharju [email protected] Helsinki University of Technology Autumn 2008 Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 1 / 34

Transcript of Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational...

Page 1: Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured

Applicationsand Services

in the Internet

JaakkoKangasharju

Introduction

Architecturesfor InternetApplications

Client-ServerArchitecturesSession InitiationProtocol (SIP)

RepresentationalState Transfer(REST)

Peer-to-PeerArchitecturesUnstructured P2PNetworks

Structured P2PNetworks

Applications and Services in the InternetSpecial Course in Data Communications Software (7 cr)

Jaakko [email protected]

Helsinki University of Technology

Autumn 2008

Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 1 / 34

Page 2: Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured

Applicationsand Services

in the Internet

JaakkoKangasharju

Introduction

Architecturesfor InternetApplications

Client-ServerArchitecturesSession InitiationProtocol (SIP)

RepresentationalState Transfer(REST)

Peer-to-PeerArchitecturesUnstructured P2PNetworks

Structured P2PNetworks

Outline

1 Introduction

2 Architectures for Internet Applications

3 Client-Server Architectures

4 Peer-to-Peer Architectures

Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 2 / 34

Page 3: Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured

Applicationsand Services

in the Internet

JaakkoKangasharju

Introduction

Architecturesfor InternetApplications

Client-ServerArchitecturesSession InitiationProtocol (SIP)

RepresentationalState Transfer(REST)

Peer-to-PeerArchitecturesUnstructured P2PNetworks

Structured P2PNetworks

Outline

1 Introduction

2 Architectures for Internet Applications

3 Client-Server Architectures

4 Peer-to-Peer Architectures

Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 3 / 34

Page 4: Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured

Applicationsand Services

in the Internet

JaakkoKangasharju

Introduction

Architecturesfor InternetApplications

Client-ServerArchitecturesSession InitiationProtocol (SIP)

RepresentationalState Transfer(REST)

Peer-to-PeerArchitecturesUnstructured P2PNetworks

Structured P2PNetworks

Applications in the Internet

• Layered network architecture: Application layer abovetransport layer

• The end-to-end principle: Application functionality cannotimplemented as part of the communication subsystem

Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 4 / 34

Page 5: Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured

Applicationsand Services

in the Internet

JaakkoKangasharju

Introduction

Architecturesfor InternetApplications

Client-ServerArchitecturesSession InitiationProtocol (SIP)

RepresentationalState Transfer(REST)

Peer-to-PeerArchitecturesUnstructured P2PNetworks

Structured P2PNetworks

Applications in the Internet

• Layered network architecture: Application layer abovetransport layer

• The end-to-end principle: Application functionality cannotimplemented as part of the communication subsystem

Net Net Net Net

Trans

App

Trans

App

Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 4 / 34

Page 6: Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured

Applicationsand Services

in the Internet

JaakkoKangasharju

Introduction

Architecturesfor InternetApplications

Client-ServerArchitecturesSession InitiationProtocol (SIP)

RepresentationalState Transfer(REST)

Peer-to-PeerArchitecturesUnstructured P2PNetworks

Structured P2PNetworks

Applications in the Internet

• Layered network architecture: Application layer abovetransport layer

• The end-to-end principle: Application functionality cannotimplemented as part of the communication subsystem

Net Net Net Net

Trans

App

Trans

App

Net Net

Trans

App

Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 4 / 34

Page 7: Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured

Applicationsand Services

in the Internet

JaakkoKangasharju

Introduction

Architecturesfor InternetApplications

Client-ServerArchitecturesSession InitiationProtocol (SIP)

RepresentationalState Transfer(REST)

Peer-to-PeerArchitecturesUnstructured P2PNetworks

Structured P2PNetworks

Services in the Internet

• Services manage resources and provide access to them• Service-Oriented Architecture

• Loose coupling• Service composition

Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 5 / 34

Page 8: Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured

Applicationsand Services

in the Internet

JaakkoKangasharju

Introduction

Architecturesfor InternetApplications

Client-ServerArchitecturesSession InitiationProtocol (SIP)

RepresentationalState Transfer(REST)

Peer-to-PeerArchitecturesUnstructured P2PNetworks

Structured P2PNetworks

General Requirements

• Availability• Efficiency• Flexibility• Reliability• Scalability• Security• Simplicity

Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 6 / 34

Page 9: Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured

Applicationsand Services

in the Internet

JaakkoKangasharju

Introduction

Architecturesfor InternetApplications

Client-ServerArchitecturesSession InitiationProtocol (SIP)

RepresentationalState Transfer(REST)

Peer-to-PeerArchitecturesUnstructured P2PNetworks

Structured P2PNetworks

Outline

1 Introduction

2 Architectures for Internet Applications

3 Client-Server Architectures

4 Peer-to-Peer Architectures

Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 7 / 34

Page 10: Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured

Applicationsand Services

in the Internet

JaakkoKangasharju

Introduction

Architecturesfor InternetApplications

Client-ServerArchitecturesSession InitiationProtocol (SIP)

RepresentationalState Transfer(REST)

Peer-to-PeerArchitecturesUnstructured P2PNetworks

Structured P2PNetworks

Basic Service Architectures

• Certain architectures repeat themselves in multiple services• Different architectures needed for different priorities

Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 8 / 34

Page 11: Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured

Applicationsand Services

in the Internet

JaakkoKangasharju

Introduction

Architecturesfor InternetApplications

Client-ServerArchitecturesSession InitiationProtocol (SIP)

RepresentationalState Transfer(REST)

Peer-to-PeerArchitecturesUnstructured P2PNetworks

Structured P2PNetworks

Client-Server Architecture

C C C C

S

• Server host provides a service, client hosts connect to itdirectly

Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 9 / 34

Page 12: Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured

Applicationsand Services

in the Internet

JaakkoKangasharju

Introduction

Architecturesfor InternetApplications

Client-ServerArchitecturesSession InitiationProtocol (SIP)

RepresentationalState Transfer(REST)

Peer-to-PeerArchitecturesUnstructured P2PNetworks

Structured P2PNetworks

Client-Server Properties

• Simple and efficient• Security simple to do• Server a single point of failure⇒ Availability, reliability, scalability?

Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 10 / 34

Page 13: Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured

Applicationsand Services

in the Internet

JaakkoKangasharju

Introduction

Architecturesfor InternetApplications

Client-ServerArchitecturesSession InitiationProtocol (SIP)

RepresentationalState Transfer(REST)

Peer-to-PeerArchitecturesUnstructured P2PNetworks

Structured P2PNetworks

Enhancing Client-Server

• How to fix client-server’s problems?

• Replicate server, multiple identical servers remove singlepoint of failure

• Federate server, different areas of responsibility providescalability

Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 11 / 34

Page 14: Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured

Applicationsand Services

in the Internet

JaakkoKangasharju

Introduction

Architecturesfor InternetApplications

Client-ServerArchitecturesSession InitiationProtocol (SIP)

RepresentationalState Transfer(REST)

Peer-to-PeerArchitecturesUnstructured P2PNetworks

Structured P2PNetworks

Enhancing Client-Server

• How to fix client-server’s problems?• Replicate server, multiple identical servers remove singlepoint of failure

• Federate server, different areas of responsibility providescalability

Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 11 / 34

Page 15: Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured

Applicationsand Services

in the Internet

JaakkoKangasharju

Introduction

Architecturesfor InternetApplications

Client-ServerArchitecturesSession InitiationProtocol (SIP)

RepresentationalState Transfer(REST)

Peer-to-PeerArchitecturesUnstructured P2PNetworks

Structured P2PNetworks

Enhancing Client-Server

• How to fix client-server’s problems?• Replicate server, multiple identical servers remove singlepoint of failure

• Federate server, different areas of responsibility providescalability

Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 11 / 34

Page 16: Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured

Applicationsand Services

in the Internet

JaakkoKangasharju

Introduction

Architecturesfor InternetApplications

Client-ServerArchitecturesSession InitiationProtocol (SIP)

RepresentationalState Transfer(REST)

Peer-to-PeerArchitecturesUnstructured P2PNetworks

Structured P2PNetworks

Client-Mediator-Server Architecture

C C C C

MM M M

S S

• Mediator component added between client and server

Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 12 / 34

Page 17: Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured

Applicationsand Services

in the Internet

JaakkoKangasharju

Introduction

Architecturesfor InternetApplications

Client-ServerArchitecturesSession InitiationProtocol (SIP)

RepresentationalState Transfer(REST)

Peer-to-PeerArchitecturesUnstructured P2PNetworks

Structured P2PNetworks

Client-Mediator-Server vs. Client-Server

• Client-mediator-server more flexible• E.g., caching provides improved efficiency, scalability,availability

• End-to-end security harder• Increases complexity

Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 13 / 34

Page 18: Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured

Applicationsand Services

in the Internet

JaakkoKangasharju

Introduction

Architecturesfor InternetApplications

Client-ServerArchitecturesSession InitiationProtocol (SIP)

RepresentationalState Transfer(REST)

Peer-to-PeerArchitecturesUnstructured P2PNetworks

Structured P2PNetworks

Peer-to-Peer Architecture

P P

P P

P P

• All hosts equal, any host can provide service

Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 14 / 34

Page 19: Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured

Applicationsand Services

in the Internet

JaakkoKangasharju

Introduction

Architecturesfor InternetApplications

Client-ServerArchitecturesSession InitiationProtocol (SIP)

RepresentationalState Transfer(REST)

Peer-to-PeerArchitecturesUnstructured P2PNetworks

Structured P2PNetworks

Peer-to-Peer Properties

• Available, flexible, efficient• Depending on technology, can be scalable• How to find provided service?• Security and trust issues

Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 15 / 34

Page 20: Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured

Applicationsand Services

in the Internet

JaakkoKangasharju

Introduction

Architecturesfor InternetApplications

Client-ServerArchitecturesSession InitiationProtocol (SIP)

RepresentationalState Transfer(REST)

Peer-to-PeerArchitecturesUnstructured P2PNetworks

Structured P2PNetworks

Designing an Architecture

• Requirements phase• Using requirements to pick styles• Identifying components and their communication• Optimizing architecture

Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 16 / 34

Page 21: Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured

Applicationsand Services

in the Internet

JaakkoKangasharju

Introduction

Architecturesfor InternetApplications

Client-ServerArchitecturesSession InitiationProtocol (SIP)

RepresentationalState Transfer(REST)

Peer-to-PeerArchitecturesUnstructured P2PNetworks

Structured P2PNetworks

Deriving the Architectural Style

• Derive architectural style based on requirements• Two processes

• Assemble familiar building blocks until requirementssatisfied

• Identify constraints in requirements to limit design space• Different requirements lead to different fundamental styles• Fundamental styles combined to form overall style

Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 17 / 34

Page 22: Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured

Applicationsand Services

in the Internet

JaakkoKangasharju

Introduction

Architecturesfor InternetApplications

Client-ServerArchitecturesSession InitiationProtocol (SIP)

RepresentationalState Transfer(REST)

Peer-to-PeerArchitecturesUnstructured P2PNetworks

Structured P2PNetworks

Outline

1 Introduction

2 Architectures for Internet Applications

3 Client-Server ArchitecturesSession Initiation Protocol (SIP)Representational State Transfer (REST)

4 Peer-to-Peer Architectures

Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 18 / 34

Page 23: Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured

Applicationsand Services

in the Internet

JaakkoKangasharju

Introduction

Architecturesfor InternetApplications

Client-ServerArchitecturesSession InitiationProtocol (SIP)

RepresentationalState Transfer(REST)

Peer-to-PeerArchitecturesUnstructured P2PNetworks

Structured P2PNetworks

Outline

1 Introduction

2 Architectures for Internet Applications

3 Client-Server ArchitecturesSession Initiation Protocol (SIP)Representational State Transfer (REST)

4 Peer-to-Peer Architectures

Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 19 / 34

Page 24: Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured

Applicationsand Services

in the Internet

JaakkoKangasharju

Introduction

Architecturesfor InternetApplications

Client-ServerArchitecturesSession InitiationProtocol (SIP)

RepresentationalState Transfer(REST)

Peer-to-PeerArchitecturesUnstructured P2PNetworks

Structured P2PNetworks

SIP Basics

• Application-layer protocol for managing multimediasessions

• . . . nowadays, all kinds of sessions• Designed for extensibility• Proxy-based architecture

Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 20 / 34

Page 25: Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured

Applicationsand Services

in the Internet

JaakkoKangasharju

Introduction

Architecturesfor InternetApplications

Client-ServerArchitecturesSession InitiationProtocol (SIP)

RepresentationalState Transfer(REST)

Peer-to-PeerArchitecturesUnstructured P2PNetworks

Structured P2PNetworks

SIP Communication Model

C

P P

C

Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 21 / 34

Page 26: Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured

Applicationsand Services

in the Internet

JaakkoKangasharju

Introduction

Architecturesfor InternetApplications

Client-ServerArchitecturesSession InitiationProtocol (SIP)

RepresentationalState Transfer(REST)

Peer-to-PeerArchitecturesUnstructured P2PNetworks

Structured P2PNetworks

SIP Communication Model

C

P P

C

INVITE

Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 21 / 34

Page 27: Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured

Applicationsand Services

in the Internet

JaakkoKangasharju

Introduction

Architecturesfor InternetApplications

Client-ServerArchitecturesSession InitiationProtocol (SIP)

RepresentationalState Transfer(REST)

Peer-to-PeerArchitecturesUnstructured P2PNetworks

Structured P2PNetworks

SIP Communication Model

C

P P

C

INVITE

INVITE

INVITE

Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 21 / 34

Page 28: Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured

Applicationsand Services

in the Internet

JaakkoKangasharju

Introduction

Architecturesfor InternetApplications

Client-ServerArchitecturesSession InitiationProtocol (SIP)

RepresentationalState Transfer(REST)

Peer-to-PeerArchitecturesUnstructured P2PNetworks

Structured P2PNetworks

SIP Communication Model

C

P P

C

RINGING

RINGING

RINGING

Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 21 / 34

Page 29: Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured

Applicationsand Services

in the Internet

JaakkoKangasharju

Introduction

Architecturesfor InternetApplications

Client-ServerArchitecturesSession InitiationProtocol (SIP)

RepresentationalState Transfer(REST)

Peer-to-PeerArchitecturesUnstructured P2PNetworks

Structured P2PNetworks

SIP Communication Model

C

P P

C

OK

OK

OK

Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 21 / 34

Page 30: Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured

Applicationsand Services

in the Internet

JaakkoKangasharju

Introduction

Architecturesfor InternetApplications

Client-ServerArchitecturesSession InitiationProtocol (SIP)

RepresentationalState Transfer(REST)

Peer-to-PeerArchitecturesUnstructured P2PNetworks

Structured P2PNetworks

SIP Communication Model

C

P P

CACK

Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 21 / 34

Page 31: Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured

Applicationsand Services

in the Internet

JaakkoKangasharju

Introduction

Architecturesfor InternetApplications

Client-ServerArchitecturesSession InitiationProtocol (SIP)

RepresentationalState Transfer(REST)

Peer-to-PeerArchitecturesUnstructured P2PNetworks

Structured P2PNetworks

SIP Communication Model

C

P P

CSession

Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 21 / 34

Page 32: Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured

Applicationsand Services

in the Internet

JaakkoKangasharju

Introduction

Architecturesfor InternetApplications

Client-ServerArchitecturesSession InitiationProtocol (SIP)

RepresentationalState Transfer(REST)

Peer-to-PeerArchitecturesUnstructured P2PNetworks

Structured P2PNetworks

Outline

1 Introduction

2 Architectures for Internet Applications

3 Client-Server ArchitecturesSession Initiation Protocol (SIP)Representational State Transfer (REST)

4 Peer-to-Peer Architectures

Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 22 / 34

Page 33: Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured

Applicationsand Services

in the Internet

JaakkoKangasharju

Introduction

Architecturesfor InternetApplications

Client-ServerArchitecturesSession InitiationProtocol (SIP)

RepresentationalState Transfer(REST)

Peer-to-PeerArchitecturesUnstructured P2PNetworks

Structured P2PNetworks

The Web Architecture

• The Web an example of a scalable system• What are the principles that allow the Web to scale?

• A number of constraints identified as REST• Not all present in original Web, designed in afterwards

Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 23 / 34

Page 34: Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured

Applicationsand Services

in the Internet

JaakkoKangasharju

Introduction

Architecturesfor InternetApplications

Client-ServerArchitecturesSession InitiationProtocol (SIP)

RepresentationalState Transfer(REST)

Peer-to-PeerArchitecturesUnstructured P2PNetworks

Structured P2PNetworks

The Web Architecture

• The Web an example of a scalable system• What are the principles that allow the Web to scale?• A number of constraints identified as REST• Not all present in original Web, designed in afterwards

Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 23 / 34

Page 35: Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured

Applicationsand Services

in the Internet

JaakkoKangasharju

Introduction

Architecturesfor InternetApplications

Client-ServerArchitecturesSession InitiationProtocol (SIP)

RepresentationalState Transfer(REST)

Peer-to-PeerArchitecturesUnstructured P2PNetworks

Structured P2PNetworks

REST Primary Constraints

• Client–Stateless-server• Uniform interface• Hypermedia as the engine of application state

⇒ Scalable, flexible, simple⇒ Less efficient

Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 24 / 34

Page 36: Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured

Applicationsand Services

in the Internet

JaakkoKangasharju

Introduction

Architecturesfor InternetApplications

Client-ServerArchitecturesSession InitiationProtocol (SIP)

RepresentationalState Transfer(REST)

Peer-to-PeerArchitecturesUnstructured P2PNetworks

Structured P2PNetworks

REST Primary Constraints

• Client–Stateless-server• Uniform interface• Hypermedia as the engine of application state⇒ Scalable, flexible, simple

⇒ Less efficient

Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 24 / 34

Page 37: Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured

Applicationsand Services

in the Internet

JaakkoKangasharju

Introduction

Architecturesfor InternetApplications

Client-ServerArchitecturesSession InitiationProtocol (SIP)

RepresentationalState Transfer(REST)

Peer-to-PeerArchitecturesUnstructured P2PNetworks

Structured P2PNetworks

REST Primary Constraints

• Client–Stateless-server• Uniform interface• Hypermedia as the engine of application state⇒ Scalable, flexible, simple⇒ Less efficient

Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 24 / 34

Page 38: Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured

Applicationsand Services

in the Internet

JaakkoKangasharju

Introduction

Architecturesfor InternetApplications

Client-ServerArchitecturesSession InitiationProtocol (SIP)

RepresentationalState Transfer(REST)

Peer-to-PeerArchitecturesUnstructured P2PNetworks

Structured P2PNetworks

REST Primary Constraints

• Client–Stateless-server• Uniform interface• Hypermedia as the engine of application state⇒ Scalable, flexible, simple⇒ Less efficient

C S

Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 24 / 34

Page 39: Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured

Applicationsand Services

in the Internet

JaakkoKangasharju

Introduction

Architecturesfor InternetApplications

Client-ServerArchitecturesSession InitiationProtocol (SIP)

RepresentationalState Transfer(REST)

Peer-to-PeerArchitecturesUnstructured P2PNetworks

Structured P2PNetworks

REST Primary Constraints

• Client–Stateless-server• Uniform interface• Hypermedia as the engine of application state⇒ Scalable, flexible, simple⇒ Less efficient

C S

Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 24 / 34

Page 40: Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured

Applicationsand Services

in the Internet

JaakkoKangasharju

Introduction

Architecturesfor InternetApplications

Client-ServerArchitecturesSession InitiationProtocol (SIP)

RepresentationalState Transfer(REST)

Peer-to-PeerArchitecturesUnstructured P2PNetworks

Structured P2PNetworks

REST Primary Constraints

• Client–Stateless-server• Uniform interface• Hypermedia as the engine of application state⇒ Scalable, flexible, simple⇒ Less efficient

C SP

Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 24 / 34

Page 41: Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured

Applicationsand Services

in the Internet

JaakkoKangasharju

Introduction

Architecturesfor InternetApplications

Client-ServerArchitecturesSession InitiationProtocol (SIP)

RepresentationalState Transfer(REST)

Peer-to-PeerArchitecturesUnstructured P2PNetworks

Structured P2PNetworks

REST Primary Constraints

• Client–Stateless-server• Uniform interface• Hypermedia as the engine of application state⇒ Scalable, flexible, simple⇒ Less efficient

C SP

Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 24 / 34

Page 42: Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured

Applicationsand Services

in the Internet

JaakkoKangasharju

Introduction

Architecturesfor InternetApplications

Client-ServerArchitecturesSession InitiationProtocol (SIP)

RepresentationalState Transfer(REST)

Peer-to-PeerArchitecturesUnstructured P2PNetworks

Structured P2PNetworks

REST Primary Constraints

• Client–Stateless-server• Uniform interface• Hypermedia as the engine of application state⇒ Scalable, flexible, simple⇒ Less efficient

C SP G

Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 24 / 34

Page 43: Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured

Applicationsand Services

in the Internet

JaakkoKangasharju

Introduction

Architecturesfor InternetApplications

Client-ServerArchitecturesSession InitiationProtocol (SIP)

RepresentationalState Transfer(REST)

Peer-to-PeerArchitecturesUnstructured P2PNetworks

Structured P2PNetworks

REST Services

• How to build services without sessions?

• PUT, POST, and hypermedia• Benefit of statelessness: addresses are transmittable

Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 25 / 34

Page 44: Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured

Applicationsand Services

in the Internet

JaakkoKangasharju

Introduction

Architecturesfor InternetApplications

Client-ServerArchitecturesSession InitiationProtocol (SIP)

RepresentationalState Transfer(REST)

Peer-to-PeerArchitecturesUnstructured P2PNetworks

Structured P2PNetworks

REST Services

• How to build services without sessions?• PUT, POST, and hypermedia

• Benefit of statelessness: addresses are transmittable

Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 25 / 34

Page 45: Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured

Applicationsand Services

in the Internet

JaakkoKangasharju

Introduction

Architecturesfor InternetApplications

Client-ServerArchitecturesSession InitiationProtocol (SIP)

RepresentationalState Transfer(REST)

Peer-to-PeerArchitecturesUnstructured P2PNetworks

Structured P2PNetworks

REST Services

• How to build services without sessions?• PUT, POST, and hypermedia• Benefit of statelessness: addresses are transmittable

Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 25 / 34

Page 46: Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured

Applicationsand Services

in the Internet

JaakkoKangasharju

Introduction

Architecturesfor InternetApplications

Client-ServerArchitecturesSession InitiationProtocol (SIP)

RepresentationalState Transfer(REST)

Peer-to-PeerArchitecturesUnstructured P2PNetworks

Structured P2PNetworks

Outline

1 Introduction

2 Architectures for Internet Applications

3 Client-Server Architectures

4 Peer-to-Peer ArchitecturesUnstructured P2P NetworksStructured P2P Networks

Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 26 / 34

Page 47: Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured

Applicationsand Services

in the Internet

JaakkoKangasharju

Introduction

Architecturesfor InternetApplications

Client-ServerArchitecturesSession InitiationProtocol (SIP)

RepresentationalState Transfer(REST)

Peer-to-PeerArchitecturesUnstructured P2PNetworks

Structured P2PNetworks

Types of Peer-to-Peer Architectures

• Peer-to-peer used for two different applications

• Content search: unstructured P2P• Key-value lookup: structured P2P (distributed hash table)

Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 27 / 34

Page 48: Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured

Applicationsand Services

in the Internet

JaakkoKangasharju

Introduction

Architecturesfor InternetApplications

Client-ServerArchitecturesSession InitiationProtocol (SIP)

RepresentationalState Transfer(REST)

Peer-to-PeerArchitecturesUnstructured P2PNetworks

Structured P2PNetworks

Types of Peer-to-Peer Architectures

• Peer-to-peer used for two different applications• Content search: unstructured P2P

• Key-value lookup: structured P2P (distributed hash table)

Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 27 / 34

Page 49: Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured

Applicationsand Services

in the Internet

JaakkoKangasharju

Introduction

Architecturesfor InternetApplications

Client-ServerArchitecturesSession InitiationProtocol (SIP)

RepresentationalState Transfer(REST)

Peer-to-PeerArchitecturesUnstructured P2PNetworks

Structured P2PNetworks

Types of Peer-to-Peer Architectures

• Peer-to-peer used for two different applications• Content search: unstructured P2P• Key-value lookup: structured P2P (distributed hash table)

Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 27 / 34

Page 50: Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured

Applicationsand Services

in the Internet

JaakkoKangasharju

Introduction

Architecturesfor InternetApplications

Client-ServerArchitecturesSession InitiationProtocol (SIP)

RepresentationalState Transfer(REST)

Peer-to-PeerArchitecturesUnstructured P2PNetworks

Structured P2PNetworks

Outline

1 Introduction

2 Architectures for Internet Applications

3 Client-Server Architectures

4 Peer-to-Peer ArchitecturesUnstructured P2P NetworksStructured P2P Networks

Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 28 / 34

Page 51: Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured

Applicationsand Services

in the Internet

JaakkoKangasharju

Introduction

Architecturesfor InternetApplications

Client-ServerArchitecturesSession InitiationProtocol (SIP)

RepresentationalState Transfer(REST)

Peer-to-PeerArchitecturesUnstructured P2PNetworks

Structured P2PNetworks

Unstructured P2P Architectures

1 Centralized model: central server for, e.g., indexing• Some but not all problems of client-server

2 Pure model: no central entities• Locating content a problem

3 Hybrid model: hierarchy of peers and super-peers• Combination of centralized and pure

Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 29 / 34

Page 52: Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured

Applicationsand Services

in the Internet

JaakkoKangasharju

Introduction

Architecturesfor InternetApplications

Client-ServerArchitecturesSession InitiationProtocol (SIP)

RepresentationalState Transfer(REST)

Peer-to-PeerArchitecturesUnstructured P2PNetworks

Structured P2PNetworks

Unstructured P2P Architectures

Centralized P2P

P P

P P

P

P

P

PC

Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 30 / 34

Page 53: Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured

Applicationsand Services

in the Internet

JaakkoKangasharju

Introduction

Architecturesfor InternetApplications

Client-ServerArchitecturesSession InitiationProtocol (SIP)

RepresentationalState Transfer(REST)

Peer-to-PeerArchitecturesUnstructured P2PNetworks

Structured P2PNetworks

Unstructured P2P Architectures

Pure P2P

P P

P P

P

P

P

P

Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 30 / 34

Page 54: Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured

Applicationsand Services

in the Internet

JaakkoKangasharju

Introduction

Architecturesfor InternetApplications

Client-ServerArchitecturesSession InitiationProtocol (SIP)

RepresentationalState Transfer(REST)

Peer-to-PeerArchitecturesUnstructured P2PNetworks

Structured P2PNetworks

Unstructured P2P Architectures

Hybrid P2P

P P

P P

P

P

P

P

S

S

S S

Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 30 / 34

Page 55: Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured

Applicationsand Services

in the Internet

JaakkoKangasharju

Introduction

Architecturesfor InternetApplications

Client-ServerArchitecturesSession InitiationProtocol (SIP)

RepresentationalState Transfer(REST)

Peer-to-PeerArchitecturesUnstructured P2PNetworks

Structured P2PNetworks

Outline

1 Introduction

2 Architectures for Internet Applications

3 Client-Server Architectures

4 Peer-to-Peer ArchitecturesUnstructured P2P NetworksStructured P2P Networks

Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 31 / 34

Page 56: Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured

Applicationsand Services

in the Internet

JaakkoKangasharju

Introduction

Architecturesfor InternetApplications

Client-ServerArchitecturesSession InitiationProtocol (SIP)

RepresentationalState Transfer(REST)

Peer-to-PeerArchitecturesUnstructured P2PNetworks

Structured P2PNetworks

Distributed Hash Tables

• Map identifiers to content, no content-based searching• DHT algorithm tells where content found• Fully decentralized, scalable• Several algorithms in existence

Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 32 / 34

Page 57: Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured

Applicationsand Services

in the Internet

JaakkoKangasharju

Introduction

Architecturesfor InternetApplications

Client-ServerArchitecturesSession InitiationProtocol (SIP)

RepresentationalState Transfer(REST)

Peer-to-PeerArchitecturesUnstructured P2PNetworks

Structured P2PNetworks

DHT Example: Chord

1

3

4

7 i start node0 1 31 2 32 4 7

Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 33 / 34

Page 58: Applications and Services in the Internet · Session Initiation Protocol (SIP) Representational State Transfer (REST) Peer-to-Peer Architectures Unstructured P2P Networks Structured

Applicationsand Services

in the Internet

JaakkoKangasharju

Lecture Over

Questions?

Jaakko Kangasharju (TKK) Applications and Services in the Internet Autumn 2008 34 / 34