Products

Price/Order

Support

Partners

Testimonials

Test Results

About us

Contact
 Any Suggestions?
Bottom
 
Total posts: 3
 Author Any Suggestions?
Steve Gill

28.07.2006 11:27:18
Registered user
I'm developing a chat system (with RTC SDK of course) using memory tables to temporarily store data.  It can handle multiple, simultaneous chat sessions each with their own sets of users.  Users can join public chat sessions by selecting the appropriate session and clicking a Join button.  However for private chats a user has to be invited to join the chat because the private chats are not displayed in the chat session list.  

This is the part I'm not sure how to handle.  A user starts a private chat, selects a user from the online user list and clicks the Invite button.  What I don't know what to do is how to inform the invited user about the invitation.  Barring a way of calling a client function from the server, the only way I can think of how to handle this is to place the invitation in an Invitation table and have the client app check for any invitations for the user when it does it's check for other things (eg. messages, updating user lists, etc.).  Is there a better way of doing this in the RTC SDK?

Thanks.

SteveG
Cord Schneider

28.07.2006 13:45:51
Registered user
If you want to allow your chat server to inform a client that there's an invitation pending, you might want to have a look at the following topic:

http://www.realthinclient.org/forum/?cmd=viewtopic&topic_id=39&section_id=1

In essence you'll be doing much the same except that the 'ping' in your case will be an invitation request from another user.

If you want to adhere to a more traditional client/server approach (one where a client typically makes a request and the server responds), then you might want to adopt the approach you mention above and have the client ask if there are invitation requests.

Just a thought: instead of your client asking asking the server if there are messages, an updated user list, or invitations etc. a more optimised way might be to have a Remote Function that returns a list of things that need to be serviced. That way the server can respond by telling the client that there is nothing new available, or that it needs to collect messages and invitations only (i.e. everything else is the same as it was the last time the client checked).
Steve Gill

29.07.2006 07:47:04
Registered user
Thanks for the suggestions, Cord.  I particularly like the optimised method.  Think I'll implement that.

Regards,

Steve