Comments (9)
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.
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.
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.
Please check the latest code, I add support SetSessionManager
. Could you check if it works?
from go-socket.io.
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.
@rubenv How are you storing the session object? And how are you reconstructing it when retrieving it?
from go-socket.io.
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.
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.
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)
- fatal error: sync: unlock of unlocked mutex
- Why is this neither being updated nor deprecated HOT 1
- Client Require []string in handler instead of string HOT 3
- v1.6.1 or above sends events in the OnConnect() method, but the client cannot receive the message.
- v1.6.1 or above sends events in the OnConnect() method, but the client cannot receive the message.
- Cors problem with Golang Server HOT 2
- How to use middlewares to authentication?
- Additional bytes in HTTP handshake HOT 1
- server.Remove undefined HOT 3
- golang 客户端包 如何使用命名空间呢 默认都是 根 / 修改不了
- how to send binary message? HOT 1
- Pingtimeout and pinginterval does not work
- No NewClient method HOT 1
- Client connect root ('/') doesn't have a namespace handler HOT 6
- how to support socket.ioV3 HOT 1
- how to reconnect when disconnected ?
- Client ignores Transports defined in opts HOT 3
- Support "extraHeaders" in client HOT 1
- read tcp 127.0.0.1:8001->127.0.0.1:55169: i/o timeout
- Very bad source
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-socket.io.