0

Ninite.com seems to be doing it currently. I'm wondering how.

While it's possible for them to have every combination of app pre-generated, it seems unlikely/hacky.

[EDIT]

Is compiling a Windows executable using this method resource-intensive? Can it be done ~100k times a day without exorbitant cost? I'm asking because Ninite announced that they're going paid-only... can it be costing them that much?

[EDIT2]

The downloads aren't huge, it's just a small hundred KB web-based downloader+installer app that knows which apps to install.

^^ Regarding this, the EXE file served up by the webapp is named something like Ninite AIMP Audacity Chrome Digsby FastStone Installer.exe when given 20+ apps to install. It's probably likely that the server is serving up the same file under different filenames, and the app is then configuring itself based on the filename, no?

tunack
  • 13
  • 4

3 Answers3

1

Why would a web server not be able to dynamically generate an executable?

Richard H
  • 38,037
  • 37
  • 111
  • 138
1

Sure, just run a compiler on the server with exec().

I do something similar with generating PDF files from LaTeX sources, since that is basically compiling as well...

polemon
  • 4,722
  • 3
  • 37
  • 48
  • That was fast -- thanks! Is compiling a Windows executable using this method resource-intensive? Can it be done ~100k times a day without exorbitant cost? I'm asking because Ninite announced that they're going paid-only... can it be costing them that much? – tunack Aug 19 '10 at 09:58
  • 1
    It ultimately comes down to the question, how long your code compiles. if it is just a second or even less, then it shouldn't be much of a problem. But if it takes over ten seconds, I'd try another approach. – polemon Aug 19 '10 at 10:14
  • @tunack: No. Compiling a single windows exe takes a couple of seconds to many minutes (depending on the size). Most likely, they have an existing binary and just replace a resource in it. – Aaron Digulla Aug 19 '10 at 10:19
1

The site doesn't seem to create executable but just provide them for download.

[EDIT] Creating those huge downloads on the fly would create a huge burden on the server. Moreover it could create buggy software. So my guess is, if these people know what they're doing, they have a server which prepackages everything, tests it and then dumps it in the download directory of the web server.

But of course, nothing stops a server from invoking any kind of program (with maybe the exception of the patience of the surfer). So they can run compilers, archivers, whatever.

Aaron Digulla
  • 321,842
  • 108
  • 597
  • 820
  • The downloads aren't huge, it's just a small hundred KB web-based downloader+installer app that knows which apps to install. – tunack Aug 19 '10 at 10:02
  • In that case the installer is probably a fixed binary with a config file. Servers have no problem to create text from some description (HTML is text, so what you see on the screen is just the same happening) and then, the server just has to add the selected configs to the binary. That's much more simple (and faster) than compiling a new binary. – Aaron Digulla Aug 19 '10 at 10:18