yorkie-team / yorkie

Yorkie is a document store for collaborative applications.
https://yorkie.dev
Apache License 2.0
763 stars 140 forks source link

Move Client.Watch inside Client.Attach and hide it from external interface #584

Open hackerwins opened 1 year ago

hackerwins commented 1 year ago

Description:

Move Client.Watch inside Client.Attach and hide it from the external interface.

Go SDK is just used in integration tests of servers without other SDK installations. So it was OK to expose Client.Watch to the external interface. But by adding more and more features to the SDK, it is quite difficult to keep simple tests.

Let's move Client.Watch inside Client.Attach and hide it from the external interface to maintain consistency with other SDKs and simplify testing.

Why:

Keep the product simple

karockai commented 1 year ago

It looks interesting. May I work on this issue?

krapie commented 1 year ago

@karockai sure! give it a try!

krapie commented 6 months ago

Do we need to change the entire interface to perform runWatchLoop() and provide subscribe() interface just like other SDKs?

chacha912 commented 5 months ago

@krapie Yes, that seems necessary. Here's the discussion we had about what tasks need to be carried out regarding this issue, for your reference. https://codepair.yorkie.dev/community/65e02d3166a65e76f6703d15/share?token=2ij9re

hackerwins commented 4 months ago

Following #803, we need to apply the below features:

https://github.com/yorkie-team/yorkie-js-sdk/pull/772