[Bond-users] Bond vs. Glom for small clinic

jasen at tyreal.treshna.com jasen at tyreal.treshna.com
Mon Jan 5 17:29:58 EST 2009


On Mon, Dec 29, 2008 at 12:58:01PM +0100, Gour wrote:
 
> I know about it, but I also do not know if I'd use hdbc in my Haskell
> program, what can I do with Bond?
> 
> Davor> I suppose you could write your functions in Haskell, and then use
> Davor> Haskell/C connectivity to call the functions from Bond.
> 
> What about vice versa, is it possible to communicate with Bond from
> external (e.g. Haskell) application?

If it can talk to postgresql it can interact with a bond application.

you use the SQL command "notify" which sends a broacast message to all 
postgresql clients of the database that are listening.

 noitfy panic;

in bond you have a notify trigger 

 <trigger event='notify' notify_type='remote' value='panic' >
 
that takes action as apropriate.

it's possible write loops in bond notify triggers that will loop through the
records in a table etc so quite complex things can be done.
this trick relies on a little sql function that retriggers bond becoming
effectively a "goto", and writing most of the logic of the loop in SQL.




More information about the Bond-users mailing list