Git Product home page Git Product logo

Comments (9)

rubenv avatar rubenv commented on June 12, 2024

File the issue too soon (and apparently in the wrong repository).

If I'm not mistaken, serverSessions in https://github.com/googollee/go-engine.io/blob/master/sessions.go takes care of this. This would be the equivalent of MemoryStore.

Would you be open to exposing this interface in the API so that we can plug different implementations (e.g. a Redis store)?

I'm happy to help with this, once I have a bit more spare time.

from go-socket.io.

googollee avatar googollee commented on June 12, 2024

How about a interface like ServerSessions or named as something else, and can be set out of library? If not set, it will act as current serverSessions?

from go-socket.io.

rubenv avatar rubenv commented on June 12, 2024

Yes, exactly that, an interface with a couple of methods, which can be set but which falls back to the default in-memory serverSessions.

It would mean that there is no change required for current users, but makes it possible to scale out.

from go-socket.io.

googollee avatar googollee commented on June 12, 2024

Please check the latest code, I add support SetSessionManager. Could you check if it works?

from go-socket.io.

rubenv avatar rubenv commented on June 12, 2024

Oh wow, thanks! I'll have a look at it, in a week or two. We're currently
in the process of launching a new product some time is a bit limited.

Will report back on our experiences once I get round to it.
On 1 Feb 2015 05:52, "Googol Lee" [email protected] wrote:

Please check the latest code, I add support SetSessionManager. Could you
check if it works?


Reply to this email directly or view it on GitHub
#64 (comment)
.

from go-socket.io.

bigblind avatar bigblind commented on June 12, 2024

@rubenv How are you storing the session object? And how are you reconstructing it when retrieving it?

from go-socket.io.

rubenv avatar rubenv commented on June 12, 2024

Right, forgot about this one.

I'm not sure you can. We had a good look at it, felt that this was going to be a ton of work and realised we didn't need all of this. In the end we opted not to use socket.io and build something simpler/more specialised: https://github.com/rubenv/broadcaster

As for session support here: the objects inside a session aren't really serialisable, so for now I don't think you can.

from go-socket.io.

bigblind avatar bigblind commented on June 12, 2024

Then I wonder what the docs mean when they say a session manager can help you load balance, I'd love to see an example.

from go-socket.io.

googollee avatar googollee commented on June 12, 2024

No. I'm sure currently no feature like this. And I still wonder what's the code like about load balance.

from go-socket.io.

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.