Hi folks, 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 |
Ok, Guys, a first version of formspider chat is running ;-) A "problems":
Hi Tomas, Very Nice! I have been thinking about building this. Push messages would be best, but at least the timer execution in the background will be a must for a smooth user experience. My vote for that one ! Michiel A.
(30 Sep '12, 02:59)
Michiel A
Hi Tomas, We are not planning to add a push feature to Formspider in the near future. Regards, Ibrahim
(01 Oct '12, 04:19)
Ibrahim Sand... ♦♦
|
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. Hi Yalim, Thanks for the reply. I don't want to use an external programs, as I would like to have all within formspider. Based on your answer, at this stage it's not possible to notify a user with a PUSH message. Workaround is a timer which would run some action to check for unreceived messages from database which were sent to user. OK, an is it possible to identify ACTIVE sessions? Currently I know all users who started a new session - after successful login. If user press a logout button, then this ends a session. Is it possible to implement a session timeout functionality? If user left an application open for predefined time, then an automatic logout should occur. Then it will be easy to have list of active sessions => active users. Thanks, Tomas
(26 Sep '12, 23:26)
Tomeo
Hi Tomas, It's possible to define a session timeout value for the application through the "Session Timeout" attribute (You can set this attribute through the application edit dialog, under the "Session" tab). Then, you can use the "Session Expired" event of your application, this is where your logout action will be called (you can assign an action to this event through the application edit dialog, under the "Events" tab). However, Formspider does not push the session expiration information to the client, therefore, in your case, you should poll the server periodically using the timer in order to force the server to generate the session expired event if it's necessary. I will prepare a demo application today. Regards, Ibrahim
(27 Sep '12, 01:39)
Ibrahim Sand... ♦♦
Hi Ibrahim, thanks for an explanation and for your help. Kind regards, Tomas
(27 Sep '12, 07:03)
Tomeo
|
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. Regards |