Implementing a Real-Time Chat System with Meteor - Emmanuel Katto Uganda

Hi everyone, I am Emmanuel Katto. I’m building a real-time chat system for a Meteor app, and I’m having trouble implementing a scalable and efficient solution. I want to allow users to chat with each other in real-time, and I need help figuring out the best way to do this.

I’ve tried using the Meteor.publish and Meteor.subscribe methods to send and receive messages, but I’m experiencing some issues. Specifically:

Messages are not being delivered in real-time (there's a delay of around 1-2 seconds before messages are received)
The chat window is not updating correctly when new messages are received (some messages are lost or duplicated)

Thanks!
Emmanuel Katto

You might want to check this for inspiration:

We created a custom chat in our app, and to make it performant, we are publishing only the details of the chat room. The messages and other data are being fetched through methods and automatically updated depending on the changes in the chat room.

What front-end are you using?

Thanks @rjdavid ! I’ll check this.

not seasoned per se but id say you avoid reinventing the wheel

Hi @emmanuelkattouganda,

not exactly related to your question (yet) but wanted to ask what is your frontend.