I am creating a application with chat using java ,mongo database using servlet , I am in the need of saving the offline messages same as the facebook .if we chat while offline it should go to message box , Give some idea for doing that and suggest me some site for reference .
please help me in this
Thanks
karthick
You should add more details to your question. Here’s what I understand from it:
“I will make a servlet based web application that persists data into mongo db. One of the use cases of this app is to enable chat between multiple users, such as someone cand send a chat message to someoneelse at any given time and if that someoneelse is not connected at the moment to receive it directly, that someone should still receive the message when he next accesses my app. the question is, how do I go about enabling that last part of the use case”
Well, since you’re already using mangodb you can just save offline messages there, then for each user simply check at login time if there’s any saved messages for him, and if so display them and either mark them as “already seen” or erase them in the db…