a practical introduction
structureIntroductionWhy use            ?ArchitectureHands on!Projects using Future?
1. Introduction
			What is           ?   is a high-performance asynchronous messaging librarydeveloped by the “iMatix Corporation“ and an open sourcecommunityit is a “message queue” system, unlike “message oriented middleware” (no broker architecture)developed as a simple way contrary to AMQP (Advanced Message Queuing Protocol)LGPL/GPLv3 Software written in C++1. Introduction
1. Introduction :it allows designing complex communication systems without much effortit is not a complete messaging system no out of the box product like unwrap it, configure it, start it upit is a higher level socket interface to build up your own messaging system
History the original designer of AMQP (Pieter Hintjens, CEO from iMatrix) started ZeroMQ on March 30, 2010he left AMQP working group and now supports AMQP 1.0 with the new project ZeroMQnow the latest version is 2.0.10 1. Introduction
		 queue based messagingentity 1entity 2queue1. Introduction
2.Why use         ?
2. Why use           ?   “If you've done any work with threads, protocols, or networks, 	you'll realize this is pretty much impossible. It's a dream. 	Even connecting a few programs across a few sockets is plain nasty, 	when you start to handle real life situations.”
Scalabilityone ZeroMQ socket can connect to multiple endpoints it automatically provides load balancingSimplicitythe API looks simplecompared with raw sockets it is really simple to deliver messagesno buffer management is neededPerformanceno overhead of an over-engineered protocol2. Why use           ?
languagebindingsAdaBasicCC++C# (.NET & Mono) Common LispDErlangGoHaskell2. Why use           ?
languagebindingsnode.jsObjective-C PerlPHPPythonRacketRubyRuby  TclLua2. Why use           ?
3. Architecture
3. Architecture
general architectureapplicationzmq.cpp/zmq.hctx.cpptcp_connecter.cpptcp_socket.cppSocket_base.cpp
3. Architecture			   concurrency modelØMQ's concurrency model may a bit confusing at firstØMQ is a multithreaded application without mutexescondition variablessemaphoresinstead, each object will live in its own threadother threads never touch them
3. Architecture			   concurrency modelthreads communicate with the aid of messagesthey called 'commands' to distinguish from user-level ØMQ-messagessame way the objects can speak to other objects
3. Architecturethreading modelApplicationZeroMQI/O ThreadsApplication Thread
3. Architecturethreading modelApplicationZeroMQI/O ThreadsApplication Threadcreated outside of ØMQ to access the APIcreated inside of ØMQ to send messages
3. Architecturemailboxsystemthreads are only objects with a 'mailbox‘basically mailboxes are queues to store commandsthreads retrieve commands from the mailboxmailbox.cpp
3. ArchitectureAPI from zmq.cpp
3. Architecturezmq.cpp
3. Architecturezmq.cpp
3. Architecture3 steps to set up ZeroMQ choose a transport mechanismset up the infrastructureselect a messaging pattern
3. Architecturechoose a transport mechanism
3. Architecturepossible ways to deliver a message: INPROC:an In-Process communication modelIPC:an Inter-Process communication modelMULTICAST:multicast via PGM, possibly encapsulated in UDPTCP:a network based transport
3. ArchitecturePGM (Pragmatic General Multicast)is a reliablemulticasttransportprotocolprovides a reliable sequence of packets to multiple recipients simultaneouslymaking it suitable for applications like multi-receive
3. Architectureset up the infrastructure
3. Architecturepossible infrastructures QUEUE:a forwarder for the request/response messaging patternFORWARDER:a forwarder for the publish/subscribe messaging patternSTREAMER:a forwarder for the pipelined messaging pattern
3. Architectureselect a messaging pattern
3. ArchitectureREQUEST/REPLY:bidirectional, load balanced and state basedPUBLISH/SUBSCRIBE:publish to multiple recipients at onceUPSTREAM / DOWNSTREAM:distribute data to nodes arranged in a pipelinePAIR:communication exclusively between peersold pattern  only for specific applications
3. Architecturevalid socket combinationsPUB and SUBREQ and REPREQ and XREPXREQ and REPXREQ and XREPXREQ and XREQXREP and XREPPUSH and PULLPAIR and PAIRzmq.h
3. ArchitectureREQUEST/REPLY:
3. ArchitecturePUBLISH/SUBSCRIBE:
3. ArchitectureUPSTREAM / DOWNSTREAM:
4. Hands on!
4. Hands on!basic conceptshwserver.cpp
4. Hands on!basic conceptshwserver.py
4. Hands on!basic conceptshwserver.cpp
4. Hands on!ctx.cpp
4. Hands on!ctx.cpp
4. Hands on!basic conceptsctx.h
4. Hands on!basic conceptsctx.h
4. Hands on!basic conceptszmq.cpp
4. Hands on!basic conceptshwserver.cpp
4. Hands on!basic conceptszmq.cpp
4. Hands on!Socket_base.cpp
4. Hands on!Socket_base.cpp
config.hpp4. Hands on!
4. Hands on!example!!
4. Hands on!get            : (only source code version)download source code (git://github.com/zeromq/zeromq2.git)build libraries (Windows MSVS or your favorite Compiler on Linux  )install on systemadditional language bindings only available as source package
5. Projects using ZeroMQ
5. Projects using ZeroMQProjects using ZeroMQDripdrop (JavascriptReactorpattern)Zeromqt (Qt)Soaplib (Python)C++ wrapper of zmq::pollzdevicesdevicesprojectJeffMQ (peertopeerqueueframework)0MQ pluginforRabbitMQTCP thinstreamsZMQMachine (Ruby) (reactorpattern)
6. Future?
Future?ØMQ 3.0 RoadmapTCP virtual services / virtual endpointsPattern CheckingAPI SimplifikationRemovals
Future?ØMQ 3.0 Roadmapcontext configurationit is not possible to dynamically configure a context at this time
thanks for your attention!

øMQ Vortrag