shettima / bigbluebutton

Automatically exported from code.google.com/p/bigbluebutton
0 stars 0 forks source link

Switch from using Shared Object to Connection Invocation #1348

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Need to convert broadcasting of message from red5 to connection invocation 
instead of shared object as it is more stable.

Part of the work has been done already. Need to convert the rest.

Here's how the chat was implemented.

Changing from shared object to connection invocation.

The important classes are:

This maintains a list of all connections to Red5.
https://github.com/bigbluebutton/bigbluebutton/blob/master/bigbluebutton-apps/sr
c/main/java/org/bigbluebutton/conference/ConnectionInvokerService.java

When the client connects/disconnects, this updates the list of connections.
https://github.com/bigbluebutton/bigbluebutton/blob/master/bigbluebutton-apps/sr
c/main/java/org/bigbluebutton/conference/BigBlueButtonApplication.java

On the client side, this maintains a connection to the server. It also accepts 
listeners for messages from the server.
https://github.com/bigbluebutton/bigbluebutton/blob/master/bigbluebutton-client/
src/org/bigbluebutton/main/model/users/NetConnectionDelegate.as

The listener implements the following interface.
https://github.com/bigbluebutton/bigbluebutton/blob/master/bigbluebutton-client/
src/org/bigbluebutton/main/model/users/IMessageListener.as

Here is how the chat was converted from shared object to connection invocation.

Add the connection invoker service into the ChatApplication.
https://github.com/bigbluebutton/bigbluebutton/blob/master/bigbluebutton-apps/sr
c/main/webapp/WEB-INF/bbb-apps.xml#L90

The ChatApplication is responsible for broadcasting the messages to all clients 
or to a particular client.
https://github.com/bigbluebutton/bigbluebutton/blob/master/bigbluebutton-apps/sr
c/main/java/org/bigbluebutton/conference/service/chat/ChatApplication.java#L45

https://github.com/bigbluebutton/bigbluebutton/blob/master/bigbluebutton-apps/sr
c/main/java/org/bigbluebutton/conference/service/chat/ChatApplication.java#L84

https://github.com/bigbluebutton/bigbluebutton/blob/master/bigbluebutton-apps/sr
c/main/java/org/bigbluebutton/conference/service/chat/ChatApplication.java#L91

The ChatService contains methods called from the client.
https://raw.github.com/bigbluebutton/bigbluebutton/master/bigbluebutton-apps/src
/main/java/org/bigbluebutton/conference/service/chat/ChatService.java

The ChatMessageService is responsible for communicating with the server.
https://github.com/bigbluebutton/bigbluebutton/blob/master/bigbluebutton-client/
src/org/bigbluebutton/modules/chat/services/ChatMessageService.as#L13

The MessageSender will invoke methods on the ChatService on the server side.
https://github.com/bigbluebutton/bigbluebutton/blob/master/bigbluebutton-client/
src/org/bigbluebutton/modules/chat/services/MessageSender.as

The MessageReciever will register as a listener to the NetConnectionDelegate. 
When a message arrives, the NetConnectionDelegate will forward the message
to all listeners. The listeners will then handle messages they are interested 
in.
https://github.com/bigbluebutton/bigbluebutton/blob/master/bigbluebutton-client/
src/org/bigbluebutton/modules/chat/services/MessageReceiver.as

The MessageReciver and MessageSender are setup in the ChatEventMap.
https://github.com/bigbluebutton/bigbluebutton/blob/master/bigbluebutton-client/
src/org/bigbluebutton/modules/chat/maps/ChatEventMap.mxml#L90

Original issue reported on code.google.com by ritza...@gmail.com on 24 Oct 2012 at 4:35

GoogleCodeExporter commented 9 years ago

Original comment by ffdixon@gmail.com on 11 Nov 2012 at 4:35

GoogleCodeExporter commented 9 years ago

Original comment by ritza...@gmail.com on 18 Apr 2013 at 5:48

GoogleCodeExporter commented 9 years ago
Removed any use of shared object to send messages between bbb-apps and client.

Original comment by ritza...@gmail.com on 29 Jul 2014 at 6:27