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.

But, here's a catch: if one of the individual 1,000,000 changes fails (there's a variety of application-level checks so that it can fail, and that's not even that abnormal a behavior), the entire transaction must be rolled back. That creates a problem: each chunk must report success before committing their individual transactions, and someone must get all these reports and decide if we are committing or not.

Unfortunately, it looks like WQM does not have a bidirectional communication between workers and manager, so I suggested an approach using events:

  1. Start jobs.
  2. Wait for all jobs to report success using $System.Event.WaitMsg().
  3. Send Commit or Rollback using the $System.Event.Signal().
2 9
1 158

This year at Global Summit we will have several members of the InterSystems internal applications team (AppServices) on site to present topics of interest to developers. There will be General Sessions that we teach on a number of topics related to tools we're launching to the OEX, knowledge gained based on migrating our Caché app portfolio to InterSystems IRIS, best practices for following OWASP Top 10 with ObjectScript, and a survey of the application landscape offering services to our customers and prospects.

2 9
0 190

Hi folks!

I'm playing with IRIS interoperability at the moment and it turned out that Data Transformation cannot be the element of production by itself.

It can be called either from data rule or from business process.

But why?

What if I just want to change the message with the transformation and transfer the message somewhere else? Why the overhead with Rule or Business process?

1 1
0 144

Hi Community!

There are two general ways to execute arbitrary SQL in serverside ObjectScript code: EmbeddedSQL and ObjectScript SQL a.k.a. Dynamic SQL.

E.g. if we want to get the value of the property of instance with a certain ID using SQL we can do:

&sql(SELECT Name INTO :name FROM Sample.Person WHERE ID=1)

write name

Same result with %SQL.Statement:

set rs=##class(%SQL.Statement).%ExecDirect(,"SELECT Name as name FROM Sample.Person where ID=1")
  do rs.%Next()
  write rs.name

1 2
0 899

Hi, Community!

Open Exchange (OEX) is getting more and more popular and more and more developers consider publishing their apps in the public package manager registry.

This is really great!

So the topic of thoughtful naming convention is getting more important and even critical. Let's discuss?

1 6
0 374

Hi folks!

We have a bunch of templates on OEX that provide a handy foundation for building a particular application with IRIS. And the basic principle of each and every template is that we take vanilla IRIS images, load code, and files into the image using Dockerfile, and create a new docker image as a solution. And then we develop running this image and rebuilding it when returning to development.

Some developers ask me why we need to build the docker image to work with the code. Indeed, if at the end of the day I need to develop a ZPM package and not a docker image why don't run the vanilla image and load the code and everything in it?

The problem I have with the building image approach is that often I can wait a lot to build an image and it fails on some Objectscript problem in the source that I cannot fix as the image is not building. and

Any thoughts? How do you develop with docker?

1 4
1 317

The use of Source Code Control systems in development is important. And there are a few systems known in the world, like GIT, SVN (Subversion), Perforce, Mercurial. Where the most popular nowadays is the git. Using it is very useful in many cases, but mostly it depends on the code as text, which can be compared between commits, branches, or versions of releases and so on.

1 0
0 281
Discussion
· Jun 29, 2023
The idea for iris-user-manager

I want to deploy IRIS apps running in containers in Kubernetes with user accounts configured.

I have a %ZSTART routine which looks for an XML file with Users export data and if the %ZSTART routine finds this file, it imports it. This Users export data can be obtained by running a class method.

I have defined a task which can be scheduled or run on demand. This tasks imports user data from an XM file.

In Kubernetes I can provide a ConfigMap to stage the Users data for the %ZSTART routine.

1 2
0 163
Discussion
· Sep 28, 2020
%Status usage in ObjectScript

Hi developers!

Want to discuss with you the case of %Status.

If you familiar with ObjectScript you know what is it. I'd love to hear the history of the case why it had appeared in ObjectScript but it turned out that almost every system/library classmethods return %Status and there is a whole set of tools to deal with it.

What is does it gives you the responsibility to check the value or %Status of every system method you call.

E.g. if you save the data of the persistent class, you should never call like this:

do obj.%Save()

you need to call:

set sc=obj.%Save()

if $$$ISERR(sc) do // something or quit.

1 19
0 940

Once again I would like to know, if there are any plans to make Java libraries available through normal channels like public mvnrepository, like the whole world it's doing, where anyone can find any JDBC driver to any database in the world but InterSystems.

Currently there is only some useless garbage. There are just very empty files. What was the point of posting it there?

1 9
0 151

Hi,

InterSystems IRIS has long supported the obvious translation functions required to for converting to upper or lowercase to enforce case-insensitive string comparison (e.g. in ObjectScript with $zconvert) and sorting (e.g. with SQL collation functions, not to be confused with NLS collation). Customers in international contexts have at times used custom workarounds to also treat accent insensitivity or even more advanced normalization duct tape. We’re looking to address such use cases at the system and SQL level to increase convenience for this international audience, which is well represented on the Developer Community.

1 5
0 245
Discussion
· Aug 21, 2023
AWS Batch

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.

0 1
0 130

Hi Developers!

Want to raise security discussion today!

Let's discuss how InterSystems security for applications works. In general, the concept is clear: we have Resources (what to protect), Roles which combine a set of privileges and accesses to Resources and Users which can have this or that Role.

But there is also a concept of Application which also could have a Role.

So you either provide a Role for a User or for an Application.

What do you use in production? What is your strategy and why? Pros, cons?

0 4
0 212

When overwriting the Read method (that has a %CacheString return type) on a new class that inherits %Stream.FileCharacter class, returns an error about incorrect return type, must be Binary, even if it matched the real signature.

Looking at the compile global information we can see:

^oddCOM("%Stream.FileBinary","m","Read",42)="%Library.Binary"

After further investigation we realise that there is a generator method looking at the OdbcType class definition.

Setting LONGVARCHAR results in:

^oddCOM("User.CStream","m","Read",42)="%Library.String"

0 0
0 156