• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

How to have a Chat feature in java-based application?

 
Ranch Hand
Posts: 240
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Assume there is a healthcare web-application where you want to provide chat feature so that the patient and chat with his doctor after logging into their accounts.
How to have a chat feature in your application? Do you need third party API integration?


Thanks in advance.
 
Bartender
Posts: 7645
178
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You don't need a 3rd party API (and for something privacy-critical such as healthcare you probably want to avoid 3rd party code as much as possible). For something browser-based, these days I'd advise to use web sockets. There's an example web app in https://coderanch.com/t/685060/java/web-app-Server-Events-SSE
 
Arun Singh Raaj
Ranch Hand
Posts: 240
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
according to JMS, it says it is used to send and receive messages between two applications. What kind of 'messages' it talks about? What is the real time example of these 'messages' in Java based application? Is it like chat messages?
Is there any role of JMS if you want to send SMS to user, to send email to the user, to have chat with the user?

Thanks.
 
Tim Moores
Bartender
Posts: 7645
178
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JMS is an entirely different kind of message, used as an architectural feature between different application components. It has nothing to do with SMS, Chat or email.
 
Arun Singh Raaj
Ranch Hand
Posts: 240
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I came across some information that JMS can be used to create "message queues", is it?

And I have a question about "notification" 🔔 feature in a web application:
Who does initiate the notification in a user-server application? Does server send the notifications to the client without client's request or the client requests for the notifications (like an ajax call is made automatically from client side as the client signs into his account)? How does it usually happen technically?


Thanks.
 
Arun Singh Raaj
Ranch Hand
Posts: 240
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm confused about JMS.
I want to repeat my question,  Is there no involvement of JMS in sending email, SMS, have chat with user and send "notification" to user's profile?
 
Tim Moores
Bartender
Posts: 7645
178
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I came across some information that JMS can be used to create "message queues", is it?


Yes, JMS is the standard Java API for message queues, like ActiveMQ and OpenMQ.

Who does initiate the notification in a user-server application? Does server send the notifications to the client without client's request or the client requests for the notifications (like an ajax call is made automatically from client side as the client signs into his account)? How does it usually happen technically?


Both are possible. The client can pull (with an AJAX call) or the server can push (using server-sent events or web sockets).

I'm confused about JMS. I want to repeat my question,  Is there no involvement of JMS in sending email, SMS, have chat with user and send "notification" to user's profile?


It is conceptually possible that an SMS/email/chat implementation uses message queues (and thus JMS) in the background, but that's an implementation detail that has nothing to do with SMS/email/chat. Please get the notion out of your head that the "message" in "message queueing" has anything to do with the "message" in SMS/email/chat.
 
Arun Singh Raaj
Ranch Hand
Posts: 240
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the help
 
Arun Singh Raaj
Ranch Hand
Posts: 240
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When you need to send SMS to the client, how would you add them to the queue?
 
Tim Moores
Bartender
Posts: 7645
178
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Again, SMS have nothing to do with any "queue". You would sign up with an SMS service provider - search for "bulk sms sending" or some such phrase to find those.
 
and POOF! You're gone! But look, this tiny ad is still here:
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
reply
    Bookmark Topic Watch Topic
  • New Topic