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!

Hello Peter,

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

Regards,
Olga

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

Mark,

thank you for your response to that. We just finished writing the program on Backendless and we would prefer not to upgrade just yet. We developed our own simple chat server that is stand alone; however, our PGs are puzzled how to add it to our app that is using Backendless without incurring API count on backendless every time we send a message. Can we:

  1. integrate a third-party service (like our chat server) into an app and avoid API count when we use it?
  2. If we can, do you have a source on how to do it?

Thanks

Peter,

You can definitely integrate a third party chat server into the app if the server is running elsewhere. You would not be able to bring an external server program into our Cloud environment, however, if you run Backendless Pro on your own servers, you’d have full control of the machine(s) and can do anything you need there, but that’s a completely different pricing structure from the Backendless’ perspective.

Regards,
Mark