an erlang implementation of restms. why have messaging? separates applications cheaply feed...
TRANSCRIPT
![Page 1: An Erlang Implementation of Restms. Why have messaging? Separates applications cheaply Feed information to the right applications cheaply Interpret feed](https://reader035.vdocuments.us/reader035/viewer/2022062511/55142e35550346ec488b5e43/html5/thumbnails/1.jpg)
An Erlang Implementation of Restms
![Page 2: An Erlang Implementation of Restms. Why have messaging? Separates applications cheaply Feed information to the right applications cheaply Interpret feed](https://reader035.vdocuments.us/reader035/viewer/2022062511/55142e35550346ec488b5e43/html5/thumbnails/2.jpg)
Why have messaging?
Separates applications cheaply
Feed information to the right applications cheaply
Interpret feed data in different ways
![Page 3: An Erlang Implementation of Restms. Why have messaging? Separates applications cheaply Feed information to the right applications cheaply Interpret feed](https://reader035.vdocuments.us/reader035/viewer/2022062511/55142e35550346ec488b5e43/html5/thumbnails/3.jpg)
- separation of concerns
Allows one to separate one's components easily
Swap out easily Communicate cheaply Communicate quickly
![Page 4: An Erlang Implementation of Restms. Why have messaging? Separates applications cheaply Feed information to the right applications cheaply Interpret feed](https://reader035.vdocuments.us/reader035/viewer/2022062511/55142e35550346ec488b5e43/html5/thumbnails/4.jpg)
- feed right thing at right time
Knows it's target Subscribers don't poll Server informs client
when there is an update
Publisher says: “my package is in China” => all subscribers know immediately
![Page 5: An Erlang Implementation of Restms. Why have messaging? Separates applications cheaply Feed information to the right applications cheaply Interpret feed](https://reader035.vdocuments.us/reader035/viewer/2022062511/55142e35550346ec488b5e43/html5/thumbnails/5.jpg)
- mine feed data
![Page 6: An Erlang Implementation of Restms. Why have messaging? Separates applications cheaply Feed information to the right applications cheaply Interpret feed](https://reader035.vdocuments.us/reader035/viewer/2022062511/55142e35550346ec488b5e43/html5/thumbnails/6.jpg)
What we expect from messaging.
Easy connection Easy tools to mine
feeds Scalability – an order
of magnitude Loose coupling Different languages
![Page 7: An Erlang Implementation of Restms. Why have messaging? Separates applications cheaply Feed information to the right applications cheaply Interpret feed](https://reader035.vdocuments.us/reader035/viewer/2022062511/55142e35550346ec488b5e43/html5/thumbnails/7.jpg)
What can I do?
Monitor stocks Perform server side
computations on feeds
Create message based websites
etc
![Page 8: An Erlang Implementation of Restms. Why have messaging? Separates applications cheaply Feed information to the right applications cheaply Interpret feed](https://reader035.vdocuments.us/reader035/viewer/2022062511/55142e35550346ec488b5e43/html5/thumbnails/8.jpg)
What is available for us?
Xmpp RSS AtomPub Soap
![Page 9: An Erlang Implementation of Restms. Why have messaging? Separates applications cheaply Feed information to the right applications cheaply Interpret feed](https://reader035.vdocuments.us/reader035/viewer/2022062511/55142e35550346ec488b5e43/html5/thumbnails/9.jpg)
What of the enterprise world?
JMS for the java universe....
Pub-sub Queues Closed source Expensive Vendor lock in
![Page 10: An Erlang Implementation of Restms. Why have messaging? Separates applications cheaply Feed information to the right applications cheaply Interpret feed](https://reader035.vdocuments.us/reader035/viewer/2022062511/55142e35550346ec488b5e43/html5/thumbnails/10.jpg)
What are our challenges?
Routing model Static vs dynamic
Protocol vs Product Open standard Closed source impl
Complexity
![Page 11: An Erlang Implementation of Restms. Why have messaging? Separates applications cheaply Feed information to the right applications cheaply Interpret feed](https://reader035.vdocuments.us/reader035/viewer/2022062511/55142e35550346ec488b5e43/html5/thumbnails/11.jpg)
Why is messaging unpopular?
Complex Implementations do not
follow standards Few Free and Open
Source Software solutions RabbitMq (via internet?) Ejabbard (named
queues?)
![Page 12: An Erlang Implementation of Restms. Why have messaging? Separates applications cheaply Feed information to the right applications cheaply Interpret feed](https://reader035.vdocuments.us/reader035/viewer/2022062511/55142e35550346ec488b5e43/html5/thumbnails/12.jpg)
AMQP
Free and Open Generic extensible routing Not easy to use in any
language Need entire API stack of
each language Any OS Fast
But? Inaccessible
![Page 13: An Erlang Implementation of Restms. Why have messaging? Separates applications cheaply Feed information to the right applications cheaply Interpret feed](https://reader035.vdocuments.us/reader035/viewer/2022062511/55142e35550346ec488b5e43/html5/thumbnails/13.jpg)
Advanced Messaging Queuing Protocol (AMQP)
![Page 14: An Erlang Implementation of Restms. Why have messaging? Separates applications cheaply Feed information to the right applications cheaply Interpret feed](https://reader035.vdocuments.us/reader035/viewer/2022062511/55142e35550346ec488b5e43/html5/thumbnails/14.jpg)
AtomPub
Free and Open Single limited routing
model Publish to feed, read from
feed, no routing Easy to use in any
language Any OS Fast
But? Limited
![Page 15: An Erlang Implementation of Restms. Why have messaging? Separates applications cheaply Feed information to the right applications cheaply Interpret feed](https://reader035.vdocuments.us/reader035/viewer/2022062511/55142e35550346ec488b5e43/html5/thumbnails/15.jpg)
What we want....
Free and Open Generic extensible routing Easy to use in any
language Any OS Fast
![Page 16: An Erlang Implementation of Restms. Why have messaging? Separates applications cheaply Feed information to the right applications cheaply Interpret feed](https://reader035.vdocuments.us/reader035/viewer/2022062511/55142e35550346ec488b5e43/html5/thumbnails/16.jpg)
Enter RestMS
Twitter: Dion Almaer: “RestMS is like squashing AMQP and AtomPub together”
Improve on AMQP routing RESTful access Portable Free standard
![Page 17: An Erlang Implementation of Restms. Why have messaging? Separates applications cheaply Feed information to the right applications cheaply Interpret feed](https://reader035.vdocuments.us/reader035/viewer/2022062511/55142e35550346ec488b5e43/html5/thumbnails/17.jpg)
How does Restms work?
1) Publisher sends messages to Feed 2) Subscribers create pipes
And join the pipes to feeds 3) Subscribers then read from their pipes
Get message, process message, loop 4) Joins specify the routing algorithms
By key, location, regular expression, etc
![Page 18: An Erlang Implementation of Restms. Why have messaging? Separates applications cheaply Feed information to the right applications cheaply Interpret feed](https://reader035.vdocuments.us/reader035/viewer/2022062511/55142e35550346ec488b5e43/html5/thumbnails/18.jpg)
RESTful
RESTful access POST : creates feed, pipe, join GET: reads a pipe PUT: updates a feed, pipe, join DELETE: deletes a feed, pipe or join
Support for JSON, XML, YAML, Binary files, Image files, any format
![Page 19: An Erlang Implementation of Restms. Why have messaging? Separates applications cheaply Feed information to the right applications cheaply Interpret feed](https://reader035.vdocuments.us/reader035/viewer/2022062511/55142e35550346ec488b5e43/html5/thumbnails/19.jpg)
Why HTTP?
Proxies
Load Balancers
Debugging tools
Web browsers
Prior knowledge
Guaranteed web access
Extensive hardware
Known scalability paths
Extensibility
Security
![Page 20: An Erlang Implementation of Restms. Why have messaging? Separates applications cheaply Feed information to the right applications cheaply Interpret feed](https://reader035.vdocuments.us/reader035/viewer/2022062511/55142e35550346ec488b5e43/html5/thumbnails/20.jpg)
Problems with HTTP
Verbose Batch writes and reads
Polled vs Event driven BOSH / Long poll
NOT-XML! XML is a markup lang Use JSON
![Page 21: An Erlang Implementation of Restms. Why have messaging? Separates applications cheaply Feed information to the right applications cheaply Interpret feed](https://reader035.vdocuments.us/reader035/viewer/2022062511/55142e35550346ec488b5e43/html5/thumbnails/21.jpg)
FireflyMq
Erlang Implementation of RestMs protocol Webmachine Riak Cappuccino
![Page 22: An Erlang Implementation of Restms. Why have messaging? Separates applications cheaply Feed information to the right applications cheaply Interpret feed](https://reader035.vdocuments.us/reader035/viewer/2022062511/55142e35550346ec488b5e43/html5/thumbnails/22.jpg)
Basho
Webmachine Erlang RESTful toolkit
Riak Erlang implementation Amazon Dynamo clone 2 yrs in production Distributed key/value
database Not client server model