1

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

sysadmin1138
  • 133,124
  • 18
  • 176
  • 300
John Qualis
  • 125
  • 4
  • 1
    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
  • 2
    1) Design software. 2) Design servers. 3) ???? 4) Profit! – Tom O'Connor Jul 13 '11 at 22:43

4 Answers4

1

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.

Joris
  • 5,969
  • 1
  • 16
  • 13
  • 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 09:49
  • 2
    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 08:00
1

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.

Tom O'Connor
  • 27,480
  • 10
  • 73
  • 148
0

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.

TomTom
  • 51,649
  • 7
  • 54
  • 136
0

"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."

poisonbit
  • 827
  • 5
  • 6