Proto commits in yorkie-team/yorkie

These commits are when the Protocol Buffers files have changed: (only the last 100 relevant commits are shown)

Commit:58a500d
Author:Yourim Cha
Committer:GitHub

Remove deprecated MinSyncedTicket and MaxCreatedAtMapByActor (#1208) This commit removes legacy fields and logic related to Lamport timestamp synchronization: - Removed `MinSyncedTicket` and its associated logic - Removed `MaxCreatedAtMapByActor` and related code These were previously retained for backward compatibility during the migration to VersionVectors and are no longer needed.

The documentation is generated from this commit.

Commit:4b8c052
Author:Youngteac Hong

Merge branch 'main' into cleanup-lamport

The documentation is generated from this commit.

Commit:d804a4e
Author:Yourim Cha
Committer:GitHub

Introduce Document Compaction (#1241) Introduced a document compaction mechanism that resets a document’s history by generating a new initial change from its current final state. This enables safe, incremental migration of documents affected by the removal of backward compatibility for `minSyncedSeq` and `maxCreatedAtMap` (removed in v0.5.2). The compaction process reconstructs the document state, serializes it to YSON, rebuilds it, and replaces historical data with a new ChangePack.

Commit:e628246
Author:JiHwan Yim
Committer:GitHub

Add size tracking to CRDT elements Doc size (#1244) Added methods to measure and retrieve the size of document data and metadata, including support for arrays, objects, counters, primitives, text, tree elements, and garbage collection. Additionally, the document summary now provides the document data size, enabling users to have a clearer understanding of the memory usage associated with their documents.

Commit:eab5482
Author:Youngteac Hong
Committer:Youngteac Hong

Enhance document attachment with schema validation

Commit:17bd493
Author:Yourim Cha
Committer:Yourim Cha

Merge branch 'main' of https://github.com/yorkie-team/yorkie into cleanup-lamport

Commit:de10dd3
Author:Youngteac Hong
Committer:GitHub

Add clients count to project stats (#1236)

Commit:d525983
Author:Yourim Cha
Committer:Yourim Cha

Implement CompactDocument feature in ClusterService

Commit:be7d987
Author:Yourim Cha

Merge branch 'main' of https://github.com/yorkie-team/yorkie into cleanup-lamport

Commit:bf45235
Author:Youngteac Hong
Committer:Youngteac Hong

Enhance document attachment with schema validation

Commit:8a1aba0
Author:Youngteac Hong
Committer:GitHub

Add attached_clients field to ListDocumentSummaries (#1215)

Commit:19fdfdb
Author:Yourim Cha

Remove deprecated maxCreatedAtMapByActor field and related functionality

Commit:414ed2b
Author:Yourim Cha

Remove deprecated MinSyncedTicket field and related functionality

Commit:20f3ba9
Author:Youngteac Hong
Committer:GitHub

Add AllowedOrigins field to Project for CORS support (#1205) This commit introduced a configurable option to specify allowed origins within projects, enabling more robust cross-origin resource sharing management. It also enhanced validation for cross-origin requests to improve security and ensure compliant data access.

Commit:b1beca7
Author:Youngteac Hong
Committer:GitHub

Add project stats retrieval functionality (#1202) - Introduced a new admin API endpoint to provide comprehensive project statistics, including active user metrics and document counts. - Integrated analytics support with a configurable DSN to enhance warehouse functionality and metric conversions.

Commit:c4c21ba
Author:Youngteac Hong
Committer:Youngteac Hong

Add GetOrCreateUserInfoByGitHubID to manage users by GitHub (#1193) This commit enhanced authentication by integrating GitHub OAuth support. Users can now sign in with GitHub, and profiles display the selected authentication provider.

Commit:3cc4175
Author:emplam27
Committer:GitHub

Add MaxAttachmentsPerDocument to limit Attachments per document (#1196) - Introduced `MaxAttachmentsPerDocument` in project settings. - If the attachment count exceeds the limit, the SDK prevents new attachments and throws `ErrAttachmentsLimitExceeded`. - Utilized `FindClientInfosByAttachedDocRefKey` in the DB client, which leverages the wildcard index `document.$**` in `clients` collection.

Commit:00a4e89
Author:emplam27
Committer:GitHub

Add MaxSubscribersPerDocument to limit subscriptions per document (#1178) Introduced a limit on the number of concurrent watchDocument subscriptions per document. - Added MaxSubscribersPerDocument to the project. - If the subscription count exceeds the limit, the SDK prevents new subscriptions while allowing push-pull operations to continue.

Commit:12dc864
Author:emplam27

Rename connection count limit to attach count limit

Commit:ad50b54
Author:emplam27

Add connection count limit per document to UpdatableProjectFields

Commit:e674f59
Author:emplam27

Add connection count limit for cluster server and Update methods for concurrent issue

Commit:5299469
Author:Changyu Moon
Committer:GitHub

Add Event Webhook Support with DocRootChanged Event (#1156) Implements event webhook functionality with configurable URLs and event types at the project level. Introduces `DocRootChanged` event to enable accurate document update tracking, while updating database schema, admin service, and CLI to support webhook configuration.

Commit:1b2718b
Author:emplam27
Committer:GitHub

Add Kafka Producer for Analytics and User Metrics (#1143) Integrates Kafka-based event publishing system to track Monthly Active Users and other analytics metrics. Implements configurable producer settings with async mode enabled and maintains default values for batch size and retry attempts, while adding new CLI options for Kafka configuration. --------- Co-authored-by: Youngteac Hong <susukang98@gmail.com>

Commit:7380dad
Author:raararaara

Add max concurrent connection field to limit max clients per document

Commit:3cbd7bf
Author:JOOHOJANG
Committer:GitHub

Introduce VersionVector (#1047) This change introduces Lamport Synced Version Vector to resolve defects in the existing garbage collection system that used syncedSeq. Key improvements include: - Added Version Vector implementation with Lamport timestamp support - Implemented database storage and update mechanisms for version vectors - Created min version vector computation for safe garbage collection - Added handling for detached client's version vectors to prevent memory leaks - Updated change ID generation to incorporate version vector information The Version Vector ensures all changes are properly synchronized across replicas before garbage collection occurs, improving system reliability and reducing memory waste from detached clients. --------- Co-authored-by: Youngteac Hong <susukang98@gmail.com>

Commit:36d5b88
Author:Aswinr24
Committer:GitHub

Remove `jstype=string` from resources.proto (#1040)

Commit:d1b173b
Author:Youngteac Hong
Committer:Youngteac Hong

Detach documents when client is deactivated (#1036) This commit implements the detachment of documents attached to clients upon client deactivation. Previously, the status of the document was only changed to 'detach' within DB.clients.ClientDocInfo.Status, leading to issues where the deactivated client's presence remained active and presence change events were not communicated to other clients. With this change, on client deactivation, the document's packs.PushPull method is called directly to execute the complete detachment process. Moreover, since the Yorkie cluster sharding mechanism assigns specific documents to specific servers, the server managing client deactivation may not always be the one handling the document. Therefore, in such cases, a request will be made to the server currently responsible for the document to detach it properly. To facilitate this communication across the cluster, a new ClusterService has been added. Follow-up tasks that need to be addressed after this PR include: - Implementing authentication for cluster communication and preventing external exposure. - Eliminating redundant database resource requests between clients.Deactivate and server.DetachDocument. - Improving the p.Clear ChangePack creation logic. - Introducing a connection pool for clusterClient. --------- Co-authored-by: raararaara <raararaara@gmail.com>

Commit:cee8d9a
Author:정핸모
Committer:raararaara

Support basic account action for admin (#934) Add the admin APIs ChangePassword and DeleteAccount to enhance the functionality and provide basic account actions for administrators themselves.

Commit:ad8161c
Author:Youngteac Hong
Committer:raararaara

Rename SetByIndex to ArraySet (#995) Related to #985

Commit:d383ed6
Author:Kim Junseo
Committer:raararaara

Add Concurrency Tests for Array Operations (#985) A. Total Tests: 49 cases(7*7) Initially, the symmetric relationship between clients in operation combinations was not included. However, since the Lamport clock comparison varies depending on the client ID, the tests were modified to check all cases. B. Operations per Client: 7(2+3+1+1) - Insert: 2 cases(Prev, Prev.Next) - Move: 3 cases(Prev, Prev.Next, Target) - Set: 1 case(Target) - Remove: 1 case(Target) C. Failure Cases: 10 cases(2*2 + 2 + 1*2 + 1*2) 1. *.Prev == Move.Target 4 cases(2*2, symmetric) - Insert.Prev == Move.Target - Move.Prev == Move.Target 2. *.Prev.Next == Set.Target: 2 cases(asymmetric) - Insert.Prev.Next == Set.Target - Move.Prev.Next == Set.Target 3. Move.Target == Set.Target: 2 cases(1*2, symmetric, client ID matters) 4. Remove.Target == Set.Target: 2 cases (1*2, symmetric)

Commit:38b6457
Author:조현우
Committer:raararaara

Show Server Version in Yorkie CLI (#938) This commit adds the functionality to display the version of connected Yorkie server in the version command. The version information can be viewed by converting it into yaml or json format using the --output, -o flag. This flag accepts json and yaml strings and converts them to the appropriate format for display. In order to solely check the version of the client CLI without considering the server's version, the --client flag has been included. The development of this feature was inspired by examining the kubectl.

Commit:1bbbdb6
Author:raararaara

Remove RPC system server

Commit:1ea7a8d
Author:raararaara

Introduce system client

Commit:ab77581
Author:raararaara

Fix lint proto

Commit:c24411b
Author:raararaara

Fix lint proto

Commit:9728100
Author:raararaara

Fix lint

Commit:4ae640a
Author:raararaara

Add system server to handle perform housekeeping deactivation

Commit:4804a56
Author:JOOHOJANG

Update Protocol

Commit:2f93922
Author:Youngteac Hong
Committer:GitHub

Rename SetByIndex to ArraySet (#995) Related to #985

Commit:256bf02
Author:Kim Junseo
Committer:GitHub

Add Concurrency Tests for Array Operations (#985) A. Total Tests: 49 cases(7*7) Initially, the symmetric relationship between clients in operation combinations was not included. However, since the Lamport clock comparison varies depending on the client ID, the tests were modified to check all cases. B. Operations per Client: 7(2+3+1+1) - Insert: 2 cases(Prev, Prev.Next) - Move: 3 cases(Prev, Prev.Next, Target) - Set: 1 case(Target) - Remove: 1 case(Target) C. Failure Cases: 10 cases(2*2 + 2 + 1*2 + 1*2) 1. *.Prev == Move.Target 4 cases(2*2, symmetric) - Insert.Prev == Move.Target - Move.Prev == Move.Target 2. *.Prev.Next == Set.Target: 2 cases(asymmetric) - Insert.Prev.Next == Set.Target - Move.Prev.Next == Set.Target 3. Move.Target == Set.Target: 2 cases(1*2, symmetric, client ID matters) 4. Remove.Target == Set.Target: 2 cases (1*2, symmetric)

Commit:3c5f5e1
Author:raararaara

Revert "Add systemService to handle perform background deactivation" This reverts commit 0aae9a03e24ac30df254d9aaaa6d66606d1f13b7.

Commit:0aae9a0
Author:raararaara

Add systemService to handle perform background deactivation

Commit:7d65a57
Author:조현우
Committer:Youngteac Hong

Show Server Version in Yorkie CLI (#938) This commit adds the functionality to display the version of connected Yorkie server in the version command. The version information can be viewed by converting it into yaml or json format using the --output, -o flag. This flag accepts json and yaml strings and converts them to the appropriate format for display. In order to solely check the version of the client CLI without considering the server's version, the --client flag has been included. The development of this feature was inspired by examining the kubectl.

Commit:52d2732
Author:정핸모
Committer:GitHub

Support basic account action for admin (#934) Add the admin APIs ChangePassword and DeleteAccount to enhance the functionality and provide basic account actions for administrators themselves.

Commit:a4ce314
Author:Seungyong Lee
Committer:GitHub

Enhance GetDocuments API by adding bulk retrieval (#931) This commit enhances document retrieval by adding `FindDocInfosByKeys` to find document information based on given keys for `GetDocuments API`. And it also introduces `include_snapshot` field to specify whether to include snapshots in `GetDocuments API`.

Commit:eefccb0
Author:Youngteac Hong
Committer:Youngteac Hong

Apply VersionVector to GC

Commit:c78ffe7
Author:Youngteac Hong
Committer:Youngteac Hong

Introduce VersionVector to detect the relationship between changes

Commit:275cdff
Author:Youngteac Hong
Committer:GitHub

Add GetDocuments API returning document summaries (#909)

Commit:4612696
Author:Youngteac Hong
Committer:GitHub

Add RHTNode removal to converter for consistency (#888) This commit addresses the missing `isRemoved` encoding in the RHT. Similar to other CRDTs like ElementRHT, including tombstone nodes like `isRemoved` during encoding is crucial. However, the RHT did not include tombstone nodes in its encoding, leading to inconsistencies in snapshots.

Commit:5a77d08
Author:Youngteac Hong
Committer:GitHub

Handle concurrent editing and styling in Tree (#854) We will use maxCreatedAtMapByActor until the introduction of VersionVector. https://github.com/yorkie-team/yorkie/pull/800

Commit:1455822
Author:highcloud100

Rename vector clocks and Fix gc_test Terminology - change's vector clock -> vector clock - change's latest vector clock -> version vector - each document's vector clock -> version vector - min synced vector clock -> synced version vector - snapshot's vector clock -> latest version vector

Commit:e67bae1
Author:highcloud100

Add Calculate svm in server This approach is silly. - slow and behave like client. - Server track all logs of clients, so we don't need calculate min synced vector every time.

Commit:37798fd
Author:highcloud100

Delete Synced Vector Map

Commit:f6d9a58
Author:highcloud100

Fix snapshot just return the latestVectorClock not SVM 1. Now snapshot save latest vector clock not SVM. 2. Clients build their own SVM using the latest VectorClock in snapshots. - So client's SVM is not latest state, it doesn't know peer's vector clock. It need more check - This is due to the overhead of storing and transferring SVMs. #789

Commit:679cd90
Author:highcloud100

Add deleting vectorclock of detaced Actor from synced vector map 1. Now Change has detach flag. It used to delete vectorclock of detached Actor.

Commit:fa4222f
Author:highcloud100
Committer:highcloud100

Lint and Structural change

Commit:80f8987
Author:highcloud100
Committer:highcloud100

Add synced vector map initialization using snapshots 1. server store synced vector map in snapshot_info. 2. The client also receives vector clock when pulling pack from the snapshot, and replace it's vector map with pulled vector map.

Commit:9e7cb73
Author:highcloud100
Committer:highcloud100

Replace latestCreatedAtMapByActor with vector clock 1. replace text edit's latestCreatedAtMapByActor with vector clock. 2. Fix gc timing in gc_test.go, because gc changed to use vectorclock 3. Because it is used in text edit, context includes current vector.

Commit:0389449
Author:highcloud100
Committer:highcloud100

Add vector clock 1. Add synced vector map in document. 2. Add self vector clock in Change 3. Modify gc to work with min synced vector

Commit:876787e
Author:Sejong Kim

Merge branch 'main' into introduce-sharding-rules-to-clients-collection

Commit:6651d42
Author:Sejong Kim
Committer:GitHub

Introduce MongoDB sharding rules to Document-wide collections (#734) This commit introduces MongoDB sharding rules to documents and document-wide collections (e.g. Changes, SyncedSync, Snapshots). Changes: - Introduce RefKey to represent ID and shard key together instead of ID. - Change the reference key of Users from _id to username. - Introduce encoders for types.ID, time.ActorID and ClientDocInfo to MongoDB.

Commit:db5c891
Author:Sejong Kim

Introduce MongoDB sharding rules to clients collection

Commit:8def590
Author:Jeounghui Nah
Committer:Youngteac Hong

Implement Tree.RemoveStyle (#748) This commit added tests for Tree behavior in concurrency scenarios: Styles by 2 users (4 * 6 * 6 = 144 cases): - Ranges(4) - A = B - A contains B - A and B are intersecting - not intersecting - Operations for both A and B(6) - `RemoveStyle({'bold'})` - `Style({'bold': 'aa'})` - `Style({'bold': 'bb'})` - `RemoveStyle({'italic'})` - `Style({'italic': 'aa'})` - `Style({'italic': 'bb'})` Edit and Style (6 * 5 * 2 = 60 cases): - Ranges(6) - A = B - A contains B - B contains A - A and B are intersecting - B is next to A - A is next to B. - Operations for A(5) - Insert front of range - Insert back of range - Insert middle of range - Delete - Change - Operations for B(2) - `RemoveStyle({'bold'})` - `Style({'bold': 'aa'})`

Commit:c2f6141
Author:raararaara

Add Document type

Commit:e1d2543
Author:Kevin Park
Committer:Youngteac Hong

Migrate RPC to ConnectRPC (#703) ConnectRPC supports following features: - Supports interoperation and multiplexing of grpc, grpc-web, and Connect protocols. - Supports language-familiar primitives like net/http and fetch. - Supports simple and no-boilerplate codes. With this support, we can resolve several issues: - Removes dependency with Envoy proxy to communicate with JS SDK web client by grpc-web. - Removes dependency with deprecated gogo/protobuf. - Supports JSON based REST API which will satisfy these needs.

Commit:8ede955
Author:Youngteac Hong
Committer:GitHub

Implement splitLevel of Tree.Edit (#705) When a user positions the cursor within a paragraph and hits the enter key, the paragraph is divided into two separate paragraphs: - Original: `<p>a|b</p>` - Result: `<p>a</p><p>b</p>` In this commit, `splitLevel` is introduced to support this scenario. ```ts doc.update((root) => { root.tree.edit([0,0], {type:'p',children:[{type:'text', value: 'ab'}]}); root.tree.edit([2,2], undefined, 1); // split the paragraph }); ``` This commit does not cover all test cases that may arise due to the split operation. This is because we need to verify the interface first. we need to add test cases in the simultaneous editing situation to verify the algorithm later.

Commit:81bebc4
Author:Sejong Kim

Change ref key of Clients from _id into (key, _id)

Commit:2dcd8d0
Author:Sejong Kim
Committer:Sejong Kim

Support document paging using (_id, key) order

Commit:22650f6
Author:Sejong Kim

Change ref key of Documents from _id into (key, _id)

Commit:7c3bc6f
Author:Sejong Kim
Committer:GitHub

Introduce Broadcast API (#631) This commit introduces a "broadcast" feature for sharing general events. Key implementations include the Document.Broadcast API, SDK enhancements, and server-side additions. Test cases cover broadcasting for unsubscribed events, payload serialization to JSON, and document watching during broadcast errors. --------- Co-authored-by: Youngteac Hong <susukang98@gmail.com>

Commit:57e196e
Author:Yourim Cha

Remove createdAtMapByActor in EditReverseOperation

Commit:5646591
Author:Yourim Cha

Replace TextNodeIDWithLength to RGATreeSplitPos

Commit:f1769d2
Author:Yourim Cha
Committer:Yourim Cha

Add fields markOpsBefore and markOpsAfter to TextNode in protobuf

Commit:bf05dcb
Author:Hyemin Lee
Committer:GitHub

Merge branch 'main' into feat/text-edit-reverse

Commit:ac6c2ab
Author:MoonGyu1

Add boundary type 'none'

Commit:f14c165
Author:MoonGyu1

Update protocol

Commit:d5d83e3
Author:hyemmie

Update protocol buffer to add edit_reverse Op

Commit:940941a
Author:gyuwonMoon
Committer:Youngteac Hong

Support concurrent formatting of Text (#639) Currently, we are unable to check for concurrent cases when applying the Text.setStyle operation. This pull request introduces a map called latestCreatedAtMapByActor to track the causality between the operations of the two clients and ensures that the results converge into one.

Commit:284d6b2
Author:hyemmie

Add edit_reverse operation for js-sdk test

Commit:da12ec0
Author:JOOHOJANG
Committer:GitHub

Change TreeNode to have IDs instead of insPrev, insNext (#622) During the conversion, it's hard to find insPrev, insNext nodes from IDs because we can't use LLRB at that moment. Therefore, this commit changed it to keep IDs of insPrev and insNext and find the actual nodes when we need it. Change Tree.Prepend to call updateAncestorSize only when a node is not removed during message conversion of pb to model. --------- Co-authored-by: Hackerwins <susukang98@gmail.com>

Commit:cf74a80
Author:Yourim Cha
Committer:GitHub

Cleanup proto (#614) * Remove unused client id(key) from API response * Change clientID type from bytes to string in the API

Commit:54c926f
Author:Yourim Cha
Committer:GitHub

Change 'Documents' from plural to singular in DocEvent (#613) * Change 'Documents' from plural to singular in DocEvent * Add some comments

Commit:932a9c7
Author:Youngteac Hong
Committer:Youngteac Hong

Handle concurrent editing of Tree.Edit (#607) Introduced new logical timestamp for identifying the position in local/remote editing, and ensures commutative editing in concurrent cases. This logical timestamp consists of {parentID, leftSiblingID}. This allows editing at the front of text nodes by using a reference to the parent, as well as getting rid of the local offset used to access an element node's children previously by using the leftSiblingID. --------- Co-authored-by: MoonGyu1 <s201801402@hufs-gsuite.kr> Co-authored-by: sejongk <sepaper@naver.com>

Commit:43c41a3
Author:Youngteac Hong

Revise protobuf

Commit:9f34252
Author:Youngteac Hong

Clean up protobuf file

Commit:72d9715
Author:sejongk

Introduce latestCreatedAtMapByActor for concurrent insertion and deletion

Commit:cb9271d
Author:sejongk

Restore comment about Select in proto

Commit:f782e24
Author:sejongk

Remove indent in front of lines

Commit:23e5acc
Author:MoonGyu1

Apply the naming convention in protobuf

Commit:8a2ee30
Author:MoonGyu1
Committer:MoonGyu1

Update API resource

Commit:491c7ef
Author:Youngteac Hong
Committer:GitHub

Clean up code (#595) - Remove unused functions and variables - Remove redundant type casting - Add comments to describe deprecated operation

Commit:dba636f
Author:Yourim Cha
Committer:Yourim Cha

Move Presence from Client to Document (#582) To ensure atomic delivery of data for `Document` and `Presence` to users, we are removing `Presence` from the `Client` and moving it to the `Document`. In the future, we plan to further modify it by changing `Document` to `Channel` or `Room` and rename `Root` as `Document`. UpdatePresence `UpdatePresence API` has been removed. Now, document and presence changes are transmitted using the `PushPull API`. Consequently, the presence is no longer transmitted as a component of the `Client`, but rather included within the change. ChangePack now contains `presence`. WatchDocument In the `WatchDocument API`, both the request and response only include the client ID, excluding the presence. --------- Co-authored-by: Youngteac Hong <susukang98@gmail.com>

Commit:12d410f
Author:JOOHOJANG
Committer:GitHub

Allow users to pass multi nodes when calling Tree.edit (#579) * Allow users to pass multi nodes when calling Tree.edit * Add nodes validation to Tree.edit

Commit:2b15ac5
Author:Youngteac Hong
Committer:hackerwins

Add include-snapshot flag to ListDocuments API (#575) Co-authored-by: YoonKiJin <ykjin5715@gmail.com>

Commit:db490d7
Author:Yourim Cha

Merge branch 'main' of https://github.com/yorkie-team/yorkie into presence-batch

Commit:e824ef5
Author:김용욱
Committer:GitHub

Add RemoveIfNotAttached flag to Detach (#560) Co-authored-by: Hackerwins <susukang98@gmail.com>

Commit:4ca6a63
Author:Yourim Cha

Rename PresenceInfo to Presence

Commit:1ce861d
Author:Yourim Cha
Committer:Yourim Cha

Remove clock infomation from presence Since presence is included in Change, there is no change for the order to be reversed when it is received by other peers.

Commit:687fd56
Author:Yourim Cha

Merge branch 'main' of https://github.com/yorkie-team/yorkie into presence-batch

Commit:525cacf
Author:김용욱
Committer:GitHub

Add force flag to RemoveDocument command (#558) * Add force flag to RemoveDocument command After this commit, an error occurred when attempting to remove a document that was attached to other clients. To forcibly remove a document, users can now use the "--force" flag. Additionally, this commit modifies the locker's condition for "AttachDocument" and "RemoveDocument" to "always" instead of "pack.HasChanges()". * Extract duplicated tests between memDB and MongoDB --------- Co-authored-by: Youngteac Hong <susukang98@gmail.com>