among 1 of the features which we would like to implement into our application is a simple "chat among a connected users within application".
Questions: 1. Any idea how can identify all active sessions? (to see who is connected, online) 2. Any idea how to pass an information - text - into different session? (to be able to pass an information to other user)
Or is there any maybe easier options?
Many thanks, Tomas
asked 26 Sep '12, 13:28
a first version of formspider chat is running ;-)
answered 29 Sep '12, 14:44
I know there is web based chat software on the Internet. Both commercial and open source. Maybe you can install one to you application. We have no experience with any of them though.
If you decide to implement it yourself, there are to options for the infrastructure. You either push the messages to the clients or poll the server from the clients. Formspider cannot do push at this moment but it can poll the server. So every client can poll the server using the timer and retrieve any messages sent to him. Sending messages is easy. It is just a regular Formspider event.
If you develop the underlying mechanism in which you store the messages and who they are for and add polling using the timer mechanism you can develop a chat window in Formspider I guess.
answered 26 Sep '12, 21:58
Yalim K. Gerger ♦♦
It is very very easy to identify the active sessionsand implement something like this.
1) Create a table to hold the messages:
3) In the application implement a timer to refresh a datasource like this and process the results:
I didn't try it but I think it will work fine.
You can go more complex if you want to send messages to specific users but you have to do some processing on the login procedure.
answered 30 Sep '12, 02:11