Question

I want to add the feature to my Java EE 6-Web-Application (JSF 2.0/EJB 3.1/Hibernate with MySQLDB) that registered users can write messages to each other (e.g. like writing a message on Facebook). I googled around but didn't find a good example. So my question is:

How would you design such a feature?

1) Writing Entity Object with the message to the DB?

2) Using JMS? But wouldn't that be transient?

3) Totally different?

Would be pleased with any kind of input (links, suggestions).

Was it helpful?

Solution

i searched about that before...

if you want to make simple messaging between them, build your own one using database relations

but if you want complex one, so this would a lot of work

-- many people suggest JMS if you want a professional work but i also recommend Apache ActiveMQ

see the link to Apache ActiveMQ

OTHER TIPS

Facebook uses MQTT (https://www.facebook.com/notes/facebook-engineering/building-facebook-messenger/10150259350998920) ... But they cover mobile platforms also ... You can consider using that.

If you are just targeting at taking inputs from browsers and displaying the messages received on refreshing a page, you can go with database approach.

JMS will work for you, but you need a JMS provider for that.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top