Hi everyone,
I’m building a dating site and, like many of you, I’ve run into the issue with WUs.
Has anyone ever found a concrete solution for building a real-time chat between users without a high WU consumption?
From what I’ve understood, searches are the main culprit for WUs, but I still haven’t found a valid workaround. Ideally, I’d like to build the chat in a classic way: a list of conversations on the left and, on the right, the messages exchanged with the selected user.
Thanks in advance to anyone who can share their experience!
If chats play a big role in your app, I would recommend using external solutions, or build your own stack and connect it to your Bubble app. That’s what I would do.
Anyway, what’s the WU like for your chat? Does your user subscription revenue not cover your costs?
2 Likes
It’s still a work in progress, but even during my early tests I’ve realized that a lot of WUs are wasted on messages and everything else. Unfortunately, it really needs to be in real time, otherwise it doesn’t make sense for my use case.
So, is the best option to rely on external solutions? Do you have any suggestions for something easy to learn and cost-effective that would fit my needs?
To understand better your WU costs, I need a better view of datatypes and searches you are doing. What exaclty costs too much in WU metrics?
I successfully implemented a chat solution using Cloudflare Durable Objects that has worked really well for this scenario. Durable Objects are particularly effective for real-time chat applications as they maintain state and handle WebSocket connections efficiently without consuming WUs.
The architecture involves creating a Durable Object for each chat room/conversation, which manages the WebSocket connections and message routing between users. This approach provides real-time capabilities while being cost-effective since it operates independently from Bubble WU.
5 Likes
This would have been my suggested solution. There’s no cheaper option from my experience.
3 Likes
It is the cost to create a message and the cost to fetch the conversation and all messages.
2 Likes
That sounds like a great solution! 
Is there any tutorial or guide on how to build a chat using Cloudflare Durable Objects with Bubble? Could you share some tips to get started?
I’ve also seen many people suggesting Xano as an alternative — what’s your opinion on that?
It depends on how comfortable you are with coding, but I personally would go for a Cloudflare stack. I use AI to help me build my complex stacks.
Anyway, CF DO docs has a demo tutorial for you to code along with.
3 Likes
As our colleague mentioned, implementing this solution requires basic coding experience and familiarity with Cloudflare Workers. If you would like assistance with this topic, I am available to provide consulting and coaching services to help you develop and implement this solution. Please feel free to send me a private message to discuss the details further.
1 Like