GithubHelp home page GithubHelp logo

Comments (6)

stefanw avatar stefanw commented on August 29, 2024 1

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.

stefanw avatar stefanw commented on August 29, 2024

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:

  1. Get ypy upgraded and then use that API in the yroom worker. Definitely the long-term solution.
  2. 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.

linspw avatar linspw commented on August 29, 2024

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.

linspw avatar linspw commented on August 29, 2024

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.

zswaff avatar zswaff commented on August 29, 2024

@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.

zswaff avatar zswaff commented on August 29, 2024

Cool, thanks. Let me see if I can poke the right people enough to get it moving haha.

from channels-yroom.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.