As you know in Caché / IRIS you have the possibility to define a property as Multidimensional as documented here:
https://docs.intersystems.com/iris20201/csp/docbook/DocBook.UI.Page.cls?KEY=GOBJ_proplit#GOBJ_proplit_multidim
and the explanation of how to use it
https://docs.intersystems.com/iris20201/csp/docbook/Doc.View.cls?KEY=GOBJ_proplit#GOBJ_proplit_multidim_values

Though the access is quite comfortable (in traditional COS sense) there are 2 main restrictions that hurt:

#1) It is not saved to disk unless your application includes code to save it specifically.
#2) It cannot be stored in or exposed through SQL tables
there are some more
I'll show how to overcome these limits

14 1
2 538
Article
· Apr 26, 2020 5m read
Materialized Views

A VIEW in SQL is basically a prepared SQL statement.
It has to be executed and assembled like any other SQL query.
MATERIALIZED VIEW means that the content is collected before hands and can be retrieved rather fast.
I saw the concept first with my favorite competitor named O* and they made a lot of noise about it.

{ favorite: because I could win every benchmark against them devil }

12 3
1 719
Article
· Apr 25, 2020 2m read
Static WHERE Conditions

The typical WHERE condition in SQL relates mostly to some content of the rows you work on.
So it needs to be calculated and checked for each row you access.
Differently (and that's why I named it STATIC) is a WHERE condition that is independent of the rows you access.

14 2
1 490
Article
· Apr 4, 2020 1m read
Websocket Echo server IRIS

In Caché you had an example of a WebSocket Server in namespace SAMPLES
With IRIS the samples are gone and require additional installation effort.

So I refurbished the code with some useful additions:

  • independent of namespace
  • timeout control from client
  • readable communication log

This contains 2 classes:

12 0
0 608
Article
· Dec 9, 2019 1m read
SUDOKU demo

A demo in traditional style COS

This was written based on a previous trial in .XLS
It is far from being perfect. Rather a challenge for
improvement in all directions (code, interface, ...)
So anyone feel invited to make it better.

13 0
0 549
Article
· Jun 10, 2019 1m read
more usefull Object Dump

During testing your code you are often confronted with the need to examine
the actual content of an object. Either using ZWRITE or $system.OBJ.Dump()
you get a picture of simple properties as "--- attribute values ---"
while "--- swizzled references ---" are more confusing than informative
and with "--- calculated references ---" you are just left in the lurch.

This small helper class allows you to dump an object to terminal or
e.g in background to some stream for later review.
By default, you see just properties with content,

16 0
1 914
Article
· Jun 5, 2019 1m read
Using Interjob Communication (IJC)

Earlier I've written about command pipes.
This is the internal variant of a PIPE.

To make this more tangible and visible for you I prepared a small example
The scenario is to run a monitoring process that receives
input from an unknown number of sensors. (Could be Lab equipment or similar.)

12 0
0 404
Article
· May 30, 2019 2m read
BackgroundJobs over ECP

Running a Background Job using the JOB command is a well-known feature.
Using ECP to distribute databases to several servers is also well-known.
But using the combination of both to run a process on a different server
seems to be a rare case.

Sure there are enough other ways to start a remote job, but the special
combination with ECP where the application server starts a process on a
data server without additional networking is worth to be remembered.

13 0
1 587
Article
· May 29, 2019 1m read
Simple Remote Server Control

This example is extracted from a long-running installation.
The purpose is to have simple monitoring of several servers at a rather primitive level.
Just slightly more intelligent than a raw PING. But still easy to integrate.
It avoids the overkill of information you are often confronted with while you are just
interested in the number of active processes or similar basic figures.
The example shows a basic skeleton that might be easily filled by your real needs.

It consists of 3 sections:

13 0
2 543
Article
· Feb 8, 2019 2m read
Client Websockets based CSP

The Caché / Ensemble standard distribution contains in namespace SAMPLES
a nice example of a CSP page consuming WebService as a Client.
I have modified it not only to display the replies but to feed them back into a Global.
I used the classic Hyperevent to achieve this. The replies end up as a log in global^WSREPLY.
When there is no input anymore the page closes and goes away.

There are 2 versions with visible and hidden display during operation.
dc.WSCSP.reverseVerbose.cls and dc.WSCSP.reverseHidden.cls

11 0
0 475
Article
· Feb 8, 2019 2m read
Client Websockets based on Node.js

It will demonstrate the wide range that is openend by making use
of the power embedded in Node.js and its adapter to Caché, Ensemble, Health,..*
Node / JavaScript have wide reputation to work as a WebSocket client.
By using the Caché adapter it becomes easy to control it and to consume the results as a
Client for WebSocket Servers and to collect the replies in Caché, Ensemble, ..

I used node-v6.16.0-x64.msi and cache610.node as cache.node

You provide a Global for input:

14 0
1 787

*** archived ***

The question has come up several times and I saw mixed answers and no quick example

My personal preference is using CPIPE device as you get back exactly the output you will get at the command line interface of your OS .
The tricky thing is to stop reading in time.
The example just displays what you normally see in your console.
it becomes useful if you look for things that you can't get from any $system.whatever()

15 5
4 2.1K
Article
· Feb 27, 2018 2m read
Dataset Lightweight M:N

This data set demonstrates a basic M:N relationship between 2 tables
The dataset is targeted to show a slim implementation of M:N
It's no question that other implementations exist. But at significantly more storage consumption.

6 0
0 273
Article
· Feb 26, 2018 2m read
M:N Relationship

If you have worked with Caché Objects,
You know already all about Relationships (one:many , parent:child) ...
But you will not find a word on many:many relationships in the docs.

But I met the question quite often from new adopters of Caché objects:
"Is it possible to implement many:many relationships ?" YES - of course !

12 7
0 1.1K
Article
· Feb 16, 2018 2m read
Adopted Bitmap

The base class Bmap.Person defines persons within an organization distributed
by various countries. All records are indexed by (Country, PersonalId).
this structure doesn't allow use of bitmaps.

So a wrapper class Bmap.PersonQ around the data eliminates the top level of
the index (Country) and isolates the PersonalId (%Integer, MINVAL=1).
We are ready to use a Bitmap index.

A few performance figures on 300010 generated records.
You see that Relative Cost are sometimes quite misleading.

base

14 0
1 830
Article
· Nov 11, 2017 3m read
Summary on Local Variable Scoping

This should be an overview over a subject that pops up over several places in online documentation mostly as remarks and never as dedicated chapter.

Once upon a time ... No it's not a fairy tale.
In the beginning of Caché (and before) you had your partition to run your code. Part of that partition was a space with all your local variables nicely sorted by %,A,..Z,a,...z

14 3
1 945