y-octo icon indicating copy to clipboard operation
y-octo copied to clipboard

add more compatibility test baseline using yjs

Open darkskygit opened this issue 2 years ago • 1 comments

Currently we still use yrs as a baseline for binary compatible behavior, which increases testing complexity

I consider introducing a js runtime to provide the execution results of yjs as a reference benchmark during testing

It may be a convenient choice to directly use node to execute and output to stdio. Another option is to introduce quickjs or a similar streamlined js runtime, but this will increase compilation time and dependency complexity.

I will first investigate the feasibility of using nodejs to obtain execution results. This is the easiest way

### Tasks
- [x] https://github.com/toeverything/y-octo/pull/4
- [x] impl the function binding of node: #6
- [ ] test case for verify the data between yjs and y-octo-node #6

darkskygit avatar Aug 18 '23 12:08 darkskygit

Consider using napi-rs to generate node bindings and write compatibility tests in nodejs. This approach has three advantages:

  • We can offer node bindings for node.js user that they can has another choose in server side about crdt
  • Directly using node bindings to test compatibility allows us to reuse yjs's test cases without extra result processing steps (like figuring out how to transfer yjs results to rust).
  • One of the maintainers of napi-rs is a member of our team, making it easier to troubleshoot issues when they arise.

darkskygit avatar Aug 20 '23 11:08 darkskygit