|Also available on:|
- Learn fundamental message/queue design patterns
- Work with multi-threaded programs
- Work with multiple sockets
Book DetailsLanguage : English
Paperback : 108 pages [ 235mm x 191mm ]
Release Date : March 2013
ISBN : 178216104X
ISBN 13 : 9781782161042
Author(s) : Faruk Akgul
Topics and Technologies : All Books, Networking and Servers, Open Source
Table of ContentsPreface
Chapter 1: Getting Started
Chapter 2: Introduction to Sockets
Chapter 3: Using Socket Topology
Chapter 4: Advanced Patterns
- Chapter 1: Getting Started
- The beginning
- The message queue
- Introduction to ZeroMQ
- The brokerless design
- Hello world
- The request-reply pattern
- Sending the message
- Handling strings in C
- Checking the ZeroMQ version
- Chapter 2: Introduction to Sockets
- The publish-subscribe pattern
- Filtering out messages
- The socket options
- Notes on the publisher-subscriber pattern
- The pipeline pattern
- The divide and conquer strategy
- The ZMQ_PULL socket
- The ZMQ_PUSH socket
- Getting ZeroMQ context
- Destroying ZeroMQ context
- Cleaning up
- Detecting memory leaks
- Introduction to Valgrind
- Chapter 3: Using Socket Topology
- What a socket is
- Types of Internet sockets
- Transmission Control Protocol (TCP)
- The three-way handshake protocol
- TCP header
- TCP flags
- Properties of TCP
- ZeroMQ sockets
- Differences between TCP sockets and ZeroMQ sockets
- Routing schemes
- Setting I/O threads and limiting the number of sockets
- Working with multiple sockets
- Working with multi-part messages
- How to handle interruptions
- Introduction to CZMQ
- Chapter 4: Advanced Patterns
- Extending the request-reply pattern
- Writing multithreaded applications with ZeroMQ
- Wrapping publisher-subscriber messages
- High watermark
- Slow subscribers in a publish-subscribe pattern
Download the code and support files for this book.
Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.
Sorry, there are currently no downloads available for this title.
What you will learn from this book
- Implement the request–reply pattern
- Implement the pub–sub pattern
- Work with multiple sockets
- Work with multithreaded programs
- Detect memory leaks
- Route schemes
- Learn the difference between TCP sockets and ZeroMQ sockets
ØMQ (also spelled ZeroMQ, 0MQ, or ZMQ) is a high-performance asynchronous messaging library aimed at use in scalable distributed or concurrent applications. It provides a message queue, but unlike message-oriented middleware, a ØMQ system can run without a dedicated message broker. The library is designed to have a familiar socket-style API.
"ZeroMQ" teaches you to use ZeroMQ through examples in C programming language. You will learn how to use fundamental patterns of message/queuing with a step-by-step tutorial approach and how to apply them. Then, you’ll learn how to use high level APIs and to work with multiple sockets and multithreaded programs through many examples.
This book looks at how message/queue works in general and what kinds of problems it solves. Then, it explains how ZeroMQ works and how it differs from other message/queue libraries and how it can be used in different scenarios.
You will also learn how to apply essential message/queue design patterns in different scenarios, and how they differ from each other. It shows you practical examples you can apply. You will also learn how to work with multiple sockets.
You will learn the basics of ZeroMQ as well as how to use different patterns.
A practical, step-by-step example-rich tutorial.
Who this book is for
If you are a C developer who wants to learn about ZeroMQ, this book is for you. It is assumed that the reader has C experience at some level but prior ZeroMQ knowledge is not expected.