Red5 WebSocket Plugin and Red5 Scopes (rooms) integration

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Red5 WebSocket Plugin and Red5 Scopes (rooms) integration

Luiz Filipe Figueiredo do Couto
Hello guys,

I've been using red5 open source since red5 0.6 (2007) and now i'm migrating to the new Red5 to make use of webSockets and re-use our existing business rules on red5. (we're migrating our clients from flash to htm5 too).
Every code was migrated and seems good and ok.

I couldn't find any good documentation about websockets and red5, i know there is a chat demo included with red5 but there is no docs regarding integrating Red5 apps, scopes, rooms and websocket plugin.

What i'm trying to accomplish is to integrate my Red5 Application with WebSocket plugin in a manner that new connections that come from websocket client make use of my existing methods and classes inside RoomJoin or RoomConnect on the Application class.
On the other hand when my Red5 Application  needs to talk with some websocket Client the ApplicationAdapter then need to execute some methods on the WebSocket plugin.

I need to support Flash and html5 clients in same scopes (rooms and apps).

Do you have some examples of how integrate WebSocket Plugin with Rooms, scopes and Application in way that new connections coming or going from websocket clientes reach appConnect or roomConnect for instance ?
Do i need to build some kind of Router to accomplish my goals ?

Thanks in advance !

Luiz Filipe

--

---
You received this message because you are subscribed to the Google Groups "red5" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Red5 WebSocket Plugin and Red5 Scopes (rooms) integration

Rajdeep Rath
Hi 

Welcome to Red5!!

Sorry to know that resources available were not that helpful to your cause. Let me try to help you with what i can.

1. The WebSocket chat is a great example and you should  study that carefully if you want to bridge flash clients and WebSocket clients. Notice how router context is used to route messages between SharedObjects and WebSocket clients.

2. Remember that  in Java these are just 2 objects ApplicationAdapter <=> WebSocketDataListener (see chat example). They exist in the same context governed by red5-web.xml. You can easily setup message passing communication link between then with some programming. Just see the chat example and see how web.handler and WebSocket listener are registered in spring. Then think how to connect them.

3. You can create a proxy to help each site execute a method on the other side which may conform to a common interface (deal).


4. Unlike Red5 scopes Websockets do not really have rooms.ie: ws://localhost:8081/chat/room1/room2 (wont work)


5. Think of it as a Single level application where there is no depth and create scopes yourself using query params. See this for example. http://www.jpablo128.com/multi-room-websockets-server-with-tornado-i-basic-chat-server/


6. Instead of thinking of scopes as /room/room2 think like ?room=myroom or ?room=myroom&room=room2 (here this is a an array of 2 items defining depth in order as the names appear)


7. Now use shared objects wisely to spawn as many rooms you want at a single level. name = so+room1, name = so+room1+room2 etc:


8. Websocket will also be able to give you the room params as discussed before. (6)


9. Finally ,create your own logic to join both worlds using the unique string that identifies the same room from flash and websockets. Then make use of the Router concept (as shown in chat example) to relay messaged between the two types of clients for the same room.


Good luck!!



On Tue, Jun 28, 2016 at 3:12 AM, Luiz Filipe Figueiredo do Couto <[hidden email]> wrote:
Hello guys,

I've been using red5 open source since red5 0.6 (2007) and now i'm migrating to the new Red5 to make use of webSockets and re-use our existing business rules on red5. (we're migrating our clients from flash to htm5 too).
Every code was migrated and seems good and ok.

I couldn't find any good documentation about websockets and red5, i know there is a chat demo included with red5 but there is no docs regarding integrating Red5 apps, scopes, rooms and websocket plugin.

What i'm trying to accomplish is to integrate my Red5 Application with WebSocket plugin in a manner that new connections that come from websocket client make use of my existing methods and classes inside RoomJoin or RoomConnect on the Application class.
On the other hand when my Red5 Application  needs to talk with some websocket Client the ApplicationAdapter then need to execute some methods on the WebSocket plugin.

I need to support Flash and html5 clients in same scopes (rooms and apps).

Do you have some examples of how integrate WebSocket Plugin with Rooms, scopes and Application in way that new connections coming or going from websocket clientes reach appConnect or roomConnect for instance ?
Do i need to build some kind of Router to accomplish my goals ?

Thanks in advance !

Luiz Filipe

--

---
You received this message because you are subscribed to the Google Groups "red5" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--

---
You received this message because you are subscribed to the Google Groups "red5" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Red5 WebSocket Plugin and Red5 Scopes (rooms) integration

Luiz Filipe Figueiredo do Couto
In reply to this post by Luiz Filipe Figueiredo do Couto
Hello Rajdeep,

You have clarified my questions with so much details that i don't have any doubt on what i need to do.

When i finish this i'll create some documentation to share with the community.

Thanks so much !!!

Luiz

On Monday, June 27, 2016 at 6:42:42 PM UTC-3, Luiz Filipe Figueiredo do Couto wrote:
Hello guys,

I've been using red5 open source since red5 0.6 (2007) and now i'm migrating to the new Red5 to make use of webSockets and re-use our existing business rules on red5. (we're migrating our clients from flash to htm5 too).
Every code was migrated and seems good and ok.

I couldn't find any good documentation about websockets and red5, i know there is a chat demo included with red5 but there is no docs regarding integrating Red5 apps, scopes, rooms and websocket plugin.

What i'm trying to accomplish is to integrate my Red5 Application with WebSocket plugin in a manner that new connections that come from websocket client make use of my existing methods and classes inside RoomJoin or RoomConnect on the Application class.
On the other hand when my Red5 Application  needs to talk with some websocket Client the ApplicationAdapter then need to execute some methods on the WebSocket plugin.

I need to support Flash and html5 clients in same scopes (rooms and apps).

Do you have some examples of how integrate WebSocket Plugin with Rooms, scopes and Application in way that new connections coming or going from websocket clientes reach appConnect or roomConnect for instance ?
Do i need to build some kind of Router to accomplish my goals ?

Thanks in advance !

Luiz Filipe

--

---
You received this message because you are subscribed to the Google Groups "red5" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Red5 WebSocket Plugin and Red5 Scopes (rooms) integration

Rajdeep Rath

You are most welcome ☺

On Jun 28, 2016 6:08 AM, "Luiz Filipe Figueiredo do Couto" <[hidden email]> wrote:
Hello Rajdeep,

You have clarified my questions with so much details that i don't have any doubt on what i need to do.

When i finish this i'll create some documentation to share with the community.

Thanks so much !!!

Luiz

On Monday, June 27, 2016 at 6:42:42 PM UTC-3, Luiz Filipe Figueiredo do Couto wrote:
Hello guys,

I've been using red5 open source since red5 0.6 (2007) and now i'm migrating to the new Red5 to make use of webSockets and re-use our existing business rules on red5. (we're migrating our clients from flash to htm5 too).
Every code was migrated and seems good and ok.

I couldn't find any good documentation about websockets and red5, i know there is a chat demo included with red5 but there is no docs regarding integrating Red5 apps, scopes, rooms and websocket plugin.

What i'm trying to accomplish is to integrate my Red5 Application with WebSocket plugin in a manner that new connections that come from websocket client make use of my existing methods and classes inside RoomJoin or RoomConnect on the Application class.
On the other hand when my Red5 Application  needs to talk with some websocket Client the ApplicationAdapter then need to execute some methods on the WebSocket plugin.

I need to support Flash and html5 clients in same scopes (rooms and apps).

Do you have some examples of how integrate WebSocket Plugin with Rooms, scopes and Application in way that new connections coming or going from websocket clientes reach appConnect or roomConnect for instance ?
Do i need to build some kind of Router to accomplish my goals ?

Thanks in advance !

Luiz Filipe

--

---
You received this message because you are subscribed to the Google Groups "red5" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--

---
You received this message because you are subscribed to the Google Groups "red5" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.