gnumed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnumed-devel] GNUmed backend listener engine


From: Karsten Hilbert
Subject: [Gnumed-devel] GNUmed backend listener engine
Date: Fri, 26 Oct 2007 15:13:44 +0200
User-agent: Mutt/1.5.16 (2007-06-11)

I have revamped our backend listener code to be more robust
and easy to use.

During database setup tables can be marked to deliver
signals to the frontend whenever INSERTs, DELETEs or UPDATEs
happen:

        select gm.add_table_for_notifies('blobs', 'doc_med', True);

means:

        "signal changes to table "blobs.doc_med" with the
        (default) signal <doc_med_mod_db:> to frontends and do
        attach (True) the *patient* PK the change relates to

The client will at startup autoconfigure itself to listen
for known signals. Whenever a patient is activated it will
reconfigure its listening behaviour to listen to those
signals which concern the active patient only.

So, frontends will only need to listen and react to the
signal "doc_med_mod_db" and can be sure to be notified about
changes to their active patient's documents when they occur.

The current devel client (0.2.8) implements that for allergy
entries. Whenever an allergy is added to a given patient all
other frontends which display the same patient are notified
and update their allergy display in realtime.

Currently in progress is broadcasting of document changes
such that newly imported documents show up on other clients
automagically as soon as they are imported.

Karsten
-- 
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346




reply via email to

[Prev in Thread] Current Thread [Next in Thread]