Terracotta works natively with Smart Fox Server?

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

Moderators: Lapo, Bax

dlong
Posts: 26
Joined: 05 May 2009, 02:46
Location: Los Angeles, CA

Terracotta works natively with Smart Fox Server?

Postby dlong » 07 Jul 2009, 01:19

Hi,

Just trying to figure out exactly how Terracotta comes into play. It looks like (according to this demo: http://www.terracotta.org/web/display/o ... ered+World) you have to configure Terracotta to share specific variables (or objects). If so, it seems you would need to know about the internals of SFS code to leverage Terracotta for H.A. with regards to SFS.

Am I missing something?

Thanks in advance.

DL
User avatar
Lapo
Site Admin
Posts: 23026
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 07 Jul 2009, 05:14

Hello,
you can find all the details in our white papers, here:
http://www.smartfoxserver.com/clustering/

Also you can require the sources related to the study in the white paper by dropping us an email.

Hope it helps
Lapo
--
gotoAndPlay()
...addicted to flash games
dlong
Posts: 26
Joined: 05 May 2009, 02:46
Location: Los Angeles, CA

Postby dlong » 07 Jul 2009, 17:38

Thanks for the reply Lapo.

I've looked through the documentation and it's still not super clear to me. Here's what I think is happening... could you please confirm if that it is true or, if not true, what the correct state of affairs is?

It looks to me that the SFS Pro product you download does not work out of the box with Terracotta (however, you could configure your extensions to work with Terracotta). Instead, you have to use the binaries you mention above as your server. Inside these binaries are a set of java extensions for supporting clustering. Next, you have to configure Terracotta to actually share the memory for those objects defined in the extensions. This is done similar to below:

Code: Select all

<root>
          <field-name>sfs.cluster.lobby.DataStore.clusterUsersByName</field-name>
      </root>
      <root>
          <field-name>sfs.cluster.lobby.DataStore.clusterRoomsByName</field-name>
      </root>


More or less what I'm trying to determine is that in the case that one SFS is insufficient for my load/user base, how could I balance the load across multiple servers with the appearance of just one. For instance, let's say I need to have one zone with 10,000 rooms. We're not doing anything complex right now either (just sending public messages, setting user variables, with minimal extension logic).

On paper, it seems like you just plug in Terracotta and go but the more I'm digging it looks like you need to set up your code and configuration in a very specific way or else it will not work.

Any light you could shed on this would be greatly appreciated.

Thanks in advance!

DL


[/code]
User avatar
Lapo
Site Admin
Posts: 23026
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 09 Jul 2009, 07:47

It looks to me that the SFS Pro product you download does not work out of the box with Terracotta (however, you could configure your extensions to work with Terracotta).

SFS PRO does not provide clustering out of the box. We have plans to do this in the future, but it's not as easy as it may sound for reasons I don't have time to list here.

Clustering all the current features is not necessarily a good idea.
Even if the idea of being able to simply add many servers into a cluster and having clients join any server looks sexy it poses some major performance challenges.
The more the users are scattered all over the server nodes the more the cluster becomes "chatty" and less scalable.

The server produces many events for rooms, users, buddy lists etc... and distributing all the relevant data across the cluster requires parsimony because each access to non-local data requires a network access which is orders of magnitude slower than direct memory access.

So the fundamental idea for building efficient clusters is to distribute only the necessary bits of data and avoid any extra chatter.

The integration study provided in our whitepaper and relative binaries shows exactly how to do this, keeping it optimized and ready to scale in the hundreds of thousands of concurrent users and more.

More or less what I'm trying to determine is that in the case that one SFS is insufficient for my load/user base, how could I balance the load across multiple servers with the appearance of just one.

The load balancing is discussed in the white paper and if you already have the binaries and sources you can take a closer look.
On paper, it seems like you just plug in Terracotta and go but the more I'm digging it looks like you need to set up your code and configuration in a very specific way or else it will not work.

Premise: clustering is not easy. It's actually one of the most complicated things in computer science.
With this said what you are trying to accomplish is relatively simple and Terracotta helps hiding a lot of the complexity behind it.
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SmartFoxServer 1.x Discussions and Help”

Who is online

Users browsing this forum: No registered users and 52 guests