Is zeromq the right solution for peer to peer video chat
Asked Answered
S

2

5

I was wondering if my idea of zeromq is right? I was thinking of writing a peer to peer chat application using zeromq but as i read further into it zeromq seems to be more low level than what one would use (tcp sockets). Is zeromq good for writing peer to peer chat app or is this use case not applicable?

Sanalda answered 6/1, 2012 at 1:19 Comment(0)
B
11

Firstly, I would disagree with your statement that zeromq is more low-level than sockets. AFAICT zeromq presents an API that is similar to the socket API. However it can also handle other things such as sending messages to multiple clients with the same send call.

Secondly, your question is not very clear: what do you mean by good: Easy to write ( since you refer to low-level), reliable, efficient enough, etc? You can use anything you want, the level of implementation complexity will of course differ.

Also, you should probably use udp instead of tcp in a video chat application, since it is more important that data arrives timeously than that all data arrives, but that is a whole different topic. If you can use zeromq with udp (and you'll have to research that), I see no reason why you couldn't use it for video chat.

The main factor you need to consider is whether you can send data between the peers fast enough in order to provide an acceptable QoS: AFAIR a maximum RTT of around 300ms is perceived as ok for conversational services.

The following link applies to VOIP but should also apply to video chat reqirements:

Most callers notice round-trip delays when they exceed 250mSec, so the one-way latency budget would typically be 150 mSec. 150 mSec is also specified in ITU-T G.114 recommendation as the maximum desired one-way latency to achieve high-quality voice. Beyond that round-trip latency, callers start feeling uneasy holding a two-way conversation and usually end up talking over each other. At 500 mSec round-trip delays and beyond, phone calls are impractical, where you can almost tell a joke and have the other guy laugh after you've left the room.

Bonspiel answered 6/1, 2012 at 8:16 Comment(0)
W
0

As Ralf points out, ZeroMQ is very high-level, not low-level. Furthermore, generally one would be advised against using ZeroMQ for video simply because UDP support is new and not yet universal (see this answer). Generally, ZeroMQ was built around using TCP sockets, and although the PUB/SUB architecture mimics UDP, you won't get real UDP performance (which is crucial for video) because the error-checking on TCP sockets makes it hard to get the latency low enough to get a smooth video stream.

Weinshienk answered 17/2, 2017 at 21:40 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.