GT.M POSIX plugin

8 views
Skip to first unread message

Bhaskar, K.S

unread,
Jul 19, 2012, 5:07:16 PM7/19/12
to Hardhats, Vi...@googlegroups.com, Enterprise Web Developer Community
GT.M's open architecture makes it easy to extend GT.M with calls to functions in popular standard libraries.  Such a call entails creating a small wrapper of a few lines for each function.  On UNIX/Linux platforms, GT.M V5.5-000 brought a small enhancment to the "gtmprofile" shell commmand file that provided a framework for plugins that could be dropped into an existing GT.M installation: for any standard format plugin in the plugin subdirectory, the "gtmprofile" file automatically sets up environment variables to access the plugin.  With the release of V5.5-000, we released a plugin to use the popular zlib compression library.

We have now released a plugin that wraps select POSIX functions to extend GT.M functionality with regular expressions, microsecond resolution time measurement, logging to the system log, and more.  The plugin consists of low level functions that wrap individual POSIX functions and higher level functions that package the new functionality in a form more familiar to GT.M programmers.  For example, the higher level extrinsic special variable $$zhorolog^%POSIX extends the intrinsic special variable $horolog with microsecond resolution (while the resolution is in microseconds, the accuracy is of course determined by your system):

GTM>write $horolog,!,$$zhorolog^%POSIX 
62657,52958
62657,52958.867702
GTM>


$$zhorolog^%POSIX invokes the low level function &posix.gettimeofday() which in turn wraps the POSIX gettimeofday() function.

Plugins are released as source code with a readme.txt describing installation & usage, and can be downloaded from Source Forge (http://sourceforge.net/projects/fis-gtm/files/Plugins); the new POSIX plugin also includes a Makefile for compiling, testing, and installing the plugin.

Regards
-- Bhaskar

-- 
GT.M - Rock solid. Lightning fast. Secure. No compromises.
_____________
The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you.
Reply all
Reply to author
Forward
0 new messages