+ All Categories
Home > Software > ZeroMQ - Sockets on steroids!

ZeroMQ - Sockets on steroids!

Date post: 20-Aug-2015
Category:
Upload: pedro-januario
View: 478 times
Download: 4 times
Share this document with a friend
Popular Tags:
30
0MQ SOCKETS ON STEROIDS!!!
Transcript

0MQSOCKETS ON STEROIDS!!!

AGENDAOverview

Message OrientedDisconnectedAsyncBindings / Platforms

PatternsRequest / ReplyAsync Req /RepPub / SubPipelinePairing

WTF IS 0MQ??

WTF IS 0MQ?

WTF IS 0MQ?

"ZEROMQ IS WHAT BSD SOCKETS MAY

LOOK LIKE IF THEY WERE DESIGN

TODAY"

WTF IS 0MQ?

ZEROMQ IS A MESSAGE ORIENTED

COMMUNICATION LIBRARY!!

OVERVIEW

C++ Implementation In-memory queueAtomic MessagesAPI for ZMTP Protocol

Zero copyMultipart messages support

OVERVIEWDisconnected Sockets

Background I/O to send/receiveQueues at sender and receiverAutomatic ReconnectMessage size limited by memory size

OVERVIEWAsync

Polling over BSD socketsBatch messages over the wire

FastOver 8M msg/s

OVERVIEWProtocol Support with i nterchangeability

inproc: in memoryipc: inter processtcppgm/epgm: multicast

OVERVIEWPlatform support

LinuxWindowsiOSAndroidRaspabery Pi

OVERVIEW+30 Bindings

RubyNode-js.NETJavaC++CobolGo...

OVERVIEWWhat you will not have out of the box

Message Persistency (Pirate pattern)Data serialisation: use what ever you desire

msgpackjsonprotobuff...

Data compressionMessage encryptionSecurity Protocol

Include in the next version of ZMTP

APISocket Types

REQ: RequestREP: ReplyDEALER: Async Request/ReplyROUTER: RoutingPUB: PublisherSUB: SubscriberPUSH: Pipeline writerPULL: Pipeline consumer

API - NODE JS$ npm install zmq

$ node var zmq = require( 'zmq'); var socket = zmq.socket( 'rep'); socket.bind( 'inproc://queue'); // server socket.connect(<span style= "font-family: monospace; font-size: 19.274375915527344px; font-style: italic; font-variant: normal;" socket. on('message', function(frame1, frame2){}); socket. on('error',function(error){}); socket.send( 'something'); socket.send([ 'multipart1', 'multipart2']);<br>socket.close();

PATTERNSREQUEST / REPLYASYNC REQUEST / REPLYPUBLISHER / SUBSCRIBERSPIPELINEPAIR

REQUEST / REPLY

DOJO - REQUEST /REPLY

ASYNC REQUEST / REPLY

DOJO - REQUEST /REPLY ASYNC

PUB / SUB

DOJO - PUB /SUB

PIPELINE

PAIR

MAJORDOMO PATTERN

http://rfc.zeromq.org/spec:7

DOJO - MAJORDOMO

LINKS0MQ Guide

http://zguide.zeromq.org/page:all

0MQ Guide Examples

git clone --depth=1 git://github.com/imatix/zguide.git

ANY DOUBTS

PEDRO JANUÁRIO

THANKS!!!

http://shared-mind.tumblr.comhttps://www.linkedin.com/in/pjanuariohttps://twitter.com/prnjanuariohttps://github.com/pjanuario

COMING NEXT

ZMQ SOA SERVICE SUITE

http://pjanuario.github.io/zmq-service-suite-specs/


Recommended