Forum C# what if server needs to access big data file.

what if server needs to access big data file.

Postby deadlineproof » March 22nd, 2011, 6:09 pm

Can I run on player io a game that need 100+ mb of datafile to run?
This data is needed for gameplay and every game instance require the entire data set to be in memory.
What is the best pratice to deploy this kind of projects?
deadlineproof
 
Posts: 9
Joined: June 13th, 2010, 6:17 pm

Re: what if server needs to access big data file.

Postby Oliver » March 22nd, 2011, 6:39 pm

Well, you can, but... i'm not sure it's optimal with the current way the server code runs. Not being able to share such a large amount of data between room instances would be bad.

What's in the datafile? does it also take up 100mb ram when loaded?

- Oliver
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am

Re: what if server needs to access big data file.

Postby deadlineproof » March 23rd, 2011, 3:31 pm

Datafile is a lookup table that have to stay in memory.
A viable solution is to have only one server with this lockup table and have play rooms access to it to process data
One processing server can support all the play rooms.
Technically a server had to connect as client to another game just for a little time(here 45 client limit can be a little issue) or however send something to this processing server even by the database or by room data.
Actually i don't think you can have 2 differend dll on the same game or that you connect a server as a client to another server.
The connection have to be really fast as the processing to serve thousands of servers within a few seconds response time.
Onother solution is to connect to another server in another data center probably a little vps that don't scale but can be enough for this task but have highter ping than an evaluation server in the same cloud and you have to pay for another service.
deadlineproof
 
Posts: 9
Joined: June 13th, 2010, 6:17 pm

Re: what if server needs to access big data file.

Postby Oliver » March 23rd, 2011, 5:16 pm

What is in the lookup table, and how often during a game is it accessed ?
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am

Re: what if server needs to access big data file.

Postby FulaFisken » March 23rd, 2011, 8:56 pm

deadlineproof wrote:Can I run on player io a game that need 100+ mb of datafile to run?
This data is needed for gameplay and every game instance require the entire data set to be in memory.
What is the best pratice to deploy this kind of projects?


We have about 8 json files with game data that we parse when a room is started, they are not nearly as large though ^^. Our of curiosity, what kind of data is it?
Fula Fisken
website blog twitter
Play Game
Astroflux
User avatar
FulaFisken
Paid Member
 
Posts: 139
Joined: March 2nd, 2011, 10:15 am

Re: what if server needs to access big data file.

Postby deadlineproof » March 24th, 2011, 12:21 am

lookup tables to evaluate card games winner and hand description.
Their access depends upon the kind of game and how fast players are to play the game. however it evaluate multiple players every 3 to 6 minutes.You can also do something similar without those huge lookups ,but all common implementation use them because other methods can be really slow.For me they are twice slower even due to c# vs c and because i have to write this alternative by me (that require huge testing as really error prone) instead to use faster, production ready libraries.
deadlineproof
 
Posts: 9
Joined: June 13th, 2010, 6:17 pm

Re: what if server needs to access big data file.

Postby Oliver » March 24th, 2011, 9:31 am

On Player.IO as it looks today, there is no method for sharing data between instances, and we're not geared for individual instances using 100+ MB ram, since that would require an obscene amount of ram in each machine and wouldn't make it possible to run the amount of instances per server we need to make the whole thing economically viable.

We are considering letting you host your own servers, where all limitations are removed. There you could easily share data between instances with a simple static variable.

For now, if you're only doing lookups a few times per minute, might i suggest loading the lookup table into BigDB and doing loads from that instead?

- Oliver
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am

Re: what if server needs to access big data file.

Postby Henrik » March 24th, 2011, 10:45 am

Another way of solving it could be to use our Web API serverside and make a call to some webservice that does the lookup, but then you'd have to have or make a webservice like that.
Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm

Re: what if server needs to access big data file.

Postby deadlineproof » March 24th, 2011, 3:58 pm

Loading it on db isn't viable for the kind of data as it will end to be bigger that way interreferencing various db objects.
Probably i will try with a game that doesn't require that kind of solution while evaluating a solution to host a server for that.
I'm really interested to know your prices to host a more specific less restricting server(as it makes more sense than webapi on some far away server).
It will be surely of interest if you makes some reserved vps offers for applications that require more specific configurations for specific web services to be consumed from normal server instances at low ping where servers can connect to them by sockets and not http as webapi and where clients could connect as it was a normal room.
Es one could be interested on taking a central login , chat server or log servers that interacts with instances of different games or even host on your datacenter their full web presence (site, simple to complex ria management applications etc that can interact to gaming servers at any moment at full speed).
Depending on the use it is clear that all that require very different configurations of band and resources.
Even another .net solution just a bit less sandboxed just for compatibility, maibe just restricting interop with unmanaged code.
Just think to how much companies doesn't go for cloud computing feared by complexity and obscure costs.
People that doesn't want to manage complexity of platforms like azure or amazon ec2 and need more fast, easy and affordable way to go online in a scalable way.I used to make some business application for small companies with this kind of hosting problems emergent companies that just want to pay as they go and ends to pay more than prices on player.io.
I think that now and expecially in future there will be a huge market for easy and affordable services of this kind even in those non gaming scenario.
Player.io with some added flexbility could be a great platform for many other kinds of needs.
deadlineproof
 
Posts: 9
Joined: June 13th, 2010, 6:17 pm


Return to C#



cron