SessionId vs ClientSessionId

I’m trying to understand the difference between a SessionId and a ClientSessionId.

What brought this questiion about was I was working with Channels. My clients are subscribed to channels, and I wanted them to send messages to various other clients using the channel send method that takes a set of SessionId’s. I wanted my server to be in charge of telling each client the list of SessionId’s that it should send to.

It seems that on the server all I know about are ClientSessionId’s. Am I doing something wrong? How are SessionId and ClientSessionId related?

On a similar note, how efficient are channels? Can I expect to have a large number of subscribers on channels scale well? Let’s say we have 1000 clients listening to a channel, and one client broadcast to a very small set (like 10 clients) on that channel. Is that an expected use of channels?

Thats a very good question. Let me ask our comm folks.

On your second question, while you could do that, if that same group is going to be doing a lot of interconnection its better that you give them their own channel to do it on. This gives the server more information for partitioning the users.

Hi

I don’t know if this is supposed to work, but if you getBytes() from the client session ID in the server, and pass the bytes across the wire, then on the client side use the static method SessionId.fromBytes it seems to do the job :slight_smile:

I use it for the server to tell a client ‘this game object is controller by this session, it’s ok to enact the updates they want for that object’ type things.

HTH

Endolf

Heh, You should be able to do that. But it aught to be done right. I have a feeling having different objects on the client and server side was a bit of an API oversight.

But I’m waiting for the response from the folks in that sub-group.

Well let you know when I have a clear answer.

Another odity about them if they are similar objects is that their construction from bytes and their serialization into bytes are slightly different.

The team says that what Endolf is doing is the intended procedure.

Working now on the question of how to better document that.

KJ