Article
· 18 hr ago 2m read

Snapshot DB free - Strategies

These are the strategic plans of my example for the External Languages Contest 2025

  • Top of all: Speed
    • Anything that is running in endless loops doesn't help
    • So the steps happen where the environment is best suited for
    • Communications reduce speed. Less Ping-Pong od messages
    • Just exchange what can't be avoided
  • No artificial constructs. Keep it compact and simple to follow,

Python

I'm using the Native API for Python to keep it independent of IRIS instances
The interactive entered connection parameters allow a wide range of IRIS instances
Running it in a Docker container makes me independent of locally installed Python.

Once connected, a slave class is triggered in IRIS to prepare the data by columns.
The fetched 4 columns fill a DataSet and generate the bar chart.
The result is delivered outside the Docker container. 

IRIS#1

I tried to create a class that is independent of the IRIS version.
Int namespace %SYS runs 1 embedded SQL query, resulting in a single string.
The string is splitted into 4 columns, ready for the Python Dataset.
Synchronization is provided by the standard ClassMethod call. 

IRIS#2

Display of the results is implemented a very simple CSP page using the
results deposited outside the container. The biggest challenge was to force
the browser to ignore its actual cached graphic images.
The trick: Instead of just a source request for tab.jpg  I used tab.jpg?#($h)#
the makes no logical sense, but creates a different signature in the browser cache
So what you see is really the last image generated and in synch with the displayed data

Compact code

As both parts in IRIS result in only 4 ClassMethods I decided to pack them together
in a single resulting class that made coding and maintenance very easy.
Similar in Python:
The code is almost linear and easy to follow. Exception: Mimic of ZWRITE for testing

Summary

The exercise could have been composed in IRIS only with or without embedded Python
Though the challenge was to use external code to use connections to IRIS.

Discussion (0)1
Log in or sign up to continue