Showing posts with label webserver. Show all posts
Showing posts with label webserver. Show all posts

Monday, June 4, 2012

A good multithreaded python webserver?


I am looking for a python webserver which is multithreaded instead of being multi-process (as in case of mod_python for apache). I want it to be multithreaded because I want to have an in memory object cache that will be used by various http threads. My webserver does a lot of expensive stuff and computes some large arrays which needs to be cached in memory for future use to avoid recomputing. This is not possible in a multi-process web server environment. Storing this information in memcache is also not a good idea as the arrays are large and storing them in memcache would lead to deserialization of data coming from memcache apart from the additional overhead of IPC.

Sunday, June 3, 2012

Is Ubuntu an acceptable distro for running a production server?


I'm not a great Linux expert, but I'm comfortable running my Ubuntu desktop. I've also got a little experience running Ubuntu as a server as well, for my home network.

Thursday, May 31, 2012

Translating an Apache .htaccess file to an IIS web.config




I developed an application on my local using PHP, MySQL and Apache and it has a .htaccess file containing this:

Tuesday, May 29, 2012

ssl_error_rx_record_too_long and Apache SSL


I've got a customer trying to access one of my sites, and they keep getting this error > ssl_error_rx_record_too_long

Friday, May 25, 2012

Deploy a project using Git push


Is it possible to deploy a PHP website using git push ? I have a hunch it has something to do with using git hooks to perform a git reset --hard on the server side, but how would I go about accomplishing this?

Tuesday, May 15, 2012

How is memory management in PHP different from that in Python?


What is the difference in how they are handled?



Specifically, why is it common to find Python used in production-level long lived applications like web-servers while PHP isn't given their similar efficiency levels?

Friday, April 6, 2012

Tiny PHP "standalone” server (or framework) for local debug without Apache/Nginx/Lighttpd/etc


There's manage.py runserver in Django or ruby script/server in Ruby on Rails — those familiar with one of those frameworks should already get the idea what I'm looking for. They run tiny "standalone" web server, which is perfectly enough to debug the application locally, without any need for other software (Apache/Nginx/Lighttpd/etc).

Friday, February 24, 2012

Render images by java code or read images from a static path?


Here's my code:



1.Java Code:




public static void getImg(Long itemId) {
try {
Item item = Item.findById(itemId);
if (item.img != null && item.img.getFile() != null{
response.setContentTypeIfNotSet(item.img.type());
renderBinary(item.img.get());
}
} catch (Exception e) {
Logger.error("Can't find image,itemId = " + itemId);
}
}

html : < img src="@{{ Items.getImage(123)}}"/>