Disclosure: When you purchase a service or a product through our links, we sometimes earn a commission.Β Read More..

FREE Email Marketing Course

Good Way to Implement a Web-based Chat Application

October 13, 2019 By admin

Software https://softwareengineering.stackexchange.com/questions/387571/good-way-to-implement-a-web-based-chat-application

Some web applications have been developed by me but they all only worked with databases.

This means that they operate using a approach where the following sequence takes place:

  1. A Client application (the UI for example) makes a petition to my program.

  2. The app and this database connect.

  3. An operation is performed by the app.

  4. The program disconnects from the database.

  5. An effect is returned by the program into the UI.

NOTE: My program generates a DB Connection for every single petition to take care of unexpected Server functions and other instances where the DB may be unavailable.

I am trying to develop a Chat application that is web-based similar to the one in Zoom or LinkedIn Meetings.

I plan to use XMPP with Openfire since the XMPP Client Library as the Smack API and the Server. Because XMPP is a normally excellent option for immediate Messaging programs, this is.

My primary issue is that the aforementioned fire-and-forget approach won’t be relevant because User links need to be kept alive for as long as the user is logged in to the UI (otherwise they will seem to be Offline to additional Clients ).

One more factor to consider is that rather than the customary 1-is-to-1 connection of standalone clients like WhatsApp and Skype (in which the app installed to a user’s machine just needs to worry about the specific User logged into it), this program will have to have a 1-is-to-many strategy.

My questions are as follows:

  1. What’s a good method to employ these requirements to be handled by a Chat program?

  2. 1 approach to the relationship is to make a new Thread. But, I am having some trouble visualizing the Chat program will keep track of.

  3. I presumed I need to keep Connections connected. Is this essential?

  4. Am I overlooking some concepts here which will make it easier to implement?

Any advice would be appreciated.