HTTP Mailbox

Asynchronous RESTful Communication

Sawood Alam

salam@cs.odu.edu

Department of Computer Science
Old Dominion University

Agenda

Problem: TODO List

ID Description Priority Status
1 Write a paper. HIGH Pending
2 Go on vacation. LOW Pending

Problem: Synchronization

Problem: X-Origin

Problem: Unavailable Server

Problem: Unsupported Method

Problem: Multicast

Background

Linda

REST

REST vs. RPC

Issues and Challenges

Cross-domain Communication

Client: X-Domain Restriction

Client: Limited Methods

Server: Lack of REST

Server: Lack of CORS

Indirect Communication

Relay HTTP

Ajax

var req = new XMLHttpRequest();
req.open('PATCH', 'http://example.com/tasks/1', true);
req.setRequestHeader('Content-type', 'text/task-patch');
req.send('Status=Done');

EMS

Bleeps

Bleeper

Bleeps as Tweets

HTTP Mailbox Messaging

HTTP Message

PATCH /tasks/1 HTTP/1.1
Host: example.com
Content-Type: text/task-patch
Content-Length: 11

Status=Done

HTTP/1.1 501 Not Implemented
Content-Type: text/plain
Content-Length: 72

PATCH methos is not implemented. Please consider using the HTTP Mailbox.

Message Encapsulation

POST /hm/http://example.com/tasks/1 HTTP/1.1
Host: example.net
Content-Type: message/http
Content-Length: 103

PATCH /tasks/1 HTTP/1.1
Host: example.com
Content-Type: text/task-patch
Content-Length: 11

Status=Done

System Overview

Lifecycle

Lifecycle: Send-Request

Lifecycle: Send-Response

Lifecycle: Retrieve-Request

Lifecycle: Retrieve-Response

API: Request

API: Message Chain

HTTP/1.1 200 OK
Link: <http://example.net/hm/id/1>; rel="first",
 <http://example.net/hm/id/4>; rel="last self",
 <http://example.net/hm/id/3>; rel="previous",
 <http://example.net/hm/http://example.com/tasks>;
 rel="current"
Content-Type: message/http
Content-Length: 42

DELETE /tasks/2 HTTP/1.1
Host: example.com

API: Accessibility

HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET, POST, OPTIONS
Access-Control-Expose-Headers: Link, Via,
 Date, Memento-Datetime
Content-Type: message/http
Content-Length: 42

DELETE /tasks/2 HTTP/1.1
Host: example.com

Utilization

Implementation

Preserve Me!

Preserve Me!: Flickr

Preserve Me!: Radialab

Preserve Me!: ResourceMap

Preserve Me!: arXiv

Preserve Me! Window

Preserve Me! Mailbox

Preserve Me! Viz

Preserve Me! Viz Window

Evaluation

Benchmarking: GET

Benchmarking: POST

Benchmarking: Pagination

Segment Analysis

Feature Comparison

Feature Linda HTTP Relay HTTP EMS Bleeps HTTP Mailbox
Multicast Yes No No Yes Yes Yes
Non-Blocking Yes No No Yes Yes Yes
Reliability Yes Yes Yes Yes No Yes
Message Size Any Any Any Any Short Any
Browser Support No Limited Full No Full Full
Transport Shared memory Web Web Web Web Web

Wrap Up

Attacks and Prevention

Attack Victim Prevention
DoS HTTP Mailbox Limiting access
Spam Recipient Spam filtering
Impersonation Sender Signing
Fake Authorization Sender OAuth or access token
Integrity Message Hash digest
Privacy Sender and Recipient Encryption
Security Sender and Recipient Authentication
Man-in-the-middle Sender and Recipient HTTPS

Message Signing

POST /hm/http://example.com/bob HTTP/1.1
Host: example.net
HM-Sender: http://example.org/alice
Content-Type: message/http
HM-Forward-Encoding: rsa-sign
 certificate=http://example.org/alice.pub
Content-Length: 19

SIGNEDMESSAGESTREAM

Signing and Encryption

POST /hm/http://example.com/bob HTTP/1.1
Host: example.net
HM-Sender: http://example.org/alice
Content-Type: message/http
HM-Forward-Encoding: rsa-sign
 certificate=http://example.org/alice.pub
 rsa-encrypt certificate=http://example.com/bob.pub
Content-Length: 48

NOTMEANINGFULLYREADABLESIGNEDANDENCRYPTEDMESSAGE

Future Work

Conclusions

/

#