New Servers?? ATTN: Cantr Programmers (and possibly others)

General out-of-character discussion among players of Cantr II.

Moderators: Public Relations Department, Players Department

returner
Posts: 948
Joined: Sun Nov 01, 2009 8:11 am
Location: Melbourne, Australia

New Servers?? ATTN: Cantr Programmers (and possibly others)

Postby returner » Fri Jan 29, 2010 8:34 am

I was curious as to how the mysql/php processing worked, server-side.

We know there are(were) issues with too many people being on at once causing lag.. and as a result, Cantr processes have been stripped down very heavily. Ticks are processed every three hours which is pretty annoying, and there are various other restrictions too.

I recall there being some pre-requisite to be classed as an MMORPG by a particular website which stated you needed to be able to support X number of players on the server. (this website ranks text-based and non-text-based MMORPG's, I believe)

.. long story short, we didn't meet the requirement and thus couldn't post an advert / link to the website.

So my question is: Do all the processes occur on the single server?

If so, I had an idea (which may have been discussed before).

Why not move the resource-heavy processes off the main server? Simply set up particular MySQL databases on different servers. Yes it's a 'cloud' design... sort of.

The major benefits are:
- We can accomodate for more players
- We can process things more frequently than what we have now
- We will qualify for official MMORPG status

The cons are:
- Higher chance of the game going down if a server goes down
- Depending on where you source servers, it MAY increase the running cost

However as always there are ways to solve the cons.

Please note, this question is directed at those who have seen the source code and know how it works. However, I invite all who have an idea of networking/php/mysql to converse and post suggestions. As I'm going to offer my own (large) hosting to help contribute, I'd appreciate minimal clutter and as much on-topic, relevant discussion as possible. :) Cheers.



ps. I've posted it in General Discussion as it's more of a discussion than a suggestion, but feel free to move it to Suggestions if you disagree.
This account is no longer active - please send any PMs to my new one.
User avatar
marol
Posts: 3728
Joined: Sun Jul 17, 2005 11:45 am
Location: Kraków, PL
Contact:

Postby marol » Fri Jan 29, 2010 8:52 am

We are in process of rewriting big part of Cantr and introducing Ajax technology, which should significantly reduce server load.

Besides, is lag a problem now? I do not notice any complaints except a couple of days when conversion was being done.

About processing - the processes were not heavily stripped down. The only thing I remember was moving animals off the roads. Actually I don't like making processes more frequent, instead I prefer making them continuous.

Additional con is higher skill level required to distributed programming.
(SRVPRC)
Image
returner
Posts: 948
Joined: Sun Nov 01, 2009 8:11 am
Location: Melbourne, Australia

Postby returner » Fri Jan 29, 2010 9:34 am

marol wrote:We are in process of rewriting big part of Cantr and introducing Ajax technology, which should significantly reduce server load.


Wow, very impressive, kudos!! That's very, very, very exciting!!

marol wrote:Besides, is lag a problem now? I do not notice any complaints except a couple of days when conversion was being done.


Nope. It's not an issue. You guys did really well there. But I'm concerned it will be if we attract a lot more users.

marol wrote:About processing - the processes were not heavily stripped down. The only thing I remember was moving animals off the roads. Actually I don't like making processes more frequent, instead I prefer making them continuous.


Oh, right. Fair enough. I didn't pay much attention to specifics 3 or 4 years ago, I just remember the 'lag period' haha. :)

marol wrote:Additional con is higher skill level required to distributed programming.


To be honest, I'm still learning about this side of things, but isn't it as simple as referring the database connection to another host?
..now that I think about it though, it may very well take double the time to load depending on how you programmed it. If the data has to go from Flizle to the new server to be processed, then sent back, it may take longer unless it draws the data straight from the other server.
You'd have to create a 'platform' which connects to all servers to balance it.
This account is no longer active - please send any PMs to my new one.
User avatar
marol
Posts: 3728
Joined: Sun Jul 17, 2005 11:45 am
Location: Kraków, PL
Contact:

Postby marol » Fri Jan 29, 2010 12:50 pm

The bottleneck was database load, therefore splitting PHP processing won't make the difference.
(SRVPRC)

Image
Saalko
Posts: 358
Joined: Thu Aug 27, 2009 4:23 pm
Location: Berlin, 4.OG mitte rechts.

Postby Saalko » Fri Jan 29, 2010 1:31 pm

Uhm two different servers makes normaly everything slower, not faster. Sometimes they mut communicate to each other. And your PC have to send requests to both servers and the slower gives the velocity. And when one is down both are down.

And when both down, Cantr is down.
User avatar
EchoMan
Posts: 7768
Joined: Fri Aug 26, 2005 1:01 pm
Location: Stockholm, Sweden

Postby EchoMan » Fri Jan 29, 2010 2:04 pm

If the servers are local to eachother, that communication is normally negligable.

In reality you could have 100 web servers with a load balancing software on top, that in turn spoke to 100 database servers who replicate data between eachother, and Cantr would never have unplanned downtime.

It's just a matter of cost. :D

And in this case, I assume that Jos isn't going to accept any new servers that isn't directly in his control. (Control as in ownership, not as in explicit privileged access).

Also as marol said, the server itself isn't the bottleneck, it is (or was?) the database. I am sure ProgD works hard in refactoring the database queries and up the efficiency of the database structure, so for a concurrent userbase of about 100-200 people, one server should be quite enough.

A very small server is able to have thousands of concurrent users, as long as resources are released in a good way. So if Ajax is going to be the new technology used (since Ajax doesn't release resources very optimal) it could very well become a problem with the web server in the future.
User avatar
marol
Posts: 3728
Joined: Sun Jul 17, 2005 11:45 am
Location: Kraków, PL
Contact:

Postby marol » Fri Jan 29, 2010 4:26 pm

I don't understand your opinion about Ajax not releasing resources optimal. I'm sure that one Ajax query is less expensive than refreshing whole page, and it will release resources as well, as regular HTTP request.
(SRVPRC)

Image
User avatar
nitefyre
Posts: 3528
Joined: Sat Nov 22, 2003 3:29 am
Location: New York City
Contact:

Postby nitefyre » Sat Jan 30, 2010 12:05 am

EchoMan wrote:
And in this case, I assume that Jos isn't going to accept any new servers that isn't directly in his control. (Control as in ownership, not as in explicit privileged access).


This is what it boils down to. And for good reason.
returner
Posts: 948
Joined: Sun Nov 01, 2009 8:11 am
Location: Melbourne, Australia

Postby returner » Sat Jan 30, 2010 12:28 am

Saalko wrote:Uhm two different servers makes normaly everything slower, not faster. Sometimes they mut communicate to each other. And your PC have to send requests to both servers and the slower gives the velocity. And when one is down both are down.

And when both down, Cantr is down.


If -one- is down, Cantr is down. :P

But I already covered what you're saying in my post. If they're local it's no problem, if they're far apart then you'd have issues.
This account is no longer active - please send any PMs to my new one.
User avatar
EchoMan
Posts: 7768
Joined: Fri Aug 26, 2005 1:01 pm
Location: Stockholm, Sweden

Postby EchoMan » Sat Jan 30, 2010 9:05 am

marol wrote:I don't understand your opinion about Ajax not releasing resources optimal. I'm sure that one Ajax query is less expensive than refreshing whole page, and it will release resources as well, as regular HTTP request.

I havent done any tests on this myself, but a source I find reliable talked about Ajax calls creating a lot of XHR (XMLHttpRequest) objects, that each of them have a lot of handling and stuff they do, that require a lot more resources than just a common HTTPRequest does.

But when thinking a bit more about it, things like that should have been resolved if it really was a problem.
User avatar
marol
Posts: 3728
Joined: Sun Jul 17, 2005 11:45 am
Location: Kraków, PL
Contact:

Postby marol » Sat Jan 30, 2010 9:32 am

Oh, that could be true, though XMLHttpRequest and HTTPRequest objects are created and handled on client computers, which doesn't affect server at all.
(SRVPRC)

Image

Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest