Backendless Support
 
Answered

Pub/Sub ends up being impractical - what am I doing wrong?

I am using pub/sub model for user chat, and it literally kills me: I have a channel per user to user chat, and thus if I have 8 people I am talking to, application generates 8 polls (1 poll per channel) per second, or 480 API requests per minute. Clearly, this is not the going to work. Even poling every 3 seconds, would make this impractical.

Could you please tell me what should we be using for chat application if not this? I love every aspect of Backendless - extremely well thought out and built service. Simply love it and I can't imagine Backendless offering Messaging where you cannot even use if for 50 people to chat together! How would I go about using it to allow people to chat? If I poll ever second per each user I am talking to (one-on-one communication) it would pretty much destroy API limit, and probably half of the universe with it as well.

Thank you!

Leave a Comment

Comments (2)

photo
1

Hello Peter,

You can create one channel for all people that chat together.

Regards,

Olga

photo
1

Hi Peter,

Thank you for your kind words about Backendless!

The cumulative API traffic is what taxes the backend system the most - that is why the pricing reflects that. I understand that polling is not the most efficient approach and we're working to change the mechanics of pub/sub in version 4. For instance, message delivery will be changing to use silent push notifications thus completely avoiding polling requests.

Regards,

Mark