Comments (6)
I haven't looked into this for some months now as there's no comments or guidance from the maintainers. I'm still learning Rust, so my approach in this PR was more "make it compile" and not "make it elegant", so I'm relying on some pointers if this is going into the right direction.
from channels-yroom.
Hey, so this is where it's getting tricky. channels-yroom
exists because ypy (the Python bindings to the Y eco system) do not support xml fragments and are currently not up to date with yrs APIs. I created my own higher-level API for syncing+awareness but exposing YDocs directly was not the goal of the project – that's more tricky and where ypy
should come in.
I have a draft PR for ypy
that upgrades it to a newer yrs
version.
I see two ways forward:
- Get
ypy
upgraded and then use that API in the yroom worker. Definitely the long-term solution. - Expose some limited API in
channels-yroom
. For that I would need a better description of your use case. E.g. something like:
room_manager.add_xml_node_to_room(room_name, document_name, xml_string)
But this is clearly more of an ad-hoc band-aid solution for limited use cases.
from channels-yroom.
Your solution is amazing! When I tried to use YPY directly I saw that some functions were not integrated yet, now I understand.
I will choose to help unlock the update.
from channels-yroom.
My use case:
There are two features I want to do.
First: Update from other languages (HTML, MD and Text) to Tiptap's XML format, for that I'm using internal implementations but I want to send these implementations to the library https://pypi.org/project/tiptapy/
But for that, I want to work on the server side in YDoc to implement this update, when YDoc is loaded.
Second: Take advantage of YDoc synchronization to put other fields in the document, for example: Updated At + Title, and I want to do this on the server side with YPY (updated at)
from channels-yroom.
@stefanw this is basically the other thing that we need to be able to do. I see that the PR against ypy is still open. What are your latest thoughts on this?
from channels-yroom.
Cool, thanks. Let me see if I can poke the right people enough to get it moving haha.
from channels-yroom.
Related Issues (7)
- Improve persistence with incremental updates HOT 10
- Defect: parent points to a block which is not a shared type HOT 1
- Error when taking snapshot HOT 1
- The default name room is not being used HOT 1
- For some reason the YDoc sometimes remains unsynchronized when loading the page HOT 2
- For some reason, after a while the worker crashes and/or it crashes after some error. HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from channels-yroom.