Advertisement

whether chat service need a single connection

Started by April 01, 2014 02:54 AM
0 comments, last by hplus0603 10 years, 7 months ago
i'm trying to designing the chat service in a mmo server shard. the chat service is a solo server. but i'm wondering whether there should be always only one connection between client and the shard, and any request including the chat request from the client will go through this only connection, then the shard will dispath the request to corresponding service, or the client should establish another single connection with the chat service and all chat requests will go through this single connection?
if i need a single connection, what's the usual way to authorize the connection?
You can use a single connection, or multiple connections -- really up to you. It's probably easier to have one connection to each destination server, rather than have servers required to forward messages to other servers. Except if you use a scalable mesh system, like an Erlang cluster, say.

Authorization is easiest done by using TLS for the connection, and then sending the user name and password in the beginning of the connection. Because you're using TLS, that's secure against intermediate snooping. (But not secure against malware on the user's computer -- nothing really is.)
enum Bool { True, False, FileNotFound };

This topic is closed to new replies.

Advertisement