Subject Re: [IB-Architect] Apache's cross platform libraries
Author Jim Starkey
At 06:04 PM 4/28/02 +0200, Paulo Gaspar wrote:
>Also on the cross platform issue...
>This library represents years of cross platform (web) server
>coding know-how and it is used for the new Apache 2.0 that
>recently reached final status (after a really long beta):
>The APR also supports very well threading even under Windows.

I would advise against adoption of any "portable runtime". A
database must take advantage of whatever glue an operation
system offers. Each operating system, by and large, offers
or a more or less coherent set of services. Any portability
API must mask the differences, imposing a common subset, and
blocking the platform specific goodies.

A case in point is data structure locking in a multi-threaded
environment. Both NT and Linux offer mutexes (aka critical regions).
Neither has a reasonable multi-state (i.e. shared/exclusive)
locking mechanism, so it is necessary to build one from whatever
services are available. The pthread semantics for waking up
a thread are badly thought out (impossible to wake up a specific
thread), while the NT semantics are quite civilized. If a
system restricts itself to common semantics, it's hard to end
up with anything acceptable on either Linux or NT, let alone
optimal for each.

Jim Starkey