Can you please elaborate previous thoughts little bit more?
Well, instead of the fork() command you would use on Unix, you use the DBMS_JOB.Submit command.
The "child" process (DBMS_JOB session running as Oracle process Jnnnn) does not inherit the data segment of the parent - but this should not be a problem. You simply directly call the client procedure you want to execute via DBMS_JOB.
If you want to control the number of client jobs that can execute, you can implement a user defined resource via DBMS_LOCK and the number of locks/latches that may exist on it. Each DBMS_JOB submission locks it - and unlocks it when terminating.
If you want some form of IPC between parent and child processes, Oracle provides a range of IPC-like features. There is DBMS_PIPE. There is advanced queues. Even a normal table can suffice for the clients to insert "messages" into for the parent to process.
The basic architecture of multithreading is thus the same. Just the implementation differs slightly.
Oracle is a lot like an operating system. It has a lot of the common features that you'll find in operating systems. Many of these features are published as APIs via Oracle supplied PL/SQL packages (like DBMS_PIPE, DBMS_SCHEDULE, UTL_TCP, etc) - in other words you have:
- a TCP client socet API
- a job queue API
- a web browser
- an e-mailer
- pipes (between database sessions)
- message queues
- a "ftp" like API (between databases)
- a file system I/O API
- an integrated HTTP server daemon
etc.
Even better, PL/SQL and Oracle itself (at SQL and db core level) not only supports object classes, but has the ability to persist these as columns in tables.
I do 99% of all my back-end code inside Oracle. The few times that I have to do stuff outside Oracle is when dealing with pure o/s stuff - which I do using shell scripts.
Oracle is a very capable application platform. As Oracle Application Express clearly shows.