Welcome everyone!
Hope to meet you here.
Let's have a dedicated discussion thread about Ready 2025. Please post your impressions! Ideas! Inspiration! Photos!
Keynotes are streamed live so even if you're not in Orlando, you can still join!
Welcome everyone!
Hope to meet you here.
Let's have a dedicated discussion thread about Ready 2025. Please post your impressions! Ideas! Inspiration! Photos!
Keynotes are streamed live so even if you're not in Orlando, you can still join!
For my hundredth article on the Developer Community, I wanted to present something practical, so here's a comprehensive implementation of the GPG Interoperability Adapter for InterSystems IRIS.
Every so often, I would encounter a request for some GPG support, so I had several code samples written for a while, and I thought to combine all of them and add missing GPG functionality for a fairly complete coverage. That said, this Business Operation primarily covers data actions, skipping management actions such as key generation, export, and retrieval as they are usually one-off and performed manually anyways. However, this implementation does support key imports for obvious reasons. Well, let's get into it.
How do you collect stack info when debugging non-interactive jobs?
I cobbled this together today from the docs, but maybe there's something pre-built? LOG^%ETN()?
set stack = ""for loop=0:1:$STACK(-1) {
set stack = stack _ "Context level:" _ loop _ " Context type: " _ $STACK(loop) _ $c(10,13) _
" Current place: " _ $STACK(loop,"PLACE") _ $c(10,13) _
" Current source: " _$STACK(loop,"MCODE") _ $c(10,13)
}Log meth
I have an Embedded Python method, which is essentially a call to one third-party module.
Most of the time, the method takes <0.1 seconds to execute, but sometimes it takes 30 or 60 seconds.
The server is relatively idle (20-30% CPU load).
How can I debug this issue further? Ideally, I want to know where this library spends the time. The library is mainly Python code (it's boto3, so it's not a Python C API proxy library).
It's been a while (and everyone is well-rested after Advent Of Code!) so let's run another round of Code Golf.
Your task is navigating in a grid-like labyrinth in a clockwise spiral pattern. As it traverses the matrix, it collects characters, revealing a secret message. Your challenge: find the shortest, most elegant code to decode this spiral cipher. Input:
Output: The decoded message as a single string
Constraints:
When you deploy code from a repo, class (file) deletion might not be reflected by your CICD system.
Here's a simple one-liner to automatically delete all classes in a specified package that have not been imported. It can be easily adjusted for a variety of adjunct tasks:
set packages = "USER.*,MyCustomPackage.*"set dir = "C:\InterSystems\src\"set sc = $SYSTEM.OBJ.LoadDir(dir,"ck", .err, 1, .loaded)
set sc = $SYSTEM.OBJ.Delete(packages _ ",'" _ $LTS($LI($LFS(loaded_",",".cls,"), 1, *-1), ",'"),, .err2)Recently I got into a situation where a user had some roles, which granted additional roles, and so on.
As I did not understand where a particular permission came from, I wrote this code which gets an initial set of roles and unwraps them recursively, accounting for any repeats.
Today we have an unusual code golf: build a program (using only printable ASCII characters, tabs and newlines) that prints out exactly the characters in the printable ASCII space (characters 32 to 126) that don't appear in your program's source code (in any order, however many times you want).
As usual, the goal is to produce the shortest code to do this.
My (admittedly not very good, but does the job!) entry:
Classascii.ascii {
ClassMethodascii()
{
setx="!#$%&'()*+,-./0123456789:;<>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdfghijklmnopqruvwyz{|}~"
}
}If you're running IRIS in a mirrored configuration for HA in GCP, the question of providing a Mirror VIP (Virtual IP) becomes relevant. Virtual IP offers a way for downstream systems to interact with IRIS using one IP address. Even when a failover happens, downstream systems can reconnect to the same IP address and continue working.
The main issue, when deploying to GCP, is that an IRIS VIP has a requirement of IRIS being essentially a network admin, per the docs.
To get HA, IRIS mirror members must be deployed to different availability zones in one subnet (which is possible in GCP as subnets always span the entire region). One of the solutions might be load balancers, but they, of course, cost extra, and you need to administrate them.
In this article, I would like to provide a way to configure a Mirror VIP without using Load Balancers suggested in most other GCP reference architectures.
It's Friday and a long weekend is upon us, so let's have a round of code golf!
Nowadays, it's rare to find a text message without at least one emoji. 😃😄😎🙂😊😀😁😆😂
But back in the day, people had to be creative to express their emotions in text. They would use emoticons, which are symbols made up of keyboard characters :^)=])B).
Our challenge for today is to create a function that receives a string as argument and returns the total number of smiling faces or happy faces.
Each smiley face must have one smiling mouth, which should be marked with ), ], }, D or >.
A smiley face can have a pair of eyes but it does not have to. Valid characters for eyes are :, ;, 8, B or =.
A nose is optional, and can be represented these characters: -, ^, c, o and ~.
Valid smiley face examples:
:) :D ;-D :~) :‑) :-] =)
:] :-> :> 8-) :D 8‑D )
8) :-} :} :o) :c) :^) =]
:‑D 8D =D B^D
"count how many smiley faces are here :)"
1
Hello Community,
I'd like to share with you our article with @Regilo.Souzaon AWS Amazon blog Automating application-consistent Amazon EBS Snapshots for InterSystems IRIS databases. Our team has created this step-by-step instruction to create application-consistent snapshots for InterSystems IRIS databases. In this article, we outline how to automate pre-scripts to pause I/O and flush buffer to disk and post-scripts to thaw I/O, as shown in the following figure:
Let's have another round of code golf, with a different signature today!
Write a classmethod that will receive a variable number of parameters containing comma-separated strings and/or positive numbers, and returns one of four possible string values.
Depending on the ordering of the lengths of the elements in the input, your method should return:
Work Queue Manager (WQM) is a feature of InterSystems IRIS that enables you to improve performance by distributing work to multiple concurrent processes programmatically. The idea is that you split the work into chunks, and WQM distributes the chunks across worker processes and can provide the info that the work is done.
However, recently, I got an interesting question: there's a large logical transaction composed of ~1,000,000 individual objects and SQL inserts and updates. Some updates are CPU-intensive, so the original idea was to use WQM to split an update into chunks to speed things up.
Welcome to the next chapter of my CI/CD series, where we discuss possible approaches toward software development with InterSystems technologies and GitLab. Today, we continue talking about Interoperability, specifically monitoring your Interoperability deployments. If you haven't yet, set up Alerting for all your Interoperability productions to get alerts about errors and production state in general.
Inactivity Timeout is a setting common to all Interoperability Business Hosts. A business host has an Inactive status after it has not received any messages within the number of seconds specified by the Inactivity Timeout field. The production Monitor Service periodically reviews the status of business services and business operations within the production and marks the item as Inactive if it has not done anything within the Inactivity Timeout period.
The default value is 0 (zero). If this setting is 0, the business host will never be marked Inactive, no matter how long it stands idle.
Recently, I needed to run WebGateway on an additional port but with a twist - this port should publish only one web application.
At first, I thought about configuring Web Gateway to allow only specific web applications (~urls), but Web Gateway configuration is per Apache configuration:
LoadModule csp_module_sa "/opt/webgateway/bin/CSPa24.so"
CSPModulePath "/opt/webgateway/bin/"
CSPConfigPath "/opt/webgateway/bin/"And while LoadModule has two allowed contexts, server config and virtual host, the csp module must be loaded once in the server context.
But we can use two VirtualHosts and here's how:
Multi-tap or multi-press is the name given to the historic technique of writing SMS on the first mobile phones with a keyboard of 10-12 numeric keys.
For example, to type LOL you need to press 5 three times, 6 three times and 5 three times again.
Your task is to write a function that takes a string as input and returns the repeated digits associated with each character according to the multi-tap system.
Should consider letters from A to Z, doesn't distinguish between upper/lowercase characters.
Numbers are allowed, and any punctuation should be ignored.
"Example"
"339926755533"
If you're running IRIS in a mirrored configuration for HA in Azure, the question of providing a Mirror VIP (Virtual IP) becomes relevant. Virtual IP offers a way for downstream systems to interact with IRIS using one IP address. Even when a failover happens, downstream systems can reconnect to the same IP address and continue working.
The main issue, when deploying to Azure, is that an IRIS VIP has a requirement of IRIS being essentially a network admin, per the docs.
To get HA, IRIS mirror members must be deployed to different availability zones in one subnet (which is possible in Azure as subnets can span several zones). One of the solutions might be load balancers, but they, of course, cost extra, and you need to administrate them.
In this article, I would like to provide a way to configure a Mirror VIP without the using Load Balancers suggested in most other Azure reference architectures.
Let's do a round of code golf! Last one was very popular!
The Chinese zodiac is a repeating cycle of 12 years, with each year being represented by an animal and an element that changes every 2 years.
The animals are: Rat, Ox, Tiger, Rabbit, Dragon, Snake, Horse, Goat, Monkey, Rooster, Dog and Pig.
The elements are: Wood, Fire, Earth, Metal and Water.
Your task is to write a function that receives a year, and returns the element and the animal that year represent.
Let's use the year 1924 as start point, in the Chinese zodiac the element was Wood and the animal was Rat.
2023"Water Rabbit"For containers in ECS files are not editable if the file size is larger than ephemeral storage free space. For example if I have 4Gb free I can't edit 8Gb file. But if I start container with 50 Gb of ephemeral storage (24Gb free) I can edit my 8Gb file just fine. Even file attributes cannot be changed: chattr -i <file> fails if the amount of free ephemeral storage is not enough (and so db can't be mounted for writing).
Has anyone tried to authenticate IRIS client in Snowflake using Key Pair Auth as described in this doc?
What's the way to get healthcheck info for an IRIS (container) running without PWS?
If you work with Productions, highlighting connections between Business Hosts is a very convenient feature, allowing developers to get a visual representation of a data flow.
Has anyone tried AWS Batch with InterSystems IRIS docker images?
I have a noninteractive workload (but it requires internet access from the job to deliver results), so I'm considering using it as a simpler alternative to ECS since Fargate backs both, and that's enough for my use case.
I wonder if anyone tried and cares to share the results, issues, cfn templates.
Our previous code golf ended with an overwhelming win, so now it's time for another one.
Parenthesis Hell is a Lisp-like esoteric programming language(esolang).
As a Lisp-like language, the code consists only of nested matched pairs of opened and closed parenthesis.
Your task is to write a method that receives a string of parenthesis and returns 1 if the order of the parenthesis is valid. For example, the string of parenthesis (())() is valid because it contains a matched pair of opened and closed parenthesis at each position. The string ()((()))) is not valid because it contains one unmatched parenthesis.
I have the following setup: REST broker calls inProc BO via BS. As BO initialization is time-consuming, I want to reuse the same BO during the CSP process lifetime.
I have tried the following approaches:
%session.Preserve to 1 (I would prefer not to use it as the BO object is not linked to a specific client)$$$EnsInProcPersist to 1 (looked relevant)However, every time I call my REST endpoint, I get a new BO. Is there a way to cache inProc BOs in the CSP context?
I'm trying to execute SQL on a EC2 via SSM:
How to import Custom Schemas from VSCode? They look like this:
<?xml version="1.0"?><Categoryname="ITK"description="xmlns:hl7='urn:hl7-org:v2xml' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'"std="1"><MessageTypename='ACK'structure='ACK'returntype='ACK'description='xsi:schemaLocation="urn:hl7-org:v2xml ACK.xsd"'/></Category>Instead of wrapped XML export produced by $system.OBJ:
Recently I needed to restore a version of a production class, which was overwritten by compilation and running UpdateProduction. As the correct version was unavailable in the source control, I used journals to restore the data. Journals store a plethora of information about what's happening in the system and are quite a powerful tool. This article explains how to work with journals to extract the data you require.
Is it possible to abort system start during SYSTEM^%ZSTART?
If some conditions are not met, I want to shut down IRIS instead of continuing with the startup.
When developing interoperability productions, it might be useful to have settings outside of a Business Host. The primary reason is when you need a setting to affect several different Business Hosts and want to guarantee that the value is the same. While System Default Settings can be used to propagate settings for Business Hosts, they can be changed by overriding the value on a BH level (although the advantage of Business Host settings set via SDS is that they don't need custom code which our current approach requires).Another reason is when you need to affect non-setting parts of the