Question Dmitrii Baranov · Oct 12

I need to build an integration solution that reads messages from a Kafka topic. The topic has 3 partitions and contains several million messages.

For certain reasons, I can only use the standard EnsLib.Kafka.Service class and cannot use either KafkaClient or Python.

To measure performance and collect statistics I created a simple key + timestamp table with no indexes (so it is unlikely to be a bottleneck). Next, I started an instance of EnsLib.Kafka.Service. In the OnProcessInput method, I receive a message, extract the key from it, get the current time, and write the row to the table.

0
0 0
Question Dmitrii Baranov · Aug 8

I have a table with 5M rows, the table contains lab observation codes and display names, both columns have type varchar(2000) and both are indexed.

The query looks like:

select code_1_text, count(code_1_text)
  from demo.observation_lab
  group by code_1_text
  order by 2 desc

The table contains ~1000 distinct display names.

It takes 4 minutes for the query to complete on a VM with some pretty old Xeon, 4 cores, 32G RAM, NVME SSD and Linux on board.

Isn't it too slow? During the execution I see no active hardware resources consumption - CPU load is 12-25%, RAM is almost free, swap file is not used.

0
0 0
Question Dmitrii Baranov · Mar 31

I'd like to ask you for recommendations on how to properly use repository dependencies when using VSCode and Client-side editing. Suppose I have projects A, B and C, with A being independent, B depending on A, and C depending on A and B. I am currently working with the main project C, and I want to be able to contribute to all the other projects in a single VSCode window (instead of opening three instances). How do you solve this problem? Git submodules? ZPM? Something else?

0
0 0
Question Dmitrii Baranov · Mar 18

I have two instances of IRIS, one is Production and another one is Staging (both managed by Docker) and I want to set up a full daily recover of the Staging server from a full backup of the Production server. I know how to do this manually using the DBREST utility, as well as how to make a copy of the database by making a full copy of the durable directory (however this option requires a full stop of the Production-database). What is the best way to automatically restore all databases from a full backup using scripting?

0
0 0
Question Dmitrii Baranov · Dec 17, 2024

I have a business service which is responsible for some batch operations with an SQL table. The process is generally slow but it is possible to scale the performance using multithreading and/or parallel processing and logical partitioning (postgres):


select id, col1, col2, mod(row_number() over (), 4) as partition from some_table;

Thus, a partition index will be assigned to each table row. The idea is to create several instances of my business service using pooling (e.g. Pool Size = 4) so each business service instance will be responsible to hande rows belonging to a certain partition, e.g.:

0
0 0
Question Dmitrii Baranov · Dec 12, 2024

My IRIS instance is connected to a Postgres database using SQL Gateway and linked tables. One of these tables is projected to the Patient class. I want to select a record from this table by ID and convert it to a FHIR resource using the %ExistsId and %OpenId methods. I noticed that if I call these two methods from the console, the record is always found. But, if I do the same from the FHIR Facade layer, the %OpenId method returns NULL. The error is intermittent - yesterday FHIR Facade didn't work at first, then it worked, this morning when I try to select a patient record from the FHIR facade

0
0 0
Question Dmitrii Baranov · Dec 10, 2024

I am developing locally on my IRIS instance using VSCode and client-side editing approach. How can I automatically export a single .cls file/a whole package to a remote TEST/PREPROD server using a script or command line and recompile the unit remotely? Are there any more simple and straightforward ways than CI/CD explained in the series of articles by Eduard?

0
0 0
Question Dmitrii Baranov · Dec 1, 2024

I'm trying to call a SOAP web service which is implemented in .NET Classic and requires NTLM authentication. The client class was generated by %SOAP.WSDL.Reader. The problem is that neither NTLM authentication works nor can I handle the exception since VSCode debugger says that all meaningful fields and properties are empty (the same request works fine in Postman):

0
0 0
Question Dmitrii Baranov · Nov 27, 2024

I want to integrate IRIS with Keycloak OAuth2 provider to use delegated authentication everywhere and to secure everything - sys*/Portal applications, REST services, FHIR server and so on. If an unathenticated user tries to access any IRIS URL - he or she should be redirected to Keycloak. After the user has successfully authenticated, i would like to access his requistes (username, email, roles, scopes) extracted from the JWT token, programmatically. What should be done to achieve that? I found this repo but it seems a bit tricky to implement a custom ZAUTHENTICATE function which has an access

0
0 0
Question Dmitrii Baranov · Nov 17, 2024

I'm playing with some anayltic queries against FHIR server tables. The HSFHIR_X0002_S_Patient.addressCity table contains a lot of cities which names contain german charachers such as ä, ö and ü.

The following query works fine:

select value from HSFHIR_X0002_S_Patient.addressCity

But this one converts city names to uppercase, and characters with umlauts are lost, so instead of "Köln" or "München" I see KOLN and MUNCHEN:

select ac.value, count(ac.value) as cnt
  from HSFHIR_X0002_S_Patient.addressCity ac
  group by ac.value
  order by 2 desc

I'm using DBeaver with IRIS official JDBC driver.

0
0 0
Question Dmitrii Baranov · Nov 12, 2024

To transfer data between production components I actively use messages of type Ens.StreamContainer class and its descendants. In many cases the content of the message content is not visualised (the 'Body' tab contains a table with a list of selected message properties but the 'Contents' tab is empty). Response messages are never visualised, and request messages are visualised with a fifty-fifty probability. What do I need to do to ensure that messages are always visualised?

0
0 0
Question Dmitrii Baranov · Nov 2, 2024

I'm experimenting with FHIR bulk data load using NDJSONs, so far the import is running smoothly, but when I'm trying to perform a request of kind /Patient or /Procedure I'm getting back the following error:

{
    "resourceType": "OperationOutcome",
    "issue": [
        {
            "severity": "error",
            "code": "too-costly",
            "diagnostics": "<HSFHIRErr>SearchTooCostly",
            "details": {
                "text": "Search selects more than maximum allowed number of results (1000)."
            }
        }
    ]
}
0
0 0
Question Dmitrii Baranov · Feb 26, 2024

IRIS is known to have a built-in Python bridge and even allows you to write Python server code but what about JavaScript? Let's say I need a JavaScript expression interpreter. What would you recommend as the most effective way to get one? It is highly desirable that the solution does not require administrator privileges and uses in-process communication (I mean not http and not unix-specific interprocess-communication via command line)

0
0 194
Question Dmitrii Baranov · Oct 21, 2023

Hi, How can I get an instance of stream which is a successor of %Stream.Object in a method that handles a REST POST request?

#dim request as %CSP.Request = %request
 set content = request.Content

This returns a variable of type %CSP.Stream which is totally useless, because %CSP.Stream does not inherit from %Stream.Object

2
0 269
Question Dmitrii Baranov · Jul 31, 2023

These two articles describe how to extend business components with additional properties:

1. https://community.intersystems.com/post/how-customize-ensemble-settings

2. https://community.intersystems.com/post/creating-custom-captions-intero…

I have one more question about drop-down editor. Is it possible to pass to its URL the value of another business component property, not just @productionId? Something like: 

1
0 182
Question Dmitrii Baranov · Jul 19, 2023

Hello,

I want to add a couple of properties to a custom Transform class to give the user the ability to edit its properties directly in the Business Process visual editor. It can be easily done with other Production components, but I can't find in the documentation how to do the same with my Transform. Is it possible?

And another question is about how to use the 'aux' parameter of the DataTransform.Transform method if my component is non-visual?

4
0 242
Question Dmitrii Baranov · May 19, 2023

Example:

Method Execute (args...) As %Status {
...
 #dim statement as %SQL.Statement
 set statement = ##class(%SQL.Statement).%New(2)
 set statement.%Dialect = "CACHE"
 do statement.prepare(query)
    
 #dim rs as %SQL.StatementResult
 set rs = statement.execute(args...)

My questions are: 1) how do I get the size of **args **2) how to get all values of **args **3) is it possible to modify the args?

6
0 376
Question Dmitrii Baranov · May 15, 2023

I have a production with a HLv2 HTTP Listener. For demo purposes, I need to send HL7 messages directly from a browser. Here is an example (React/typescript):

const message = "MSH...";
const args: RequestInit = {
      method: "POST",
      mode: "no-cors",
      body: message
 }

const response = await fetch(IRIS_SERVER_HL7_HTTP, args);
// await checkResponseAsync(response);
return await response.text();
1
0 342
Question Dmitrii Baranov · Mar 21, 2023

Hi, could someone tell me please how can I "unlock" a .cls file which author is Intersystems? I want to make some modifications and add some trace messages there. The file resides in the HS.FHIRServer namespace and it looks like read-only

6
0 396