Using a database for buddylist

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

cpdavidd
Posts: 31
Joined: 25 Feb 2010, 08:03

Using a database for buddylist

Postby cpdavidd » 25 Oct 2010, 16:33

Hello,

I'm encourcing a small problem. I'm going to have more than 1 game server. And I need, that the buddylist for the x user would be same at any server. So I thought that the best way would be, that the buddylist would be stored in database like MySQL.

It is possible to use MySQL with the current SFS buddy persister?

Thanks
User avatar
BigFIsh
Posts: 1698
Joined: 25 Feb 2008, 19:26
Location: New Zealand

Postby BigFIsh » 25 Oct 2010, 20:13

BuddyList v2 uses an embedded database (h2database) - so that'll be ideal for your purpose.
Smartfox's forum is my daily newspaper.
cpdavidd
Posts: 31
Joined: 25 Feb 2010, 08:03

Postby cpdavidd » 26 Oct 2010, 13:03

Um... thanks for the fast response. :)

H2 database is interesting, but I prefer MySQL (because I can't run H2?)... is there any way to use MySQL
TiagoR
Posts: 83
Joined: 15 Mar 2010, 11:42
Location: Portugal
Contact:

Postby TiagoR » 26 Oct 2010, 13:07

cpdavidd wrote:Um... thanks for the fast response. :)

H2 database is interesting, but I prefer MySQL (because I can't run H2?)... is there any way to use MySQL


Yes, but you need to create your Persister class which handles the loading and saving of the buddy list.

Go to http://www.smartfoxserver.com/docs/docP ... yList2.htm and read under Custom Persistence classes
TR
cpdavidd
Posts: 31
Joined: 25 Feb 2010, 08:03

Postby cpdavidd » 27 Oct 2010, 05:31

Thanks for a really fast answer :) (unfortunately, I'm really stupid on Java :oops:)

Return to “SmartFoxServer 1.x Discussions and Help”

Who is online

Users browsing this forum: No registered users and 30 guests