Posts

Showing posts from December, 2011

Start with apache httpd module development...

Image
Apache by name is the start of a giant in http server which is more than 50% of the web world. currently known as httpd, its on such useful because of its popularization architecture where anyone can do there own changes by just  mounting a module. So, today i'm going to demonstrate how to start with apache httpd dynamic module development with a hello world sample. This tutorial is done on linux Mint destro. But any linux version will be no problem. Developing apache modules for windows is pretty straight forward, but need to prepare some tools which is not directly downloadable. The tool used is c/c++ compiler and apxs[APache eXtenSion] tool. apxs for windows is a purl module, and it need to have some configurations. But there wont be any change on application source of on development procedure. For the moment i'll continue for linux and will hope to continue windows instructions later. Required components: Apache httpd server[remember its not tomcat] Apache Ext...

On the way for my own thread pool [Semaphore] for multi-threaded applications

In Linux environment, there is a lack of ready made Database connection pool object or even a easily usable connection object invokees. So, i supposed to write my own implementations for the subject. But still there are some pretty good libraries to ease the implementations [eg: boost C++ lib]. But i thought to continue with standard way. Still this code is under development. The following code is still usable, but with lot of cavities. I'v implemented mutex mode here. But need to implement Semaphore  and avoid Blocked Waiting. That require to implement pThread. Your ideas are always welcome. /**get a new connection from the pool*/ sql::Connection* DBConnector::getConnection(void) { bool gotaconnection = false; for(;!gotaconnection;) { sql::Connection* tmpConnection = NULL; /*if lock is free, lock it and go inside*/ if(DBConnector::isFreeThenLock()) { /*if there are free connections in the pool go and get it then fr...