Real-Time Video Frame Transferring over the network through Messaging
Messaging
Messaging makes applications loosely coupled by communicating asynchronously, which also makes the communication more reliable because the two applications do not have to be running at the same time. Messaging makes the messaging system responsible for transferring data from one application to another, so the applications can focus on what data they need to share but not worry so much about how to share it.
Message Oriented protocols
Message Oriented protocols send data in distinct chunks or groups. The receiver of data can determine where one message ends and another begins. Message protocols are usually built over streams but there is one layer in between which takes care to separate each logical part from another. It parses input stream for you and gives you result only when the whole dataset arrives and not all states in between.
Available Resources
MQTT - Mosquitto is a lightweight MQTT is a machine-to-machine (M2M)/"Internet of Things" connectivity protocol broker messaging library. It works on top of the TCP/IP protocol. It is designed for connections with remote locations where a "small code footprint" is required or the network bandwidth is limited. The publish-subscribe messaging pattern requires a message broker.
ZeroMQ (also spelled ØMQ, 0MQ or ZMQ) is a high-performance asynchronous brokerless messaging library, aimed at use in distributed or concurrent applications. It provides a message queue, but unlike message-oriented middleware, a ZeroMQ system can run without a dedicated message broker.
Since ZeroMQ outperformed MQTT in various tests and it's well-documented as well. I decided to go with ZeroMQ for messaging implementation in vidgear.
Goal
Our goal is to implement real-time video frames transferring over the network in vidgear by implementing a high-level wrapper around PyZmQ that contains Python bindings for ZeroMQ. This wrapper will provide both read and write functionality and read function will be multi-threaded for high-speed frame capturing with minimum latency and memory constraints.
TODO
[x] Implement a new Netgear class: a high-level wrapper around ZeroMQ
[x] Add both send() and recv() function for transferring frames
[x] Make send() function multi-threaded and error-free with Threaded Queue Mode.
[x] Add support for various possible messaging synchronous patterns
[x] frame-transferring between server/client must be synchronized and ultrafast with minimum latency
[x] Robustly handle the server and client end, even if any of them is started at a different instant.
[x] Server end must able to terminate stream at the client(s) end automatically.
[x] Server and Client must able to talk/send messages at any instance while transferring frames.
Real-Time Video Frame Transferring over the network through Messaging
Messaging
Messaging makes applications loosely coupled by communicating asynchronously, which also makes the communication more reliable because the two applications do not have to be running at the same time. Messaging makes the messaging system responsible for transferring data from one application to another, so the applications can focus on what data they need to share but not worry so much about how to share it.
Message Oriented protocols
Message Oriented protocols send data in distinct chunks or groups. The receiver of data can determine where one message ends and another begins. Message protocols are usually built over streams but there is one layer in between which takes care to separate each logical part from another. It parses input stream for you and gives you result only when the whole dataset arrives and not all states in between.
Available Resources
MQTT - Mosquitto is a lightweight MQTT is a machine-to-machine (M2M)/"Internet of Things" connectivity protocol broker messaging library. It works on top of the TCP/IP protocol. It is designed for connections with remote locations where a "small code footprint" is required or the network bandwidth is limited. The publish-subscribe messaging pattern requires a message broker.
ZeroMQ (also spelled ØMQ, 0MQ or ZMQ) is a high-performance asynchronous brokerless messaging library, aimed at use in distributed or concurrent applications. It provides a message queue, but unlike message-oriented middleware, a ZeroMQ system can run without a dedicated message broker.
Since ZeroMQ outperformed MQTT in various tests and it's well-documented as well. I decided to go with ZeroMQ for messaging implementation in vidgear.
Goal
Our goal is to implement real-time video frames transferring over the network in vidgear by implementing a high-level wrapper around PyZmQ that contains Python bindings for ZeroMQ. This wrapper will provide both read and write functionality and read function will be multi-threaded for high-speed frame capturing with minimum latency and memory constraints.
TODO
Netgear
class: a high-level wrapper around ZeroMQsend()
andrecv()
function for transferring framessend()
function multi-threaded and error-free with Threaded Queue Mode.