views:

312

answers:

4

Hi all,

I have a web application project where performances count more than anything else, and I have the choice of the technologies to use.

The language shootout benchmarks that are not really related to web applications.

What would you recommand as the best suitable candidates?

Thanks!


A friend suggested the gwan server on IRC. Looks to be what I was searching but I never heard about it before. Anybody with prior experience on this package? Ease of use, reliability?

Before I leave Apache, I would like to get your thoughts.

+3  A: 

Begin by identifying if your application performance really depends on the language or on some other factor (like database requests for instance). Ability to cache results can also be a very important factor.

For performance the language used come quite far in the list of important points to check and the use case also influence which language is better. For example if you have many regex to check you should check regex support in the candidate language, etc...

For image processing, the most important point will probably be the underlying image library you use, usually written in C. I have the case of ImageMagick in mind, because I'm currently using it. It's available for as a library for most languages and the scripting language layer is only necessary to call functions of the library and used language at that level won't change much (but caching precomputed result images could change performance by a large margin). This use case would probably be similar for calling a cryptographic lib.

If performance is really such an issue, for image processing you could also consider using a lib that works with GPU accelerator cards (libs with cuda or openGPU support).

kriss
Thanks but ImageMagick (a very feature-rich package) is way too big and not that fast.
Michi
@Michi: I'm not suggesting using it, just that most libs should have thin layers to access them from scripting languages, find the lib you need, check the layer is available. I hope you are not expecting to get better performance from image manipulation code written using some scripting language ?
kriss
+3  A: 

Well, if you use a database with a large volume of data you will spend more time there than running a php or asp or (insert other flavours here) script
If you can you should build a mockup of your app (or at least a segment of the more database or processor-intensive parts) and try to benchmark those

vlad b.
Thank you for the reply. In fact, database is not involved, only image processing and other CPU-intensive tasks like encryption.
Michi
Then i would compare language build-in functions versus running stuff from the command line, one at a time and in batches....<br><br>For massive image parallel image processing i usualy have a small processing script that does all the work and a process manager that sets some limits on cpu/ram useage and spawns/pauses/stops processes to always work at the desired load with a 5% room for error.<br><br>For slicing and md5-ing files i use a similar script and both can run at the same time and leave enough power for apache to work as fast as normal.
vlad b.
+5  A: 

If performance counts more than anything else, don't use a scripting language. Especially since you have full control over the technology stack. Compiled languages will perform better for CPU intensive operations.

marr75
or write a C (or other compiled language) extension library to some scripting language, to get the best of two worlds.
kriss
Scripts are a requirement because the source code of the web application must be constantly available for security purposes (allowing supervisors to check that no tampering took place from the inside or from the outside).
Michi
Michi, then, speed isn't the top priority really? You should be able to more or less validate the executables using a MD5-hash or something similar, which would allow your supervisors to check that no tampering took place.
Rob
@Michi: and if you do not follow the path suggested by @Rob (or some equivalenbt one), it will be really hard to ensure no tampering took place at the Web server modules level, or at the OS level (and a human supervisor reading source code is not an efficient way to check a file didn't changed anyway). Would they start reading application code every morning to check nothing was tampered with ? Sounds funny.
kriss
Rob's MD5 idea is a much better way to audit when the code files have changed, and in fact, compiled files would add another level of difficulty to changing the code. Overall, this seems like a pretty silly security requirement, and an even sillier way to handle it. If your supervisors are worried about the code being changed maliciously internally, they should setup a system that auto notifies them when files hashes change.
marr75
A: 

I recommend the Java programming language; it's not a scripting language, but it's probably the fastest programming language that can be used for programming web applications. I also recommend using a framework like Spring for a better programming experience (versus "raw" Java Servlet Programming).

Mr. X
Hmm... my early (crude) tests show that Java is faster than C# - but slower than PHP for what I try to do.
Michi
Java is faster in some problem domains, some functions, some configurations but slower in others. Depends on java flavor and hardware match ups, too. For all intents and purposes, java and asp.net are on the same order of speed magnitude, PHP is definitely on a slower order of magnitude (although experiments with compiling scripting languages are having promising results).
marr75