| View previous topic :: View next topic |
| Author |
Message |
Aviar³ Grandmaster Cheater
Reputation: 50
Joined: 03 Jan 2008 Posts: 655 Location: Canada
|
Posted: Sat Jun 16, 2012 12:23 pm Post subject: Is writing a server from scratch cost effective? |
|
|
Wondering if writing a simple server (preferably in C or C++) is cost effective. Particularly, might need to write up a simple server for a flash game (mostly recieves updates, only a bit of sending).
Particularly, Flash is shit for security, would need player actions to be sent to the server and it updates the player status (DB or object), then sends the new state back. This isn't as important for things like moving in the world, but it is for combat and shopping.
I'm looking at you on this one Slugsnack.
_________________
This is the inception of deception, checking the depth of your perception.
 |
|
| Back to top |
|
 |
NotReallySureWhatGoesHere Expert Cheater
Reputation: -1
Joined: 20 Feb 2012 Posts: 110
|
Posted: Sat Jun 16, 2012 12:26 pm Post subject: |
|
|
I forgot what those "banned" games used as servers, but I remember reading on it and there's a free version. Maybe check that out, and I believe it's written in Java and supports Flash, Java, and whatever else.
If your game gets popular and has a continuous income, there's no need to worry about the cost. We're not MS licensing here
|
|
| Back to top |
|
 |
Aviar³ Grandmaster Cheater
Reputation: 50
Joined: 03 Jan 2008 Posts: 655 Location: Canada
|
Posted: Sat Jun 16, 2012 12:28 pm Post subject: |
|
|
I think your are thinking SmartFox Server. Supposedly its good, but it limits consecutive connections. That and its Java.
_________________
This is the inception of deception, checking the depth of your perception.
 |
|
| Back to top |
|
 |
NotReallySureWhatGoesHere Expert Cheater
Reputation: -1
Joined: 20 Feb 2012 Posts: 110
|
Posted: Sat Jun 16, 2012 12:30 pm Post subject: |
|
|
| Aviar³ wrote: | | I think your are thinking SmartFox Server. Supposedly its good, but it limits consecutive connections. That and its Java. |
Yup, that's it. And sorry I don't know much about it, just of it.
|
|
| Back to top |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Sat Jun 16, 2012 12:32 pm Post subject: |
|
|
sure it's cost effective (assuming you mean dev cost?!). in fact, i don't know what other option you have other than to handle everything on the client.
i wouldn't go with c/c++ unless you have a good reason to though. you pretty much kill the possibility of a really snappy client ui because you're using flash anyway. the latency of the connection + client ui responsiveness will make a far more noticeable difference.
by cost effective, i am assuming you mean the cost of you developing it as opposed to outsourcing it? if you are talking about server prices, then yes that can get really really expensive depending on how your plan works and how much you are sync'ing. if you sync every movement costs are gonna ramp up really fast.
if you're not expecting a lot of connections, you can always host on your own machine for now. what we are doing is using google app engine which allows a small free limit. quoting from a post i made in cef rpg section:
| Slugsnack wrote: | | My intention is to code the complete server backend in JSP. I will also take care of funding the game server. The soft limit for this funding is around $5K. If costs start moving anywhere above that, I would have to seriously reconsider whether to continue funding this project. |
for more technical advice on server sided programming, you should speak to my mentor who i have taken the liberty to write a short blurb about here
|
|
| Back to top |
|
 |
Aviar³ Grandmaster Cheater
Reputation: 50
Joined: 03 Jan 2008 Posts: 655 Location: Canada
|
Posted: Sat Jun 16, 2012 12:38 pm Post subject: |
|
|
| Slugsnack wrote: | sure it's cost effective. in fact, i don't know what other option you have other than to handle everything on the client.
i wouldn't go with c/c++ unless you have a good reason to though. you pretty much kill the possibility of a really snappy client ui because you're using flash anyway. the latency of the connection + client ui responsiveness will make a far more noticeable difference.
by cost effective, i am assuming you mean the cost of you developing it as opposed to outsourcing it? if you are talking about server prices, then yes that can get really really expensive depending on how your plan works and how much you are sync'ing. if you sync every movement costs are gonna ramp up really fast |
Thinking from development and economic stand point. I want to write it because I think that not only would it be a good educational experience (poor reason) but I do not need many of the features that most servers tote. All I would need is basically recieving some basic packets telling me a player has taken an action, parsing that to update a local (remote from the client standpoint) object to reflect the action (if it was valic), and then sending back the new state. Reason for C/C++ was that I wanted to minimize footprint and maximize amount of possible concurrent connections (would not be able to afford more than one server).
As far as synching, its only for 'sensitive' operations. I don't consider movement sensitive since its essentially a one player game, but I do consider purchasing items and combat sensitive, since players would be able to share character pages (which pretty much just show awards/achievements/stats).
P.S.: I have seen your mentor make some posts about PHP, and I believe he might be the person I am looking for.
_________________
This is the inception of deception, checking the depth of your perception.
 |
|
| Back to top |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Sat Jun 16, 2012 12:48 pm Post subject: |
|
|
using different and higher level programming abstraction will not limit concurrent connections. on the other hand, it can make the implementation a hell of a lot easier. not only parsing stage, but also database persistence is significantly more simple. i would not consider the fact that features are available that you don't need a deterrent in this case. if you don't need such features, simply do not use them
for server, i would furthermore not worry about footprint especially if frontend is flash. why are you concerned about this? again, imo this is a case of premature optimisation which may come to bite you in the ass when you realise how much more difficult c implementation is compared to jsp or python implementation for example.
in regards to load balancing, some services will automatically provide this. for example, for our server, we will use google app engine which is highly scalable because it automatically load balances
|
|
| Back to top |
|
 |
Aviar³ Grandmaster Cheater
Reputation: 50
Joined: 03 Jan 2008 Posts: 655 Location: Canada
|
Posted: Sat Jun 16, 2012 12:51 pm Post subject: |
|
|
| Slugsnack wrote: | using different and higher level programming abstraction will not limit concurrent connections. on the other hand, it can make the implementation a hell of a lot easier. not only parsing stage, but also database persistence is significantly more simple. i would not consider the fact that features are available that you don't need a deterrent in this case. if you don't need such features, simply do not use them
for server, i would not worry about footprint especially if frontend is flash. why are you concerned about this? again, imo this is a case of premature optimisation which may come to bite you in the ass when you realise how much more difficult c implementation is compared to jsp or python implementation for example.
in regards to load balancing, some services will automatically provide this. for example, for our server, we will use google app engine which is highly scalable because it automatically load balances |
Simply trying to address the problem of only having one server, which to me means needing to maximize the posssible concurrent conditions (not going overboard of course, but it is a facor as far as selecting technology). That, and the fact it has to be free.
_________________
This is the inception of deception, checking the depth of your perception.
 |
|
| Back to top |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Sat Jun 16, 2012 12:55 pm Post subject: |
|
|
if you are intending to scale so far, i am very doubtful that the first limit you will hit is number of concurrent connections. furthermore, connection limit is not an inherent problem to language, but more to the web server technology. for example, you can build php on top of lighttpd and it will be able to handle the same number of parallel connections as a c backend
Last edited by Slugsnack on Sat Jun 16, 2012 12:58 pm; edited 1 time in total |
|
| Back to top |
|
 |
Aviar³ Grandmaster Cheater
Reputation: 50
Joined: 03 Jan 2008 Posts: 655 Location: Canada
|
Posted: Sat Jun 16, 2012 12:58 pm Post subject: |
|
|
| Slugsnack wrote: | | if you are intending to scale so far, i am very doubtful that the first limit you will hit is number of concurrent connections. |
What do you fill is the first limit I will hit?
_________________
This is the inception of deception, checking the depth of your perception.
 |
|
| Back to top |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Sat Jun 16, 2012 12:58 pm Post subject: |
|
|
| 5.5 inch vagina
|
|
| Back to top |
|
 |
Aviar³ Grandmaster Cheater
Reputation: 50
Joined: 03 Jan 2008 Posts: 655 Location: Canada
|
Posted: Sat Jun 16, 2012 1:01 pm Post subject: |
|
|
| Slugsnack wrote: | | 5.5 inch vagina |
Thats hiroshis problem, not a server side problem.
_________________
This is the inception of deception, checking the depth of your perception.
 |
|
| Back to top |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Sat Jun 16, 2012 1:02 pm Post subject: |
|
|
| hard disk thrashing the shit out of itself or probably local IO will bottleneck from database access. those will degrade your performance far before connection limit. the only true solution to this is distributed server (e.g. LOAD BALANCING!!)
|
|
| Back to top |
|
 |
Aviar³ Grandmaster Cheater
Reputation: 50
Joined: 03 Jan 2008 Posts: 655 Location: Canada
|
Posted: Sat Jun 16, 2012 1:05 pm Post subject: |
|
|
| Slugsnack wrote: | | hard disk thrashing the shit out of itself or probably local IO will bottleneck from database access. those will degrade your performance far before connection limit. the only true solution to this is distributed server (e.g. LOAD BALANCING!!) |
One server to rule them all. Though I assumed thrashing would be a problem.
_________________
This is the inception of deception, checking the depth of your perception.
 |
|
| Back to top |
|
 |
potaters Grandmaster Cheater
Reputation: 72
Joined: 13 Apr 2009 Posts: 969
|
Posted: Sun Jun 17, 2012 12:40 am Post subject: |
|
|
| If this is about anything AE related, stop now. It's stupid and a waste of time. If it isn't, good. Also, you and Slugsnack are talking a lot about this as if you are making some huge/enterprise server. But step back to reality, you probably won't need to rent out servers in a data center, or get a powerful dedicated server. Furthermore, if you are programming it yourself for educational purposes, what do you mean development costs? I don't think your mom giving you soda and hot pockets counts.
|
|
| Back to top |
|
 |
|