Skip to content
This repository was archived by the owner on Sep 29, 2024. It is now read-only.
This repository was archived by the owner on Sep 29, 2024. It is now read-only.

Contributors wanted!  #192

Closed
Closed

Description

@googollee

JOIN OUR TELEGRAM CHAT: https://t.me/go_socketio

TL;DR, Anyone wants to take over this project? I hope someone can help me to maintain it.

  • Background

I created this project when I needed it during my work. The code was 0.9.x branch which corresponded to socket.io 0.9.x. That branch worked OK, but the code itself was very ugly and low-performance.

So after a while, I started working on the v1.4 branch, when socket.io was 1.4 at that time. But I had changed my work at that time, and the new work didn't require socket.io. I wanted to use unit test to make it right but looked not good.

Currently, I leave master as 0.9.x because I don't want to break anyone's project by the huge change. (Blame package managing of Go.) So even the master branch should be the latest code, it isn't. You can use gopkg.in/googollee/go-socket.io.v1 as importing path if you want to use v1.4. Or you can use dep or any pkg manager you like.

As my work doesn't require socket.io now and I focus on learning English recently, I don't have time to maintain this project. I hope any volunteer can take over it.

  • Architecture

This part writes for the potential maintainer. I'd like to give you a brief idea how to dive into the code.

The main differences between 0.9.x and v1.4 are listed below:

  1. v1.4 separates go-engine.io and go-socket.io to handle transport and RPC.
  2. v1.4 tries to reduce the threads.

go-engine.io handles all kinds of transport, like HTTP polling or WebSocket, and turns them into a socket-like interface. it also handles transport upgrading and maintains the session. If a connection breaks and reconnects in a certain time with the same session id, go-engine.io will treat them as same one and will send all data during the breaking time to the new connection.

A WebSocket connection can map to a socket-like interface easily, but not HTTP polling. For HTTP polling, I try to make all read in one thread(more accurate, in one goroutine) and all write in another. Each thread only handles one HTTP request at a time. I try not to let read and write interrupted each other.

I hope this part is good enough to understand and may help when diving into the code.

Activity

  1. kidandcat commented on Feb 20, 2018

    @kidandcat

    Hi, I want to help if you agree, I always loved socket.io and I want to have it on Go.

    UPDATE: after having a look around, I think it could be better to start from scrach as this project is outdated and also is the engine.io

  2. googollee commented on Feb 20, 2018

    @googollee
    OwnerAuthor

    I didn't check the difference between 1.4 and 2.0. If you say socket.io 2.0, I think starting from scratch maybe a good idea.

  3. erkie commented on Feb 20, 2018

    @erkie
    Collaborator

    To not have all the work you did @googollee on 1.4 completely out the window, would you mind just describing the performance enhancements you mentioned for the 1.4 branch, compared to the current master version? I'd love to help out here, but I would like to understand a bit more what's been done, what your architectural ideas were, etc?

  4. googollee commented on Mar 11, 2018

    @googollee
    OwnerAuthor

    The main difference is the 1.4 branch try to avoid too many lockers and separate the transport layer to go-engine.io. The separation makes the implementation of go-socket.io much simpler. The socket created from go-engine.io will call socket.loop() to handle the messages, which is a good start point.

    The difference in go-engine.io and old master branch is in http-polling. It will force only one GET or POST at the same time, and the socket above the http-polling will handle Read()/Write() synchronously.

    The main part which I didn't finish, is the unit test of some function in go-sockeet.io, and the adapter. The design of the adapter is a interface which can let other sources to put the messages into socket.loop() or somewhere to let the handler receiving them. Then all the redis/broadcast can use a customed adapter to communicate with the socket. And of course, I didn't finish the room/broadcast API in the 1.4 branch, because of the lack of the adapter.

  5. erkie commented on May 30, 2018

    @erkie
    Collaborator

    @googollee can you add me as contributor on go-engine and go-socket? I can help by checking and merging pull requests to fix bugs that people find.

  6. googollee commented on May 30, 2018

    @googollee
    OwnerAuthor

    @erkie Done. Thank you.

  7. changed the title [-]Any volunteering contributor? [/-] [+]Contributors wanted! [/+] on Feb 8, 2019
  8. jjhesk commented on Feb 18, 2019

    @jjhesk

    what is the status now? have you done any stress test yet? @googollee

  9. erkie commented on Feb 18, 2019

    @erkie
    Collaborator

    @jjhesk the 1.4 branch has been merged to master, though no major changes have been made for a long time. We'd love if you could write a stress test and help us get good benchmarks for this project.

  10. jjhesk commented on Feb 19, 2019

    @jjhesk

    @googollee @erkie some development and perf concepts you might find it helpful.. #172. I have cross reference works from another repo in iris and also found it there we have enough supports to try solving the problems here.

  11. jjhesk commented on Feb 19, 2019

    @jjhesk

    @erkie we need a testing plan, example and feature plan example.. its alot of work.

    Once the coding is fixed done and the next step we will QA it and make sure all the codes are running solid.

    The coverage testing setup should be something like this...

    1. given
      setup plan A. 32 core, 32GB ram, intel, ubuntu 18.0.1. try 65540 open files and process too.
      setup plan B. 16 core, 16GB ram, intel, ubuntu 18.0.1. try 65540 open files and process too.
      setup plan C. 8 core, 8GB ram, intel, ubuntu 18.0.1. try 65540 open files and process too.
      setup plan D. 4 core, 8GB ram, intel, ubuntu 18.0.1. try 65540 open files and process too.

    rundown test

    1. stay connected for 10 hrs with some operations maybe 1% of the operations. different clients connected with avg 1-2k clients. different ip (the best).
    2. among all the connections, 5% of them are rapidly disconnects after login mechanism or after some sorts of waited computations.
    3. test all disconnected at once every 5 hrs and reconnecting them again and do that loop.
    4. health check these events:
    • broken pipe
    • refuse connection
    • unable to reconnect or simply stop connect. status 1005, 1006
    • data race detection
    • malformed or broken json serialisations
    • overrided gorountines and causes dead locks
    1. having it to dry run for 2 weeks and see the results.
  12. pi-pi-miao commented on Jul 16, 2019

    @pi-pi-miao

    hi,最近要用socket.io,您的项目有没有一些小的demo之类的,比如在go中怎么去使用,以及golang版本的客户端,这样我可以更好的进行封装压测,谢谢,期待你的回复

  13. erkie commented on Jul 16, 2019

    @erkie
    Collaborator

    @PyreneGitHub please open a separate ticket if you have a question. Thanks!

  14. pinned this issue on Aug 9, 2019
  15. 41 remaining items

  16. sshaplygin commented on Mar 7, 2023

    @sshaplygin
    Collaborator

    @dayueba Yes, of course

  17. linhbkhn95 commented on Mar 24, 2023

    @linhbkhn95

    I really wanna contribute to open-source. So,
    I would also like to help you as much as I can

  18. Martin-Karsten commented on Mar 25, 2023

    @Martin-Karsten

    Is there some sort of roadmap to make this library compatible with socket.io version 2, 3 or 4?

  19. sagarishere commented on Aug 10, 2023

    @sagarishere

    Given the experiences I had with open-source recently (with auto-GPT where others would take my code and submit their own PR request, and this other would be one of the main maintainers), plus the state of open-source currently, I would not join as maintainer on this project. However, as I see the license, kindly let know if there are any restrictions to use portions of the code in a new project. I want to have a fresh start with upcoming version 5 in mind, and also utilizing wherever I can Golang 1.21, and new features like generics, etc

  20. erkie commented on Aug 11, 2023

    @erkie
    Collaborator
  21. sshaplygin commented on Aug 22, 2023

    @sshaplygin
    Collaborator

    Is there some sort of roadmap to make this library compatible with socket.io version 2, 3 or 4?

    Nope. Because no one contribute into this project. I haven't free time to this project. If you would like to help, you are welcome

  22. alanarturohernandez commented on Sep 4, 2023

    @alanarturohernandez

    I want to do the functionality to support 2, 3, and 4, but how can I help us?

  23. erkie commented on Sep 5, 2023

    @erkie
    Collaborator

    @alanarturohernandez awesome!!! make small, targeted and clear pull requests that do this and we'll review them. We don't want to break backwards compatibility if not strictly necessary, so just keep that in mind.

  24. reopened this on Sep 5, 2023
  25. SantiiRepair commented on Jan 12, 2024

    @SantiiRepair

    happy new year guys

  26. Othie12 commented on Apr 11, 2024

    @Othie12

    Hello here @googollee , I'd also love to be added as a contributor to this project

  27. sshaplygin commented on Apr 11, 2024

    @sshaplygin
    Collaborator

    Hey, @Othie12 You could bring new update and can merge updates as can faster as possible

  28. unpinned this issue on Sep 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      ⌂ 换网址