Query about SFS Dynamic Rooms

Post here your questions about Actionscript and Java server side extensions development.

Moderators: Lapo, Bax

Post Reply
Satyarth
Posts: 131
Joined: 06 Nov 2008, 12:45
Location: Delhi, India
Contact:

Query about SFS Dynamic Rooms

Post by Satyarth »

Hello All,

We have a heavy traffic app and we are creating rooms dynamically. I understand that SFS assigns a new room id to each new dynamic room. My question is when do these ids start to loop? Does it happen on SFS restart ? Theoritically if i never restart SFS, will these SFS room ids always be unique ?

Is there any difference in SFS 1.x & SFS 2.x with respect to this uniqueness of Room ids ?
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Query about SFS Dynamic Rooms

Post by Lapo »

User and Room ids are 32bit integers.
There are over 4 billion unique IDs before they reach zero again :)
2^32 = 4294967296

cheers
Lapo
--
gotoAndPlay()
...addicted to flash games
Satyarth
Posts: 131
Joined: 06 Nov 2008, 12:45
Location: Delhi, India
Contact:

Re: Query about SFS Dynamic Rooms

Post by Satyarth »

Hi Lapo,

Thanks again for answer. I understand that the Room and User ids are 32 bit Ints. But does SFS really generate them randomly ? I think SFS starts from 1 and goes on. Now if SFS starts from 1, my question was when does SFS starts going back to 1 ? Only after restart ?

I was confused because i was thinking, that may be in case of dynamic rooms that keep getting generated and destroyed, May be SFS gives their Room IDs to new rooms as it creates new ones ?

I hope i could convey my doubt well.
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Query about SFS Dynamic Rooms

Post by Lapo »

Thanks again for answer. I understand that the Room and User ids are 32 bit Ints. But does SFS really generate them randomly ? I think SFS starts from 1 and goes on. Now if SFS starts from 1, my question was when does SFS starts going back to 1 ? Only after restart ?
No randome generation. It is an auto-increment value.
Yes, if you restart the server it will of course restart from zero.
I was confused because i was thinking, that may be in case of dynamic rooms that keep getting generated and destroyed, May be SFS gives their Room IDs to new rooms as it creates new ones ?
No and id is never reused until the whole 4+ billions integers have been consumed.
Lapo
--
gotoAndPlay()
...addicted to flash games
Post Reply