Download presentation
Presentation is loading. Please wait.
Published byJohnathan Palmer Modified over 8 years ago
1
ZEROMQ: CHAPTER 8 A FRAMEWORK FOR DISTRIBUTED COMPUTING
2
CONTENTS Design for The Real World The Secret Life of WiFi Topic in a Framework Discovery Point-to-point Messaging Group Messaging Distributed Logging and Monitoring Content Distribution Protocol and implementation Conclusions
3
DESIGN FOR THE REAL WORLD Distributed, localized, scalable … Issues Discovery Presence Connectivity Point-to-point messaging Group messaging Content distribution Testing and simulation Distributed Logging
4
THE SECRET LIFE OF WIFI Why Mesh isn't Here Yet Some Physics Transmission Power, performance of AP What's the Current Status? Point-to-point VS. AP-to-client Performance Battery life
5
DISCOVERY Preemptive Discovery over Raw Sockets ICMP ping, raw IP socket It doesn't take any cooperation from the device To open a raw IP socket requires root privileges Cooperative Discovery using UDP Broadcasts The POSIX socket API was designed for universal flexibility not simplicity To push the UDP code into a separate library
6
POINT-TO-POINT MESSAGING UDP Beacon Framing True Peer Connectivity (Harmony Pattern) Not ROUTER-ROUTER ROUTER(in, one per all peers)-DEALER(out, one per a peer) Detecting Disappearances UDP heartbeating sounds simple but it's not It's tempting to add in TCP beacons We switch to TCP heartbeats only when a specific peer hasn't sent us any UDP beacons in a while
7
GROUP MESSAGING Group A set of peers JOIN / LEAVE command Repeat peer to peer Not PUB-SUB pattern Must solve the late joiner problem, last value cashing, etc.
8
DISTRIBUTED LOGGING AND MONITORING PUB-SUB pattern Extend the HELLO command with a headers X-ZRELOG=tcp://192.168.1.122:9992 LOG format Two bytesOne byte N bytes a protocol signaturea logging levelan event typeLog data
9
CONTENT DISTRIBUTION FileMQ PUB-SUB pattern to delivery files API example fmq_server_t *server = fmq_server_new (); fmq_server_bind (server, "tcp://*:5670"); fmq_server_publish (server, "/home/ph/filemq/share", "/public"); fmq_client_t *client = fmq_client_new (); fmq_client_connect (client, "tcp://pieter.filemq.org:5670"); fmq_client_subscribe (server, "/public/", "/home/ph/filemq/share");
10
PROTOCOL AND IMPLEMENTATION FILEMQ The File Message Queuing Protocol (FILEMQ) governs the delivery of files between a 'client' and a 'server'. FILEMQ runs over the ZeroMQ ZMTP protocol. http://rfc.zeromq.org/spec:19 https://github.com/zeromq/filemq ZRE (ZeroMQ Realtime Exchange Protocol ) The ZRE governs how a group of peers on a network discover each other, organize into groups, and send each other events. ZRE runs over the ZeroMQ ZMTP protocol. http://rfc.zeromq.org/spec:20 Zyre An open-source framework for proximity-based peer-to-peer applications https://github.com/zeromq/zyre
11
CONCLUSIONS Building applications for unstable decentralized networks is one of the end-games for ØMQ Zyre, There are some major areas unfinished High-level APIs Security Nomadic content Federation
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.