[Developers] Suggestion: New API CCTK_Announce

Thomas Radke tradke at aei.mpg.de
Mon Jul 17 10:33:19 CDT 2006


Hi,

I want to revive an old discussion about Erik's suggestion to provide an 
API for announcing information from a running Cactus simulation to some 
external services:

   http://www.cactuscode.org/pipermail/developers/2005-June/003935.html
   http://www.cactuscode.org/pipermail/developers/2005-June/003950.html

[or, as long as the Cactus mailing list archives are down, check the 
cached webpages after googling for 'CCTK_Announce']

Erik proposed an API such as

   CCTK_Announce ("keyword", "value")

with both arguments being strings.
Jonathan also asked for a "how important is this?" integer argument, 
perhaps with semantics similar to those of the similar argument to 
CCTK_VWarn().
Tom reminded this very much of the interface for CCTK_Log(), a new 
feature to be implemented in Cactus 4.1. It would take a fixed set of 
logging levels, and the callback routines registered with the logging 
interface could decide on their own which levels should be logged.

Here are my thoughts:

Cactus should have an API for thorns to announce important information 
about simulations to some external, persistent data storage. The idea is 
that other services (eg. a Cactus portal) can then be used later on to 
search in that storage, query for simulations by user/date/parfile, find 
certain events, extract parameter settings etc.

Such an API should be used with that very purpose in mind: storing data 
in a machine-readable form, for later post-processing. This is in 
contrast to writing info/warning messages to stdout/stderr (which 
sometimes simply clutters your logfiles), or to generating a application 
syslog via CCTK_Log() which I would rather see as a debugging aid.

I also propose to provide CCTK_Announce() support for typed information, 
similar to the key/value table API, ie.

   CCTK_AnnounceInt (int level, const char* key, CCTK_INT value);
   CCTK_AnnounceReal (int level, const char* key, CCTK_REAL value);
   CCTK_AnnounceString (int level, const char* key, const char* value);
   etc.

plus a routine with which structured information can be announced:

   CCTK_AnnounceTable (int level, const char* key, int table_handle);

The key can be used to identify announced information items. Each item 
would also have attached the originating thorn and the date/time of the 
CCTK_Announce() call (so that periodic announcements of the same 
key/value pair can be distinguished). All of these fields, including the 
actual key values, might be used to search in the data storage.

Would this API be sufficient ? Please provide feedback and comments !
I will then implement it, first as a set of aliased functions.


PS: Just to put the above into some context:
     An information data storage, based on RDF (http://www.w3.org/RDF/),
     is currently being developed in the AstroGrid project
     (http://gac-grid.org/); an early prototype is already available,
     as well as code in Cactus (in AEIThorn/Formaline) which announces
     basic simulation metadata in RDF format.
     Now I would like Cactus users to also announce information which
     they find important enough to be queried for later on.

-- 
Cheers, Thomas.


More information about the Developers mailing list