Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am interested in designing a simple lan based server which accepts and services a limited number of connections ( < 25) from within the lan at any time. The server generates images dynamically and transmits them to the clients at speeds of ~40-50 MB/s. Any suggestions/comments on available design examples for such a server - multithreading, multitasking, other design paradigms to be kept in mind? And what if this server is scaled to accept connections ( > 10000) from anywhere on the internet. Would any parameters change? Are there any available examples?

This is mostly a programming type question. i am not looking for image compression or any other specific algorithms or transports. Simply a higher level view of the overall design. Should there be multithreading, what type of queueing? Which language is best suited, why? Any literature/books/articles etc available? (other than comer)

Appreciate any pointers

share|improve this question

closed as not a real question by Tom O'Connor, Holocryptic, womble, sysadmin1138 Jul 17 '11 at 14:24

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

The number of simultaneous connections is not a design input. If you know something about the request rate, service time, processors available for servicing, and queuing theory you can calculate the mean number of connections, as well as how many simultaneous connections must be accepted to achieve some low reject rate. – Ben Voigt Jan 31 '11 at 14:04
1) Design software. 2) Design servers. 3) ???? 4) Profit! – Tom O'Connor Jul 13 '11 at 22:43
up vote 1 down vote accepted

Another high-level architecture question. Wow 2 in one day. I feel special.

Right. Whatever it is you do, it's gotta be quick and lightweight.

I'd probably have a play around with an event driven server. Node.js seems like it might make a good candidate for this.
Don't worry too much about the number of simultaneous connections, or for that matter, the data transfer rate.

The right language to use is the one you know best, but one with some decent HTTP libraries would be nice too.

Yes. There probably should be multithreading, certainly if the design calls for it. See.. You need to design the software first, and then think about the systems underneath.

Perhaps start off with a big-ass sheet of paper, and a pencil, and write down everything you want it to do, until you a) run out of stuff, or b) run out of pencil.

Then go and research how to do all these things.

Then hire people who know what they're doing. It sounds like you're trying to do everything all at once, all yourself.

share|improve this answer

So you have a server generating things and you're looking for a server serving accepting and making it available on the internet? Over http?

Accepting files is easy with network based filesystems. Depending on the operating system of the generating machine, install NFS or samba on the serving machine. Mount the filesystem on the generator. On the generator, run the programs and have them write the images in the mount, the files are automatically available (as local files) on the serving machine.

Serving local static files over http is fairly easy these days, on linux/bsd I would recommend using nginx. The concurrency you mention will push you into Big Bandwidth quickly, depending on the numbers you are moving into CDN territory.

Note: in this design you don't mention metadata about the images (what image is generated, at what time, what are its contents etc), and how the generation is triggered.

share|improve this answer
i am thinking udp, as reliability is not as issue. And due to constraints the same server generates images as well (I wont go into detail as it would mean describing proprietary technology). Any servers like that? Any design pointers on use of multithreading, io libraries, language of implementation etc? – John Qualis Sep 24 '10 at 9:49
Don't fall for the "not invented here" trap. Unless you have specific reasons not to use pre-built component for transport, chances are it's a better value to not do it. – Joris Sep 25 '10 at 8:00

Would any parameters change?

Yes. it would not be a server. Any clue how much processing powe you would need to generate 10.000 images in parallel? And given your bandwidth fo 25 client that would be 16 GB/s to 20GB/s just in bandwidth (factor 400).

You probably talk of 400-500 servers here.

share|improve this answer

"Gearman is a system to farm out work to other machines, dispatching function calls to machines that are better suited to do work, to do work in parallel, to load balance lots of function calls, or to call functions between languages."

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.