Large Multi-Server Project

Associate
Joined
15 Oct 2009
Posts
579
So, I'm a little stuck on how should go about this, I've only ever dealt with programs/apps that are supposed to deal with 1 or a few users at a time, never needing to think past a single native program or 1 web server, but now I'm having to and I'm not sure of the best direction I should be heading. This is for an idea me & my friend had but I'm the only one that knows any programming in the slightest which is all self taught.

Overview

As a brief overview, this system will be dealing with vast amounts of data for corporate use anywhere in the world. A user will log on to the system and have the ability to access any of the data as fast as possible hopefully from a server within the country or neighboring country they are in, but this data needs to be synced with all of the servers dotted around the world in real time (think facebook here). It should be able to be scaled from a single server to a complete server farm if necessary. This system will be able to be accessed via a web interface, and native applications (Windows, OSX, iOS, Android etc.)

Thoughts so far

Here is what I'm thinking about so far;
Authentication Server Software - Acts as the contact point for any incoming connections from users and a network load balancer to send the user to the main server with the lightest load with the lowest ping. All connections will go through this system even after they have logged in to stop direct communication with the main server. This should be able to support a massive number of users as hard drive issues wont be a problem and it will be just acting as a security layer between the user and the main server.
Main Server Software - Will deal with accessing, sorting, calculating and returning any data the user needs. It will only be accessible through the Authentication server.
Database - I've been looking around at various database software and have come across http://cassandra.apache.org/ as an option to store data across multiple locations.

I was thinking about writing the server software in C# due to it just being a lot less of a pain in the arse to things like C++, it might be a little slower than C++, but it will be a lot easier to maintain in the long run.

And now to the question...

My main question is this; How would you approach this type of system? Also, where it comes to accessing the data should the main server only ever access data straight from the database or should it load all of the data the user could potentially use into the RAM and dump it once they log out to speed data access up? Or wouldn't this be needed with something like cassandra?

A second question would be how would you go about creating some modular software in c# where you can just plug in components to add new features to the overall software (something like http://codeigniter.com/)? But the above question is mainly what I'm focused on right now.

Final words

I'm kinda guessing at the moment so I'm really just after some guidance & wisdom from the guru's of OCUK for the best direction to head with this project. For all I know I could be going about this in the completely wrong way, or I could be bang on the money, but having never attempted anything like this before I'm kinda lost.

Sorry for the wall of text but I really needed to explain what was going on to try and get the best answer possible. Thanks for any replies!
 
forget C++ for this situation as it will be a total nightmare

C#'s and Java's web service stacks are far easier to work with

can't you use a cloud-resident database? Perhaps SQL Azure? Or Amazon RDS (http://aws.amazon.com/rds/ - MySQL in the cloud) with this approach you've got no problems with data synchronisation and the data is secure by default

the "main server" should only access data from the database, or a caching layer possibly by a dedicated cache provider (say memcached or Windows AppFabric Cache)

in fact, why can't you base the whole system in the cloud?
 
This is actually pretty simple to do. The key term you want to be googling for is 'Server Farm'.

If you're developing in ASP.NET (using C#) then from your point of view you just develop your application as if it was running on one server. All the servers themselves are then configured to act as a server farm. Tools like Microsoft's Web Deploy 2.0 will let you deploy your web site to all the servers in the farm automatically.

There are a few things to look out for when developing on a server farm, such has how you handle sessions between servers, but the majority of the problem is system administration related rather than development.

[edit] just as an extra thought, is the project to develop a application which runs on multiple servers, or is the project actually to set up a brand new global server network for other people to use? If it's the former, there are quite a few compaines who provide the service you are looking for... I found this one as an example - http://www.brocade.com/solutions-te...graphic-redundancy-and-scalability/index.page
 
Last edited:
i wouldn't say it was "simple to do" really - large, multi server enterprise systems are far from simple

the security element in itself is complex here (web-based brokered authentication?) - let alone the concurrency and scalability issues that present themselves with a system of this size
 
forget C++ for this situation as it will be a total nightmare

C#'s and Java's web service stacks are far easier to work with

can't you use a cloud-resident database? Perhaps SQL Azure? Or Amazon RDS (http://aws.amazon.com/rds/ - MySQL in the cloud) with this approach you've got no problems with data synchronisation and the data is secure by default

the "main server" should only access data from the database, or a caching layer possibly by a dedicated cache provider (say memcached or Windows AppFabric Cache)

in fact, why can't you base the whole system in the cloud?

I wasn't going the C++ route, my only comment about C++ was to say that I wouldn't be using it and so removing it from any discussion.

The problem with having such a vast database hosted on these kind of cloud services is that it's completely out of our control, and just look to a few weeks ago when the Amazon services went down for a few hours overnight, with the service we are planning to offer that must not be allowed to happen.

This is actually pretty simple to do. The key term you want to be googling for is 'Server Farm'.

If you're developing in ASP.NET (using C#) then from your point of view you just develop your application as if it was running on one server. All the servers themselves are then configured to act as a server farm. Tools like Microsoft's Web Deploy 2.0 will let you deploy your web site to all the servers in the farm automatically.

There are a few things to look out for when developing on a server farm, such has how you handle sessions between servers, but the majority of the problem is system administration related rather than development.

[edit] just as an extra thought, is the project to develop a application which runs on multiple servers, or is the project actually to set up a brand new global server network for other people to use? If it's the former, there are quite a few compaines who provide the service you are looking for... I found this one as an example - http://www.brocade.com/solutions-tec...ity/index.page

I was looking for the servers to communicate over TCP/IP rather than HTTP so that's why I discounted ASP.NET. I need the server and client to both request and reply data and HTTP is limited to only one direction, this is mainly for the native clients rather than the web interface. I have created iPhone apps and programs in the past that talk to a server over HTTP so I do know it's limitations.

The project will be software from my side mostly, but my friend is a server guy and is looking to setup his own server network, so the 2 sides of the project sit hand in hand.
 
Last edited:
I would personally do the following. We are very Microsoft-focused where I work so it's all going to be based around that. I'm also more of a software guy than systems admin, so the server stuff i'm not 100% sure on...

1. Windows Server 2008 installed on all servers, running IIS 7. (I think you can automatically get 2008 to load balance in the way you want with your global servers, which will allow you to just target a single url which will handle all requests).
2. Microsoft SQL Server 2008 for the database.
3. All client requests/responses to the servers are handled using WCF Web Services.
4. Develop a common component (.dll) to handle all comms with the web services.
5. Seperate server(s) for the web site (using Classic ASP.NET or ASP.NET MVC), which then access the web services via your common component.
6. Same with the windows client. Develop a WinForms C# application and use the same common component to access the exposed web services
7. ????
8. Profit!
 
Good luck, the devil is in the detail with these things...if you can crack this, Facebook and Google will probably start offering you jobs :)
 
Good luck, the devil is in the detail with these things

Your telling me! The sheer scale of the project it enormous tbh, but hopefully if we can get a working prototype with at least some of the basics in place we can demonstrate it and get investment to get it developed further.

I would personally do the following. We are very Microsoft-focused where I work so it's all going to be based around that. I'm also more of a software guy than systems admin, so the server stuff i'm not 100% sure on...

1. Windows Server 2008 installed on all servers, running IIS 7. (I think you can automatically get 2008 to load balance in the way you want with your global servers, which will allow you to just target a single url which will handle all requests).
2. Microsoft SQL Server 2008 for the database.
3. All client requests/responses to the servers are handled using WCF Web Services.
4. Develop a common component (.dll) to handle all comms with the web services.
5. Seperate server(s) for the web site (using Classic ASP.NET or ASP.NET MVC), which then access the web services via your common component.
6. Same with the windows client. Develop a WinForms C# application and use the same common component to access the exposed web services
7. ????
8. Profit!

The problem with just going the windows route for this project is that the whole thing is supposed to be scaled to multiple platforms later on, so creating a standard .dll isn't really possible. It's a nice idea and would make development a lot simpler but unfortunately that wont work on iOS or Android platforms :/.

Thanks for the replies & ideas so far guys, it's good to look at and assess the various options available to make sure we go the best route for our project.
 
Thanks for the replies & ideas so far guys, it's good to look at and assess the various options available to make sure we go the best route for our project.

Yea, it would be nice if you had a standard library for all platforms. You can still access WCF Web Services from non-microsoft platforms as this demonstrates - http://stackoverflow.com/questions/982622/consume-wcf-web-service-using-objective-c-on-iphone

But it looks like a bit of a headache, and something i've personally never done before. I would imagine it would be similar for Android.

It sounds like a nice project to get your teeth into though. Good luck!
 
Let the database do the work of caching. Assuming you're using an enterprise grade DB then they are designed for the job. If you load the data into RAM you'll be storing problems for the future.

Also don't forget DR (disaster recovery). So you need to consider whether you'll be running an active/active configuration (i.e. 2 or more servers running concurrently for each tier of the service) or an active/passive setup.
 
Back
Top Bottom