Home > Java, Telecom > JSLEE is a Unix modelled in Java

JSLEE is a Unix modelled in Java

The more I think about JAIN SLEE model, the more it resembles for me an architecture of Unix. In short, resource adaptors are device drivers, services are demons, and SLEE itself is a kernel.

Let’s take a look on typical network server (HTTP, for instance) working on top of Unix. First, OS starts and ininitalizes network driver (ethernet, for instance), then it reads initialization script and starts demon application in separate process. Demon application uses OS API (“system call”) to start listening for incoming requests. Those system calls are “blocking”: OS blocks execution of demon process until data will arrive. Then some packet is received, device sends interrupt to CPU, and data are read in “interrupt” system process. After reading the data and parsing them, the kernel “wakes up” blocked demon process.

Very similar thing happens in JAIN SLEE. First it starts and intializes all RAs and services. Service locates RAs and subscribes for “events” on them. Then some message is received from the net, a thread of RA reads the message and parses it, then handles it to SLEE. SLEE invokes event processing code of service.

The main difference is that demon is a separate process, but service is “passive”, because all event processing code is executed by SLEE. Processing model of SLEE is more similar to Unix signals than to Unix I/O, but still the analogy is very strong. Another difference is that Unix has memory protection, so it performes data copying from kernel memory space to user memory space, and back. SLEE has all the memory shared between all threads, and it doesn’t create problems, because there are no explicit cleanup in Java. These two differences are connected: execution of event processing code by kernel’s process is not possible in Unix, because memory protection is based on IDs of processes.

Advertisements
Categories: Java, Telecom

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: