Giter VIP home page Giter VIP logo

Comments (9)

kriskbx avatar kriskbx commented on May 23, 2024 3

I don't think this is possible atm as native websocket clients are not able to connect to socket.io servers and vice versa, thus y-websocket had to be rewritten using socket.io. (And most likely the complete core of hocuspocus too)

As most browsers (> 97%) support native websockets I don't think the huge amount of work is justified as people could always use the webhook-extension or their own implementation to integrate hocuspocus into their existing applications.

from hocuspocus.

DanSnow avatar DanSnow commented on May 23, 2024 3

You can always use difference endpoint for socket.io and plain websocket to make them work together.

from hocuspocus.

kriskbx avatar kriskbx commented on May 23, 2024 1

There is already a lot of documentation. Let us know if you miss anything:

from hocuspocus.

hanspagel avatar hanspagel commented on May 23, 2024 1

The y-websocket client used to have support for Socket.io:
https://gist.github.com/dmonad/acd89745de1115cf712b35dcacd15cda

I’ll need to find out why it’s not in the client anymore. But from everything I know, I have to agree with @kriskbx: I don’t think it makes sense to build out Socket.io support (extending the server AND creating a new client) in the current stage.

from hocuspocus.

dmonad avatar dmonad commented on May 23, 2024 1

The reason why I switched from socket.io to pure Websockets is that the dependency load of socket.io is immense. It incurs extra overhead in every step without adding anything relevant to realtime applications. Any of the fallback solutions (HTTP long pulling, flash sockets (Adobe Flash), server sent events, ..) are not suitable for modern shared editing applications. We can do much better with pure Websockets which are supported in every browser since 2012. As @kriskbx mentioned, it should be possible to implement y-websocket backends in different programming languages. The socket.io protocol is pretty complex and it will take extra effort to port that to another language.

from hocuspocus.

jperl avatar jperl commented on May 23, 2024

Instead of building anything, just providing documentation for how to use express / socketio / and the webhook-extension might be helpful. I'll try to get an example together and share it here when I have something working.

from hocuspocus.

DenysPoliarush avatar DenysPoliarush commented on May 23, 2024

Hi guys!
I'm using socket.io in my project for chat and want to use hocuspocus for collaboration.
Is there a way to combine this?

from hocuspocus.

hanspagel avatar hanspagel commented on May 23, 2024

Unfortunately not!

from hocuspocus.

DenysPoliarush avatar DenysPoliarush commented on May 23, 2024

Oh, maybe you know of an alternative library instead of socket.io that I can use for chat and that will work with hocuspocus?

from hocuspocus.

Related Issues (20)

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.