ably / specification

The Ably features spec for client library SDKs.
Apache License 2.0
0 stars 4 forks source link

Add a way to subscribe to realtime channel and presence messages without triggering an attach #202

Closed lawrence-forooghian closed 2 days ago

lawrence-forooghian commented 3 weeks ago

Background

This arose in the context of https://github.com/ably-labs/ably-chat-swift/issues/18.

The JS Chat SDK has decided that in its API, subscribing to a room’s messages or presence messages should not trigger a channel attach operation (see decision record). In order to do this, it uses ably-js private API in order to, essentially, call RealtimeChannel#subscribe and RealtimePresence#subscribe in a way that does not trigger the RTL7c or RTP6c implicit attach.

For the Swift and Kotlin Chat SDKs, I would like us to instead be able to use an API that’s properly specified in this spec, even if marked as "experimental and for Ably-authored SDKs" only.

Suggested approach

Add some sort of subscribeWithoutImplicitAttach method to RealtimeChannel and RealtimePresence. Think of a way of not confusing users with this method.

jamienewcomb commented 2 weeks ago

@lawrence-forooghian @umair-ably @ttypic here also https://ably.atlassian.net/browse/ECO-4959 if one of you can assign yourselves so we can find a way forward

lawrence-forooghian commented 6 days ago

Gonna take a look