2011-03-29 1 views
0

Tout d'abord, je ne connais pas très bien les restlets, je commence tout juste. Je voulais implémenter un chatroom de diffusion où un client envoyant un message ferait diffuser le message à tous les autres clients.Mise en place d'un service de chat en utilisant Restlet api

My attempt was to use a resource on the server side where the client would send the message(as a String) using POST. The other clients would constantly have to poll this resource to receive the message. I know this method must be horribly ineffective. 

    I was wondering if there was a better method where a change on the server side(in this case the sending of the string message) would result in the server alerting the clients of this update. 

Répondre

0

Certaines choses viendront en version 2.1 avec le nouveau connecteur nio. Dans la page Web, vous pouvez envisager d'utiliser des technologies telles que les connecteurs Web Comet ou HTML5.

Voir la page des spécifications du wiki développeur de Restlet: http://wiki.restlet.org/developers/172-restlet/g3/354-restlet.html

Thierry

Questions connexes