Using Tigase xmpp server as a game server

Submitted by Anonymous on Sun, 2009-11-08 00:57

I've been researching on xmpp servers that our company can use its game server. The game server is an online casino server. I came across Tigase's site then have a quick browse. It seems that Tigase may fit in the requirements of the game server. But still, I want to confirm if Tigase xmpp server is capable of the following:

* Override authentication - Since we have our own database, I would just make use of our existing.
* Support multi-host (vhosts) - Right now, we are serving roughly around 30 clients. All our clients data are consolidated into one db. I would run one xmpp server serving multi-clients (user@client1.com, anotheruser@client1.com, user@client2.com, anotheruser@client2.com)
* Customized handler for game transactions

I think that all of these are possible in Tigase, But I just want to confirm. And if possible, please give short how-to on each requirements I mentioned above.

Thank you very much.

Cheers!
-- Ely

Artur Hefczyc's picture

What you are describing here

What you are describing here sounds like PubSub, XEP-0060 functionality. Of course Tigase offers PubSub component, more over the Tigase implementation is one of the most complete and runs under a very high load.
I am not sure if you are familiar with the specification but this is something you should definitely look at.

What about publishing

What about publishing information/stanzas? Can I do the following:

1. Let a user/client subscribe to a room/topic/channel?
2. Publish information to a room/topic/channel? if possible, my server generates the information and send it to clients subscribed (S2C).

Thank you once again for helping.

Artur Hefczyc's picture

Yes, this gives you the most

Yes, this gives you the most control over the user authentication but is also the most flexible way. Especially if your data source is not SQL database this is the only way.

Configuring Tigase to use your authentication connector is actually very easy. You have to put a line in the init.properties file like this:

--auth-db = tigase.db.jdbc.TigaseAuth

Please have a read through this guide carefully as you can find more details there.

Thank you very much Kobit

Thank you very much Kobit for the help. It looks like I need to implement tigase.db.UserAuthRepository to have my fully customized authorization. I am going to write a code implementing this class. After implementing the class, how do I map my implementation to Tigase server?

Artur Hefczyc's picture

ad. 1. "Override

ad. 1. "Override authentication" - yes this is quite easy to do and there are a few possible ways to do it. Depending on your particular needs you have to choose one. Please refer to online documentation for more details or ask questions if you need more information: Custom authentication connectors or Tigase authentication connector or probably the most interesting to you: Connector with configurable SQL queries. If none of this suits you, you can always create completely new authentication connector using Tigase API.
ad. 2. "Virtual hosts support" - yes, Tigase was built to support thousands of virtual hosts. There are deployments where almost every user has own virtual domain. You can add/remove/update VHosts at run time. More about this is in our VHost online documentation.
ad. 3. "Customized handler" - I am not sure what you mean by this. The API in the Tigase server is very flexible and it is easy to add new extensions. If you want to handle your own extensions (stanza types) then you probably want to implement a new plugin. More about plugin development in Plugin development guide.

I have given you pointers to further reading and you can do most of this on your own. Please, consider however using our help with your development. You can not only save your time but you can be sure that this is implemented in the best possible way using all Tigase API and capabilities.

If you need any more information please do not hesitate to ask.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Post new comment

The content of this field is kept private and will not be shown publicly.