External frontend module

Hi,

I'm currently developing a fairly large scale MMO which is currently in early alpha testing, I added a universal chat system to it using jabberd2 so players can chat with friends on different shards and on the company website. It works nicely in theory, especially since it allows us to not use the provided c2s module and instead hook our game server nodes directly up to the internal router and session manager so we don't have to worry about authentication overhead or having inordinate numbers of open TCP ports opened internally.

Problem is, it crashes sometimes (including crashes on XML parsing errors) and doesn't look like it will support more than 50,000 concurrent connections or so. Which is fine if the game is a flop, but if it is even semi-successful, it's not going to be suitable. Ejabberd seems to scale better and be more reliable so I am hoping to try it.

I tried hooking it up to ejabberd using XEP-0114, but the problem is, it's assuming that the session data is local to the component (as would be the case of say an MSN transport), rather than letting me create a session on the ejabberd session manager and be forwarded messages relating to it, which is what I want. The whole point of using XMPP is that there are many extant session managers, I don't really want to write my own.

I don't want to run seperate connections for each player, because 1) I don't want my gameserver to shove another 2000 more ports into epoll when it doesn't have to 2) I don't want to run sasl for each player who logs in or for the xmpp system to really know anything about authentication.

So what I suppose I should do now is to copy and modify ejabberd_c2s.erl into a new frontend module to provide something that allows similar policy and provides a similar interface as I am using now and we can plug it in.

If I am wasting my time, could someone please call me an idiot before it is too late?

Thank you.

OK, I did it, it works good.

OK, I did it, it works good. Basically I clagged ejabberd_c2s.erl then split everything beginning with pres_ as well as privacy_list, sid, resource, conn and user into a new record type and shoved a dictionary of such records into the state.

I'd submit it upstream because I think is useful, but my implementation is kind of half arsed.

donscarletti wrote: I'd

donscarletti wrote:

I'd submit it upstream because I think is useful, but my implementation is kind of half arsed.

Then at least publish it here in the forum, so your preliminary implementation doesn't get lost.

Syndicate content