RPC - Part: Transport Mechanism / Message Queues

RPC - Part: Transport Mechanism / Message Queues

More like Client-server Protocols


Stomp is simpler than 0mq, but you have a central server instead of point to point.

STOMP PHP Stomp Client User Guide

Message Queues

Message Queues and nothing but Message Queues « Richard Bucker Code rant: Message Queue Shootout! Message Queue vs. Web Services? - Stack Overflow

RestMQ - Redis based message queue RestMQ is a message queue which uses HTTP as transport, JSON to format a minimalist protocol and is organized as REST resources.

ZeroMQ / 0MQ

http://zguide.zeromq.org/php:all :: ØMQ - The Guide - ØMQ - The Guide http://nichol.as/zeromq-an-introduction :: Nicholas Piël » ZeroMQ an introduction

ØMQ is really just a networking library. Sockets the way you want them to work. Typically it’s for inter-application messaging and communication

Implements no security at all. Assumes you are on a private network.

http://techno-weenie.net/2011/5/22/zeromq-basics/ :: ZeroMQ Basics | techno weenie The name “ZeroMQ” was a little misleading for me. I think that’s because most other message queues are very similar: something pushes messages into a big, centralized queue, and workers pop messages off the front.

http://techno-weenie.net/2011/6/17/zeromq-pub-sub/ :: ZeroMQ Pub Sub… How does it work? | techno weenie https://gist.github.com/1031540 :: ZeroMQ pub/sub demo — Gist http://techno-weenie.net/2011/6/19/reliable-zeromq-pub-sub/ :: Reliable ZeroMQ Pub Sub | techno weenie

PHP & ZeroMQ

http://www.photon-project.com/ :: Photon, High Performance PHP & Mongrel2 Framework

Chat Example: http://xhtml.net/php/pluf-framework-php/650-Un-serveur-de-chat-temps-reel-en-PHP-en-30-lines-de-code-avec-Photon :: Un serveur de chat temps réel en PHP en 30 lines de code avec Photon

http://toys.lerdorf.com/archives/57-ZeroMQ-+-libevent-in-PHP.html :: ZeroMQ + libevent in PHP | Rasmus' Toys Page

Mongrel2, a web server on ZeroMQ

Mongrel2 is a web server that uses ZeroMQ to talk to backend handlers written in any language.

http://mongrel2.org/ :: The Mongrel2 Web Server Project http://codeutopia.net/blog/2010/10/28/bored-of-apachelighthttpdetc-try-mongrel2/ :: Bored of Apache/LightHTTPD/etc.? Try Mongrel2 | CodeUtopia - The blog of Jani Hartikainen

Mongrel (1) was the first web server used by Twitter, and inspired Node.js according to Ryan Dahl. http://en.wikipedia.org/wiki/Zed_Shaw » Zed Shaw - Wikipedia, the free encyclopedia

Similar projects

felipecruz/rio · GitHub Rio is a minimalist http server that act as broker between browsers and your (python, ruby and others) workers. Based on ZeroMQ and MsgPack.

tailhook/zerogw Fast HTTP/WebSocket to zeromq gateway.

node.js & ZeroMQ

http://forwardtechnology.co.uk/videos/27245799 :: Building a firehose with Node.js and ZeroMQ - Luca Grulla | Forward Technology

Scalable and blazing-fast task queue built on Node.js and ZeroMQ. https://github.com/nullobject/bokeh :: nullobject/bokeh It allows you to offload tasks from your main application process and distribute them among a pool of workers. Workers can be running on the same host as your application, or scaled out onto multiple machines for greater processing power.

matthiasg/zeromq-node-windows · GitHub

NullMQ = 0MQ in the browser

Toolkit for building messaging systems… …behind your firewall …not for customers …certainly not with the browser

http://avalanche123.com/blog/2012/02/25/interacting-with-zeromq-from-the-browser/ :: Interacting with ZeroMQ from the browser - Software Alchemist https://github.com/progrium/nullmq#readme :: progrium/nullmq

Zmq Web Bridge, is a project that allows javascript running in the browser to connect to zmq sockets running on a server, via a python gevent proxy. The javascript client code sets up a websocket, which communicates with the python gevent proxy, which forwards communications to various zmq backends.

https://github.com/hhuuggoo/ZmqWebBridge :: hhuuggoo/ZmqWebBridge

Alternative in Redis

Redis Pub/sub as an alternative to 0MQ: http://xmeng.wordpress.com/2011/11/14/pubsub-in-redis-using-php/ :: Pub/Sub in Redis using PHP | the wanderer http://robots.thoughtbot.com/post/6325247416/redis-pub-sub-how-does-it-work :: Redis Pub/Sub…how does it work?


https://github.com/hookio/hook.io#readme :: hookio/hook.io · GitHub http://blog.nodejitsu.com/distribute-nodejs-apps-with-hookio :: Distribute Node.js Apps with Hook.ioblog.nodejitsu.com - scaling node.js applications one callback at a time.

How you are going to communicate between 1000s of 3rd party services? Hook.io aims to solve that problem.

http://ejeklint.github.com/2011/09/23/hook.io-for-dummies-part-1-overview/ :: Hook.io For Dummies, Part 1 - Introduction | Home http://ejeklint.github.com/2011/10/11/hook.io-for-dummies-part-2-getting-started/ :: Hook.io For Dummies, Part 2 - Getting Started | Home http://ejeklint.github.com/2011/10/11/hook.io-for-dummies-part-3-a-deeper-look/ :: Hook.io For Dummies, Part 3 - A Deeper Look | Home


Pure Javascript implementation of ZeroMQ (alternative on node.js)

https://github.com/visionmedia/super-sockets#readme :: visionmedia/super-sockets · GitHub https://vimeo.com/45818408 :: Super Sockets on Vimeo Great explanation of Push/Pull: https://vimeo.com/45818408#t=555

Super sockets are not meant to combat zeromq nor provide feature parity, but provide a nice solution when you don’t need the insane nanosecond latency or language interoperability that zeromq provides as super sockets do not rely on any third-party compiled libraries.


FapikoDotCom | Documenting the journey of my technological adventures :: http://www.fapiko.com/

ZeroMQ + Apache Zookeeper for service discovery

Storm Cluster Uses the same combination (check the implementation). They use Apache Zookeeper (for service discovery) + 0MQ as transport.

Setting up a Storm cluster Powered By

Twitter Engineering: A Storm is coming

Since Storm topologies are just Thrift structures, and Nimbus is a Thrift daemon, you can create and submit topologies in any language. Apache Thrift It is used as a remote procedure call (RPC) framework. Thrift is both cross-platform and more lightweight than REST for many operations.

About building RPC from 0MQ:

Basically, RPC is the REQ/REP pattern. What you are missing for full-blown RPC solution is:

  1. Serialization – this is delberately decoupled from 0MQ. As a consequence you can use any serialisation library you like.

  2. Resending of the request is case the server dies. This should be and will be done inside of 0MQ, but is not done yet. However, it can be easily emulated on top of it.

Anything I’ve missed? x

Messaging Queues

message queue - ActiveMQ or RabbitMQ or ZeroMQ or - Stack Overflow

RabbitMQ is another alternative. You can build RPC for almost any programming language, even PHP.

rabbitmq-tutorials/php at master · rabbitmq/rabbitmq-tutorials · GitHub PHP: AMQP - Manual

And since node.js has an AMQP client, we can easily hook it up with RabbitMQ (RabbitMQ » Blog Archive » rabbitmq + node.js = rabbit.js - Messaging that just works) RabbitMQ » Blog Archive » rabbitmq + node.js = rabbit.js - Messaging that just works

date 01. Jan 0001 | modified 28. May 2021
filename: RPC - Transport Mechanism (Message Queues)