Skip to content

Conversation

@VeskeR
Copy link
Contributor

@VeskeR VeskeR commented Jul 7, 2025

Resolves PUB-1825, PUB-1826

@github-actions github-actions bot temporarily deployed to staging/pull/343 July 7, 2025 07:12 Inactive
VeskeR added a commit to ably/ably-js that referenced this pull request Jul 7, 2025
Spec IDs from [1].
This also fixes a couple of minor spec implementation details.

[1] ably/specification#343
@VeskeR VeskeR added the live-objects Related to LiveObjects functionality. label Jul 7, 2025
@VeskeR VeskeR changed the title [PUB-1825, PUB-1826] Add Objects spec for applying incoming OBJECT messages [PUB-1825, PUB-1826] Add spec for applying incoming OBJECT messages Jul 7, 2025
lawrence-forooghian added a commit to ably/ably-liveobjects-swift-plugin that referenced this pull request Jul 7, 2025
Based on [1] at 2b5651e. Development approach as described in 4494033.

[1] ably/specification#343
lawrence-forooghian added a commit to ably/ably-liveobjects-swift-plugin that referenced this pull request Jul 7, 2025
Based on [1] at 2b5651e. Development approach as described in 4494033.

[1] ably/specification#343
@VeskeR VeskeR force-pushed the objects-operation-application branch from 2b5651e to 29276a5 Compare July 8, 2025 09:19
@github-actions github-actions bot temporarily deployed to staging/pull/343 July 8, 2025 09:19 Inactive
VeskeR added a commit to ably/ably-js that referenced this pull request Jul 8, 2025
Spec IDs from [1].
This also fixes a couple of minor spec implementation details.

[1] ably/specification#343
lawrence-forooghian added a commit to ably/ably-liveobjects-swift-plugin that referenced this pull request Jul 8, 2025
Based on [1] at 29276a5. Development approach as described in 4494033.

[1] ably/specification#343
lawrence-forooghian added a commit to ably/ably-liveobjects-swift-plugin that referenced this pull request Jul 8, 2025
This applies the changes from [1] at 29276a5. Development approach as
described in 4494033.

[1] ably/specification#343
lawrence-forooghian added a commit to ably/ably-liveobjects-swift-plugin that referenced this pull request Jul 8, 2025
Based on [1] at 29276a5. I wrote the implementation.

We have a separate issue for applying RTO8a's buffering during a sync,
so I haven't done that here.

[1] ably/specification#343
lawrence-forooghian added a commit to ably/ably-liveobjects-swift-plugin that referenced this pull request Jul 8, 2025
Based on [1] at 29276a5. I wrote the implementation, and for the tests
followed the development approach described in 4494033.

We have a separate issue for applying RTO8a's buffering during a sync,
so I haven't done that here.

[1] ably/specification#343
lawrence-forooghian added a commit to ably/ably-liveobjects-swift-plugin that referenced this pull request Jul 8, 2025
This is based on the values stated in RTOL3 of [1] at 29276a5. (We'll
formalise the fact that these are common LiveObject properties in an
upcoming commit.)

[1] ably/specification#343
lawrence-forooghian added a commit to ably/ably-liveobjects-swift-plugin that referenced this pull request Jul 8, 2025
lawrence-forooghian added a commit to ably/ably-liveobjects-swift-plugin that referenced this pull request Jul 8, 2025
Based on [1] at 29276a5. Development approach as described in cb427d8.

[1] ably/specification#343
lawrence-forooghian added a commit to ably/ably-liveobjects-swift-plugin that referenced this pull request Jul 8, 2025
This applies the changes from [1] at 29276a5. Development approach as
described in cb427d8.

[1] ably/specification#343
lawrence-forooghian added a commit to ably/ably-liveobjects-swift-plugin that referenced this pull request Jul 8, 2025
Based on [1] at 29276a5. I wrote the implementation, and for the tests
followed the development approach described in cb427d8.

We have a separate issue for applying RTO8a's buffering during a sync,
so I haven't done that here.

[1] ably/specification#343
lawrence-forooghian added a commit to ably/ably-liveobjects-swift-plugin that referenced this pull request Jul 8, 2025
Based on [1] at 29276a5. I wrote the implementation, and for the tests
followed the development approach described in cb427d8.

We have a separate issue for applying RTO8a's buffering during a sync,
so I haven't done that here.

[1] ably/specification#343
lawrence-forooghian added a commit to ably/ably-liveobjects-swift-plugin that referenced this pull request Jul 9, 2025
Based on [1] at 29276a5. I wrote the implementation, and for the tests
followed the development approach described in cb427d8.

[1] ably/specification#343
lawrence-forooghian added a commit to ably/ably-liveobjects-swift-plugin that referenced this pull request Jul 9, 2025
Based on [1] at 29276a5. I wrote the implementation, and for the tests
followed the development approach described in cb427d8.

[1] ably/specification#343
lawrence-forooghian added a commit to ably/ably-liveobjects-swift-plugin that referenced this pull request Jul 9, 2025
Based on [1] at 29276a5. I wrote the implementation, and for the tests
followed the development approach described in cb427d8.

[1] ably/specification#343
** @(RTLC7d)@ The @ObjectMessage.operation.action@ field (see "@ObjectOperationAction@":../features#OOP2) determines the type of operation to apply:
*** @(RTLC7d1)@ If @ObjectMessage.operation.action@ is set to @COUNTER_CREATE@, apply the operation as described in "RTLC8":#RTLC8, passing in @ObjectMessage.operation@
*** @(RTLC7d2)@ If @ObjectMessage.operation.action@ is set to @COUNTER_INC@, apply the operation as described in "RTLC9":#RTLC9, passing in @ObjectMessage.operation.counterOp@
*** @(RTLC7d3)@ Otherwise, log a warning that an object operation message with an unsupported action has been received, and discard the current @ObjectMessage@ without taking any action
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ably-js implementation is incorrect, and I intend to change it.
Throwing an error does not adhere to the robustness principle that our SDKs should follow https://sdk.ably.com/builds/ably/specification/main/features/#RTF1, and ably-js LiveObjects implementation violates this principle in multiple places by throwing errors instead of logging a debug/warning message and ignoring the operation.

The spec is correct in this case

Copy link
Collaborator

@sacOO7 sacOO7 Sep 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, in case of kotlin, we catch all types of exceptions at one place where processing of incoming liveobject message starts.
https://github.com/ably/ably-java/blob/993b308f93090c4d6ccda4870ac21cf64f41f7b9/liveobjects/src/main/kotlin/io/ably/lib/objects/DefaultRealtimeObjects.kt#L231-L244

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can add an explicit liveobjects spec point for the same.

I don't think we should be that explicit in the spec. It is up to the implementation to implement it in the most convenient/idiomatic for the platform. If the spec instructs to log something at a specific point (and even that might change as a result of #374) it should be as concise as possible

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can add an explicit liveobjects spec point for the same.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think a spec point like that would be specific to LiveObjects; it would establish generic logging rules for the entire spec.
Feel free to create an issue or open a PR to clarify the logging procedure in the spec, but I don't believe it should be included in this PR.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’ve added the same comment to the previous issue: #362
One of the problems was that ably-js was throwing an internal exception, which ideally should be caught. This could potentially happen in other SDKs unknowingly or runtime exceptions can be thrown. Introducing an explicit spec point for such a mechanism would help improve the overall robustness and consistency of the SDKs.

VeskeR added a commit to ably/ably-js that referenced this pull request Jul 22, 2025
Spec IDs from [1].
This also fixes a couple of minor spec implementation details.

[1] ably/specification#343
VeskeR added a commit to ably/ably-js that referenced this pull request Jul 22, 2025
Spec IDs from [1].
This also fixes a couple of minor spec implementation details.

[1] ably/specification#343
VeskeR added a commit to ably/ably-js that referenced this pull request Jul 22, 2025
Spec IDs from [1].
This also fixes a couple of minor spec implementation details.

[1] ably/specification#343
VeskeR added a commit to ably/ably-js that referenced this pull request Jul 22, 2025
Spec IDs from [1].
This also fixes a couple of minor spec implementation details.

[1] ably/specification#343
@VeskeR VeskeR force-pushed the objects-access-api branch from 7791cd3 to 24e151e Compare September 3, 2025 08:46
@VeskeR VeskeR force-pushed the objects-access-api branch from 24e151e to 08a837d Compare September 5, 2025 08:06
@VeskeR VeskeR force-pushed the objects-operation-application branch from 4a1f7c6 to 6524bc0 Compare September 5, 2025 08:20
@VeskeR VeskeR force-pushed the objects-operation-application branch from 6524bc0 to 0aa15d6 Compare September 5, 2025 08:22
Copy link
Collaborator

@sacOO7 sacOO7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

VeskeR added a commit that referenced this pull request Sep 5, 2025
… phrasing in RTLM7*, RTLM8*, RTLM6d1a and RTLM6d1b

This uses phrasing initially added in 652daac commit
in #343 PR. It makes sense to
include those changes in this #333 PR
to make the OBJECT sync sequence and related spec items more clear.
@VeskeR VeskeR force-pushed the objects-access-api branch from 0bff266 to dba8ca4 Compare September 8, 2025 08:23
Base automatically changed from objects-access-api to main September 8, 2025 08:24
@VeskeR VeskeR force-pushed the objects-operation-application branch from 0aa15d6 to 84fc685 Compare September 8, 2025 08:28
@VeskeR VeskeR merged commit 3feb6af into main Sep 8, 2025
2 checks passed
@VeskeR VeskeR deleted the objects-operation-application branch September 8, 2025 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

live-objects Related to LiveObjects functionality.

Development

Successfully merging this pull request may close these issues.

4 participants