Menu

cicaptechnical

chtsanti

Technical Informations and Status

Server model

c-icap has been implemented as a multiprocessing/multithreaded server. In the future, both a classic fork-by-request UNIX server and a simple multithreaded server will be included in c-icap, and the user will be free to decide which better satisfies his or her needs.

The multiprocessing/multithreaded server works as follows:

  • Initially, it starts a number of server processes (using fork) and uses a single process for monitoring. Each server process includes a fixed number of threads which perform the main operation.
  • A server process receives and serves requests as long as it has available threads. After the number of available threads is eliminated, another process starts serving requests.
  • If the number of the available server threads decreases under a threshold value, the monitor process creates a new server process.
  • If the number of the available server threads exceeds a threshold value, then the monitor process kills an idle server process.
  • The monitor process continuously checks for available servers at short periods of time. This model ensures that there are always available servers while inactive resources are eventually released.

Implementation details

In UNIX, c-icap has been implemented by using POSIX threads, an IPC shared memory, and an IPC locking mechanism. However, there exists a less tested implementation, which uses POSIX semaphores and a file-locking mechanism for cross-locking between child processes and POSIX memory-mapped files for shared memory.

The server operates well, but there still exist some open issues:

  1. a better signal management is needed
  2. the communication between child processes should be improved.

Win32 implementation

Currently the c-icap does not compile under MS-Windows. Periodically I am doing the port to Win32 using MS Visual C++ but my limited time does not allow me to provide real support for Win32.


Related

Wiki: techinicalcicap

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.