[mercury-users] Assert/Retract

Richard A. O'Keefe ok at cs.otago.ac.nz
Mon Jan 30 13:28:17 AEDT 2006


May I suggest another approach to dynamically loading and unloading
modules?  It involves Erlang-think rather than Java-think.

The idea is to run each separate policy as a separate UNIX process,
communicating with them over pipes, named pipes, or sockets.

The main driver has to keep some kind of collection of communication
channels, and
    - create new processes and add them to the channel collection
    - send queries down the channels
    - receive answer sets along the return channels
    - kill processes (ideally by asking them nicely) and remove them
      from the channel collection
but there's never any question of *changing* any running program.

Process switching could be an issue, but the architecture might make
it possible to send queries in big batches, which would reduce that.
I'd expect reliability to be less of an issue, and this architecture
would allow distribution (policies have to follow a protocol rather
than an ABI and could easily be put on different machines if the
workload grew too much) AND it would allow piecemeal migration of
policy modules from Prolog to Mercury.

--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list