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

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

Using a database for buddylist

Post by cpdavidd »

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
BigFIsh
Posts: 1698
Joined: 25 Feb 2008, 19:26
Location: New Zealand

Post by BigFIsh »

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

Post by cpdavidd »

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

Post by TiagoR »

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

Post by cpdavidd »

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