Couchbase support Real-time Data Push using WebSockets?

Hello,

Can Couchbase support Real-time Data Push using WebSockets like how lightstreamer.com supports? Please clarify.

Thanks.

What is the usecase you are looking for? Open a websocket connection to database, initialize some criteria, and then receive all changes which relate to this criteria? Or just receive all changes in the bucket?

Yes, Both -> “Open a websocket connection to database, receive all changes (push, pull and continuos changes) in the bucket”

hi
On iOS , websockets is the default. On Android, Websockets isn’t supported. It is supported on .Net as on 1.x

Hi Priya,

Thanks. Could you please share me the reference code or link related to this? If we need to sync through web sockets, what needs to be done on the sync gateway or server and client app side? Is there any sample code and configuration setup?

Hi
Assuming you are on iOS, I don’t believe you need to do anything for this. That’s the default transport mechanism for sync. I will let @pasin confirm.

Not still clear on the answers. Do you say “Couchbase lite iOS and Android” supports Websocket? If yes, how to do that? Can you please share sample code or references?

As mentioned in my previous responses
"Assuming you are on iOS, I don’t believe you need to do anything for this.That’s the default transport mechanism for sync". That means its what is used by default. You don’t need to do anything.
On Android, Websockets isn’t supported.” This means that it’s not supported so you can’t do anything to enable it.

Hope that clarifies.

Ok. I am not sure if my question is understandable or not. My whole doubt is what do you mean by “by default” ? When you say "…default " you are referring “Couchbase default” or “iOS default” ? When you say “Android is not supported…”, “Android Couchbase is not supported” or “Android native API itself not supported for web socket” ?

When you say "…default " you are referring “Couchbase default” or “iOS default” ?

  • Couchbase Lite .

When you say “Android is not supported…”, “Android Couchbase is not supported” or “Android native API itself not supported for web socket” ?

  • web sockets support for Android Couchbase Lite.

Any idea, Couchbase WebSocket support for Android will be included in future?