Eventing Data with RabbitMQ and Riak <ul><li>Jon Brisbin </li></ul><ul><li>[email_address]  - @j_brisbin </li></ul>
 
Evented Data is a reflection of different aspects of a single application.
What is Data, then?
Data cono flno flda8 1 3877 20110609 1 468 20110822
 
Data [{ “ company_number”: 1, “ flight_number”: 3877, “ flight_date”: 20110609 }, { “ company_number”: 1, “ flight_number”...
 
Data PUT /services/flightinfo Content-Type: text/plain 1,3877,20110609 1,468,20110822
Data Exchange: flight Routing-Key: info X-Meta-Company: 1 Content-Type: application/json [ [3877,20110609], [468,20110822] ]
The only important pieces of data are...  [ [3877,20110609], [468,20110822] ]
 
Where the data is stored doesn’t really matter...
...nor does the language used to extract it...
...nor does the language of the server in which it is stored.
The only thing that matters is THE DATA.
It is the Alpha and the Omega of the project.
 
 
The RabbitMQ Side Custom exchange type “x-riak”
The RabbitMQ Side Custom exchange type “x-riak” <ul><li>Arguments: </li></ul><ul><li>host = “localhost” </li></ul><ul><li>...
The RabbitMQ Side Custom exchange type “x-riak” <ul><li>Possible type-modules: </li></ul><ul><li>rabbit_exchange_type_topi...
presentation.startDemo();
The Riak Side
The Riak Side PUT /riak/bucket Content-Type: application/json { props: { postcommit: [ { mod: “riak_rabbitmq”, fun: “postc...
The Riak Side <ul><li>Metadata: </li></ul><ul><li>X-Riak-Meta-Amqp-Exchange </li></ul><ul><li>X-Riak-Meta-Amqp-Routing-Key...
Store metadata on a special entry named “AMQP-Meta” in that bucket
presentation.startDemo();
http://github.com/jbrisbin @j_brisbin [email_address]
Upcoming SlideShare
Loading in...5
×

Eventing Data with RabbitMQ and Riak

2,118

Published on

The slides from my presentation at Erlang Factory 2011.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
2,118
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
36
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Eventing Data with RabbitMQ and Riak

  1. 1. Eventing Data with RabbitMQ and Riak <ul><li>Jon Brisbin </li></ul><ul><li>[email_address] - @j_brisbin </li></ul>
  2. 3. Evented Data is a reflection of different aspects of a single application.
  3. 4. What is Data, then?
  4. 5. Data cono flno flda8 1 3877 20110609 1 468 20110822
  5. 7. Data [{ “ company_number”: 1, “ flight_number”: 3877, “ flight_date”: 20110609 }, { “ company_number”: 1, “ flight_number”: 468, “ flight_date”: 20110822 }]
  6. 9. Data PUT /services/flightinfo Content-Type: text/plain 1,3877,20110609 1,468,20110822
  7. 10. Data Exchange: flight Routing-Key: info X-Meta-Company: 1 Content-Type: application/json [ [3877,20110609], [468,20110822] ]
  8. 11. The only important pieces of data are... [ [3877,20110609], [468,20110822] ]
  9. 13. Where the data is stored doesn’t really matter...
  10. 14. ...nor does the language used to extract it...
  11. 15. ...nor does the language of the server in which it is stored.
  12. 16. The only thing that matters is THE DATA.
  13. 17. It is the Alpha and the Omega of the project.
  14. 20. The RabbitMQ Side Custom exchange type “x-riak”
  15. 21. The RabbitMQ Side Custom exchange type “x-riak” <ul><li>Arguments: </li></ul><ul><li>host = “localhost” </li></ul><ul><li>port = 8087 </li></ul><ul><li>type-module = “..._topic” </li></ul><ul><li>maxclients = 5 </li></ul>
  16. 22. The RabbitMQ Side Custom exchange type “x-riak” <ul><li>Possible type-modules: </li></ul><ul><li>rabbit_exchange_type_topic </li></ul><ul><li>rabbit_exchange_type_direct </li></ul><ul><li>rabbit_exchange_type_fanout </li></ul><ul><li>rabbit_exchange_type_headers </li></ul><ul><li>mymodule_custom_type_foo </li></ul>
  17. 23. presentation.startDemo();
  18. 24. The Riak Side
  19. 25. The Riak Side PUT /riak/bucket Content-Type: application/json { props: { postcommit: [ { mod: “riak_rabbitmq”, fun: “postcommit_send_amqp” } ] } }
  20. 26. The Riak Side <ul><li>Metadata: </li></ul><ul><li>X-Riak-Meta-Amqp-Exchange </li></ul><ul><li>X-Riak-Meta-Amqp-Routing-Key </li></ul><ul><li>X-Riak-Meta-Amqp-Host </li></ul><ul><li>X-Riak-Meta-Amqp-Port </li></ul><ul><li>X-Riak-Meta-Amqp-Vhost </li></ul><ul><li>X-Riak-Meta-Amqp-User </li></ul><ul><li>X-Riak-Meta-Amqp-Password </li></ul><ul><li>X-Riak-Meta-Amqp-Ignore </li></ul>
  21. 27. Store metadata on a special entry named “AMQP-Meta” in that bucket
  22. 28. presentation.startDemo();
  23. 29. http://github.com/jbrisbin @j_brisbin [email_address]
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×