Wednesday, June 15, 2016

Re: Advice for implementing a messaging system

With Errai you can do this because it provides intuitive API for signaling and messaging, and publish/subscribe mechanism. But if you want the persistence of messages you have to do it your own. To develop message delivery you don't need to persiste messages. You need persistence e.g. to cover offline requirements and re-send policy of messages. If you don't need to develop an "enterprise application" i think you need only a simple websocket client library to send messages and a websocket server (such as jetty) to receive messages. With these two components you just have a working chat system. With pure websockets you need to write some codes to implement a publish/subscribe pattern with topic. Your topic is the group of user interested the same stream of messages sent over websockets. In this way you can provides broadcast, multicast, and p2p messaging mechanism.
If you don't know Errai framework i think you can get the job done with a simple websockets library, because you have to understand how Errai works.

Il giorno mercoledì 15 giugno 2016 14:45:06 UTC+2, Olar Andrei ha scritto:
Hello

I want to implement a messaging system for my application. My application has users, who connect based on a username and password. I want to make them able to send messages one to another.
I would like to know what ways/steps how this could be implemented.

For now I only got one ideea, which is the following:
Every user can see a list with the rest of the users. I would add a button next to the user, and when that button will be clicked, a new panel will open where the user is typing the message.
I was thinking to insert every message in a DB table, with columns like "source", "destination", "date" ... The one who sends is the source, and the one who recieves is the destination, and based on that each user can see what he recevied and what he send.

Are there any other ways to implement this ? 

P.S: I once saw something of Errai. How can Errai be used in order to implement this ? How is that different ?

Thanks in advance,
Andrei

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment