Describing the Janus

From: David Cressey <david.cressey_at_earthlink.net>
Date: Thu, 08 Sep 2005 13:58:18 GMT
Message-ID: <_rXTe.9332$FW1.7976_at_newsread3.news.atl.earthlink.net>



I want to describe an object that I've been imagining for a while. I've called it the "Janus".

A Janus has two faces. I can describe each face reasonably simply: one face is an SQL client, the other face is an object, interacting with other objects in an object world.

In the SQL client face, the Janus simply issues SQL requests to an SQL server, and interprets the consequent responses. It's appearance doesn't differ markedly from any other SQL client, like Interactive SQL, or SQL that was written into (or invoked from) an application program.

In the object oriented face, the Janus acts like any other object in an object oriented world. It interprets messages, uses encapsulated methods, and issues responses. It can also initiate dialogue with other objects, as needed. Its behavior is much like that of other objects in the same object world, although it seems to encapsulate an awful lot of data.

The other objects in the object world, don't know that the Janus has another face. The SQL server (presumably the front end for a relational DBMS with a database mounted on it) doesn't know anything other than the SQL client face of the Janus.

The Janus doesn't keep very much inside of itself. All it does is transform object oriented requests into SQL requests, and transform SQL responses into object oriented responses. It's not clear to me when the Janus would ever initiate a message to another object, but that's food for further thought. I have some inklings, but they are very vague.

There it is. I can describe it, but I have no idea how to build it.

Can you build a generic one, or would you need a different Janus for each object world? Could several Januses (Janae?) all interact with the same database but exist in otherwise disconnected object worlds? Could several Januses exist in the same object world, but be connected to different databases?

Is there any use for such a thing? I imagine that it might be an approach to solving the impedance mismatch between the (SQL based) relational DBMS products and the world of Object Oriented application development. Received on Thu Sep 08 2005 - 15:58:18 CEST

Original text of this message