go-socket.io icon indicating copy to clipboard operation
go-socket.io copied to clipboard

Contributors wanted!

Open googollee opened this issue 6 years ago • 60 comments

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.

googollee avatar Feb 06 '18 15:02 googollee

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

kidandcat avatar Feb 20 '18 09:02 kidandcat

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.

googollee avatar Feb 20 '18 11:02 googollee

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?

erkie avatar Feb 20 '18 13:02 erkie

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.

googollee avatar Mar 11 '18 20:03 googollee

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

erkie avatar May 30 '18 08:05 erkie

@erkie Done. Thank you.

googollee avatar May 30 '18 20:05 googollee

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

jjhesk avatar Feb 18 '19 14:02 jjhesk

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

erkie avatar Feb 18 '19 15:02 erkie

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

jjhesk avatar Feb 19 '19 03:02 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.

jjhesk avatar Feb 19 '19 04:02 jjhesk

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

pi-pi-miao avatar Jul 16 '19 06:07 pi-pi-miao

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

erkie avatar Jul 16 '19 08:07 erkie

@googollee @erkie Hi I have free time and I can help support issues in this repository.

sshaplygin avatar Oct 11 '19 10:10 sshaplygin

@mrfoe7 lovely! I can't add collaborators, @googollee can you fix? More helpers yay! 😃

erkie avatar Oct 11 '19 19:10 erkie

@mrfoe7 Thanks in advance. I just send out the invitation, please check.

googollee avatar Oct 11 '19 19:10 googollee

@googollee Thanks for you trust. I will try to do everything possible for project

sshaplygin avatar Oct 12 '19 06:10 sshaplygin

Any plans on supporting socket.io 2.3.0, or is there a Go library that does that?

odiferousmint avatar Nov 01 '19 14:11 odiferousmint

@DisruptiveMind would not count on it at all unless we can find some passionate people to get that project going. :)

erkie avatar Nov 01 '19 14:11 erkie

Hey all, great to see this is still moving along. I'll contribute where I can but I won't be able to commit much at the moment. Count me in as lowly support :)

DisruptiveMind avatar Nov 01 '19 14:11 DisruptiveMind

@DisruptiveMind nice! :D We need all the help we can get.

erkie avatar Nov 01 '19 14:11 erkie

What about socket.io folks? Would they be interested in helping? :D

odiferousmint avatar Nov 01 '19 18:11 odiferousmint

@odiferousmint Hi. This issue showed all interest to go-socket.io implementation by nodejs socket.io community https://github.com/socketio/socket.io/issues/3242

sshaplygin avatar Nov 05 '19 11:11 sshaplygin

I wish I could help but I am going to work 12 hours a day really soon so I will not have time for it. :(

odiferousmint avatar Nov 07 '19 23:11 odiferousmint

@odiferousmint No problem. It is voluntary activity

sshaplygin avatar Nov 08 '19 21:11 sshaplygin

Hey @googollee / @erkie / @mrfoe7, i am using go-socket.io in our backend application and would love to help maintain/update the project. The next few weeks will be pretty busy for me but after that I might have some time to work on the implementation of v2 (no promises though!).

Did someone already start working on that on their fork? Would be a step in the right direction to create a dev-v2 branch (or something similiar) on which we can merge progress.

adrianmxb avatar Feb 06 '20 14:02 adrianmxb

@adrianmxb Hey. I started work on my fork. I created dev branch in main repository.

sshaplygin avatar Feb 06 '20 16:02 sshaplygin

I'd like to volunteer some time too. I'm pretty new to dev so I might need to be pointed to where I can help make progress. So if anyone has the time to "help me help the project", let me know.

gonzric1 avatar Feb 10 '20 22:02 gonzric1

@gonzric1 it is good news. If you have new idea or some fix current code, please send new PR

sshaplygin avatar Feb 11 '20 08:02 sshaplygin

@gonzric1 so cool! You can also join the telegram chat: https://t.me/go_socketio

erkie avatar Feb 11 '20 08:02 erkie

@googollee may you add @adrianmxb as maintainer roles?

sshaplygin avatar Mar 05 '20 12:03 sshaplygin

Done.

googollee avatar Mar 05 '20 12:03 googollee

As there are 3 volunteers now, I will close this issue. We could reopen it later if necessary.

googollee avatar Mar 05 '20 12:03 googollee

@googollee Thank you

sshaplygin avatar Mar 05 '20 13:03 sshaplygin

hello,Can i became a Contributor? I realize that the current version is too far away from the official version, and now all have version 2.3 (socket.io-client). Is there any update plan? I want to join because I am going to use it

popzhangzhi avatar May 02 '20 03:05 popzhangzhi

@popzhangzhi great that you are interested! To start with you could just start making a bunch of pull requests and we'll look at them as fast as we can.

erkie avatar May 02 '20 14:05 erkie

I also want to help

DesertThief avatar Sep 08 '20 18:09 DesertThief

@DesertThief you are welcome. Pick up issues in backlog :)

sshaplygin avatar Sep 14 '20 13:09 sshaplygin

Are you planning to support socket.io 2.x (and 3.x) in the future? I think I can help.

RinChanNOWWW avatar Jan 07 '21 07:01 RinChanNOWWW

We'd love to have support for latest socket.io. Please help!!!!!!!

erkie avatar Jan 07 '21 15:01 erkie

Hello All

maintainers of this project, please need some answers ? Any telegram group or discord ??

Can we use this implementation for a big project ??

AhmedX6 avatar Jan 28 '21 19:01 AhmedX6

I would also like to help you as much as I can

mrceylan avatar Feb 25 '21 19:02 mrceylan

Awesome! Feel free to start helping out with issues, improvements and pull requests. :D

erkie avatar Feb 26 '21 13:02 erkie

Hi all! I saw that this library is really far behind the official Socket.IO versions, and I'd like to help out as much as I can! Is there any roadmap or anything like that for features that need to be implemented to get the library up to date with the official Socket.IO versions? Thanks :D

manapoints avatar Mar 10 '21 05:03 manapoints

Hey @manapoints super cool that you want to help out. So far this project is pretty unorganized. No roadmap, no real central planning or anything. We know we want it to be uptodate, so any PR that looks good and adds great features without breaking backwards compatibility will surely be merged. I've tried to organize the issues and add helpful labels. I think just finding easy bugs to close is a great way to get into the project. If you want to look into supporting later versions of socket.io, that's awesome too! Feel free to ping me in PR's so I see them quickly.

erkie avatar Mar 10 '21 12:03 erkie

@erkie and @adrianmxb are you maintainer this project?

sshaplygin avatar Apr 14 '21 08:04 sshaplygin

No, just a collaborater.

erkie avatar Apr 14 '21 08:04 erkie

@adrianmxb didn't show up recently. I can't reach him with his email. I tend to remove him out of collaborators if he doesn't reply me in 7 days.

googollee avatar May 02 '21 17:05 googollee

😢

sshaplygin avatar May 02 '21 20:05 sshaplygin

😵

erkie avatar May 02 '21 21:05 erkie

As https://github.com/googollee/go-socket.io/issues/192#issuecomment-830839392, I feel sorry that I removed @adrianmxb. Thank you for your contribution.

googollee avatar May 18 '21 21:05 googollee