unnivm / jwebsocket

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

Introduce Channels #72

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
We were thinking and discussing about "channels" in jWebSocket, here are my 
suggestions for a possible implementation. If we create a "channel" plugin this 
one could provide the following features/commands:

subscribe (client/user listening to one, more or all channel-id(s)) 
unsubscribe (client/user disconnecting from one, more or all channel-id(s)) 
send (client sending token to one, multiple or all channels) 
createChannel (new channel-id, with listen and send right id) 
deleteChannel (existing channel-id) 

Channels optionally should have a send and listen right each so that it can be 
controlled which user is allowed to listen and/or send to/from a certain 
channel. The plug-in could simply maintain a map of channel-objects and each 
channel object could maintain a list of users and currently connected websocket 
connectors for that user). 

A client sends a token to a certain channel via the send command of the channel 
plug-in. The channel plug-in iterates through all users/connectors of that 
channel and forwards the token to the corresponding connector. 

If a user subscribes to a certain channel he simply gets added to 
users/connectors list of the channel object and if he unsubscribes he gets 
removed from it. Creating and removing channels should also be controlled by 
rights and probably only be granted to admininstrators using our existing 
security factory. 

An additional option could be that if a user unsubsribed from all channels he 
automatically gets "connected" to a global/public channel. 

This could be quite powerful with an quite easy implementation.
Maybe we can leverage this model with our streaming plug-in in a later step.

Original issue reported on code.google.com by fivefeetfurther@gmail.com on 14 Oct 2010 at 1:59

GoogleCodeExporter commented 9 years ago

Original comment by fivefeetfurther@gmail.com on 14 Oct 2010 at 2:42

GoogleCodeExporter commented 9 years ago
It's okay. KISS

I think for now you need to add two commands:
 - getChannelInformation(existing channel-id)
   Information: 
     - connected clients
     - number of packets sent
     - channel creation date
     - owner
     - rights for sending and listening
     - ...

 - getChannelIds()

Greetings

Original comment by kyberne...@gmail.com on 14 Oct 2010 at 6:09

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Team, please also inform user rachidbm once this task is done and the feature 
is available. Thanks, Alex

Original comment by fivefeetfurther@gmail.com on 15 Oct 2010 at 8:51

GoogleCodeExporter commented 9 years ago

Original comment by fivefeetfurther@gmail.com on 18 Oct 2010 at 12:37

GoogleCodeExporter commented 9 years ago
implementing channels based on all the user feedback and discussions.. 

http://code.google.com/p/jwebsocket/source/browse/#svn/trunk/shared/J2SE/jWebSoc
ketServer/org/jwebsocket/plugins/channels

Original comment by mailtopu...@gmail.com on 19 Oct 2010 at 5:18

GoogleCodeExporter commented 9 years ago
A lot has been implemented here already. Please refer to the developer guide 
section and click channels to get detailed information of what exists since 
jWebSocket 1.0a5, available in the Downloads / Nightly Build section of 
jWebSocket.org. 

Original comment by fivefeetfurther@gmail.com on 27 Feb 2011 at 2:33

GoogleCodeExporter commented 9 years ago
The channels plug-in is working now, all automated tests passed.

Original comment by fivefeetfurther@gmail.com on 3 May 2012 at 4:01