muggot / openmcu

openmcu.ru
Other
219 stars 154 forks source link

Architecture does not scale well #1

Open synnack opened 10 years ago

synnack commented 10 years ago

Having the web frontend, MCU, H.323 and SIP in one package does not scale and is a single point of failure.

I'm currently working on creating a web frontend which handles conference scheduling, realtime presiding using WebRTC and authentication through SAML federation.

To do this, I need to interface with the MCU using either websockets+json, ajax+json or xmlrpc. At present, I have a working WebRTC client for MedoozeMCU, and would like to get it working using OpenMCU-ru. This is the architecture I'm proposing:

          clients                   presider/webrtc clients
  | | | | | | | | | | | |             | | | | | | | | | |
 ________________________           __________ __________
|            |            |         |          |          |
| FreeSwitch | FreeSwitch |<--[DB]--| Frontend | Frontend |
|____________|____________|         |__________|__________|
      |            |                      |          |
 [SIP/RTP routed to MCUs]   [Realtime control+RTP traffic routed to
MCUs]    
 _______ _______ _______ _______ _______ _______ _______
|       |       |       |       |       |       |       |
|  MCU  |  MCU  |  MCU  |  MCU  |  MCU  |  MCU  |  MCU  |
|_______|_______|_______|_______|_______|_______|_______|

I currently have this working with MedoozeMCU at http://github.com/synnack/videoconference/ with realtime participation and drag and drop support for the conference presider.

It is prepared for OpenMCU-ru, but I stopped working on it because of the lack of SRTP/STUN which is required for use with WebRTC RTP streams.

kay27 commented 10 years ago
  1. Web frontend is one of the main goals and features of OpenMCU-ru. It does not obstruct the addition of websocket: we may add and use it. As for AJAX - it's widely used at the moment and could be easily improved/expanded for everything you need. Anyway, web server is implemented in ptlib library that is "low level" for OpenMCU-ru (openmcu depends on h323plus, h323plus depends on ptlib).
  2. H.323 is also the main goal: unfortunately asterisk (and others) does not provide as qualitative video as OpenMCU-ru does. I mean first of all capability negotiation of H.323/H.245. A generous amount of hardware endpoint appliances use H.323 at the moment, and we don't want to drop the support of them!

Please feel free to tell me if I'm wrong.

We're also dreaming about built-it browser-based endpoint, based on WebRTC or something else. There are several STUN implementation in OpenMCU-ru: at least in h323plus and sofia-sip libraries. There are no SRTP right now, but it could be adopted from OPAL project. So please tell us what do you need at the first and we could try :)

synnack commented 10 years ago

Well, SRTP support would be the first thing, because that would allow a websocket <-> SIP gateway (like at https://github.com/synnack/videoconference) to use WebRTC already.

Right now, there is no clean AJAX interface, the responses are scripted inside the long-poll frame. This will not work with anything outside the browser. It would be nice to have something like a websocket+json interface for realtime transmissions of events back-and-forth, it could be used by both the internal webinterface instead of the long-poll frame and by other webfrontends (directly or indirectly). For a reference javascript implementation, als see my git tree.