Article Eduard Lebedyuk · Nov 19, 2020 3m read Deploying a sharded cluster with Docker and MergeCPF In this article, we will run an InterSystems IRIS cluster using docker and Merge CPF files - a new feature allowing you to configure servers with ease. On UNIX® and Linux, you can modify the default iris.cpf using a declarative CPF merge file. A merge file is a partial CPF that sets the desired values for any number of parameters upon instance startup. The CPF merge operation works only once for each instance. Our cluster architecture is very simple, it would consist of one Node1 (master node) and two Data Nodes (check all available roles). Unfortunately, docker-compose cannot deploy to several servers (although it can deploy to remote hosts), so this is useful for local development of sharding-aware data models, tests, and such. For a productive InterSystems IRIS Cluster deployment, you should use either ICM or IKO. #Beginner #Best Practices #Docker #Sharding #InterSystems IRIS Open Exchange app 6 3 1 666
Question Eduard Lebedyuk · Aug 26, 2020 XML Serialization - output ID I have a class: Class test.Person Extends (%Persistent, %XML.Adaptor) { Property Name; } I want to serialize it into this XML: <Person> <Id>1</Id> <Name>Ed</Name> </Person> Is it possible? It's for the Visual Trace so I can't use %XML.Writer. #XML #InterSystems IRIS 0 2 0 322
Discussion Eduard Lebedyuk · Aug 13, 2020 Do you pass Ids or Objects in Interoperability Productions Messages between Business Hosts in Interoperability Production often contain object properties. Do you define and pass them as object properties or do you define and pass them as Integers with objects conversion where required? Why? #Business Operation #Business Process (BPL) #Business Service #Interoperability #InterSystems IRIS 0 1 0 194
Article Eduard Lebedyuk · Aug 12, 2020 3m read Calling production from a REST Broker Productions often need to receive REST requests. Here's how to do that. 1. Create proxy Service: /// Empty BS we would use to send Produciton requests Class production.ProxyService Extends Ens.BusinessService { } 2. Add it to production as RESTService (or any other name). #Business Operation #Business Process (BPL) #Business Service #Interoperability #REST API #InterSystems IRIS 5 8 1 1K
Article Eduard Lebedyuk · Aug 7, 2020 5m read Containerising .Net/Java Gateways (or Kafka Integration Demo) In this article, I will show how you can easily containerize .Net/Java Gateways. For our example, we will develop an Integration with Apache Kafka. And to interoperate with Java/.Net code we will use PEX . Architecture Our solution will run completely in docker and look like this: #.NET #Best Practices #Business Operation #Business Service #Docker #Interoperability #Java #InterSystems IRIS Open Exchange app 7 7 1 1.3K
Article Eduard Lebedyuk · Aug 3, 2020 3m read Creating classes/tables with more than 999 properties in InterSystems IRIS InterSystems IRIS currently limits classes to 999 properties. But what to do if you need to store more data per object? This article would answer this question (with the additional cameo of Community Python Gateway and how you can transfer wide datasets into Python). The answer is very simple actually - InterSystems IRIS currently limits classes to 999 properties, but not to 999 primitives. The property in InterSystems IRIS can be an object with 999 properties and so on - the limit can be easily disregarded. #Globals #Object Data Model #Python #Relational Tables #SQL #Tips & Tricks #InterSystems IRIS 5 13 1 745
Question Eduard Lebedyuk · Jul 9, 2020 Is there a way to defermine that column is a JSON_OBJECT I got a resultset, and some columns might be a JSON_OBJECT. Is there a way (based on metadata) to determine that the column was formed from JSON_OBJECT function? set rs = ##class(%SQL.Statement).%ExecDirect(,"SELECT 1 colA, JSON_OBJECT('id':1) col2") do rs.%Display() I do not want to try parsing json. #SQL #InterSystems IRIS 0 5 0 252
Question Eduard Lebedyuk · Jul 6, 2020 How to generate runtimeconfig.json\deps.json for dependency with dotnet publish? I'm building a .Net Core Gateway container. Here's the issue. As a final step I'm building a .Net Core 2.1 library. It has a runnable dependency - .Net Gateway, which I need to start first. However dotnet publish generates .runtimeconfig.json and .deps.json only for my library and not for my dependency (.Net Gateway). Is there a way to force dotnet to generate .runtimeconfig.json and .deps.json for a dependency? I have tried: #.NET #Interoperability #InterSystems IRIS 0 2 0 8.5K
Question Eduard Lebedyuk · Jun 30, 2020 Running .Net/Java Gateways in Docker Does anyone have a Dockerfile for .Net/Java Gateways to share? I'm trying out PEX and I think being able to run it as a docker container would be great. To clarify I'm interested in container without IRIS, gateway only. #.NET #Containerization #Java #InterSystems IRIS 0 1 0 530
Article Eduard Lebedyuk · Jun 19, 2020 2m read Generate Swagger spec from persistent and serial classes Recently I needed to generate a Swagger spec from persistent and serial classes, so I'm publishing my code (it's not complete - you still need to hash out the application specifics, but it's a start). It's available here. Let's say you have these classes: #API #Best Practices #Code Snippet #REST API #InterSystems IRIS 9 14 2 1.8K
Article Eduard Lebedyuk · Jun 18, 2020 1m read Debugging Business Operations Often we need to debug a Business Operation. Tracing and logging work but sometimes you want to work with a BO as with your local terminal session. Here's how you can do that on any operating system. Windows has a great tool for debugging Business Operations - Foreground mode. In that mode Windows launches a local terminal with operation job. #Business Operation #Debugging #Interoperability #InterSystems IRIS 2 0 2 536
Article Eduard Lebedyuk · Apr 22, 2020 1m read Get VSCode to look like Studio One of the things I want from VSCode is to have a familiar Studio look. Thankfully VSCode is easily customizable so you can choose any color for any element. Here's what I got so far: To get the same look add to your settings.json: #VSCode #InterSystems IRIS Open Exchange app 6 0 1 420
Announcement Eduard Lebedyuk · Apr 10, 2020 JuliaGateway 0.5 released I'm happy to announce the release of the interface to Julia programming language for InterSystems IRIS. Execute Julia code and more from InterSystems IRIS. This project brings you the power of Julia right into your InterSystems IRIS environment: #Artificial Intelligence (AI) #Analytics #Machine Learning (ML) #InterSystems IRIS Open Exchange app 1 0 0 269
Question Eduard Lebedyuk · Apr 1, 2020 Use table-object as a part of SQL Query During runtime I build an object which is essentially a wrapper over in-memory table: col1 ... colN val11 ... valN1 val12 ... valN2 I want to use this object as a part of INSERT or UPDATE queries, based on a value of some column (the main use case one of the columns is an ID value) What's the best way to expose the object to SQL? #SQL #InterSystems IRIS 1 13 0 675
Discussion Eduard Lebedyuk · Mar 24, 2020 USER namespace in Docker For standalone installations I always recommended to use custom namespaces and not the USER namespace. However, what about Docker? In many Dockerfiles I see the creation of additional namespace, but why, if only one namespace is required? What do you think? #Containerization #Docker #InterSystems IRIS 0 2 0 289
Question Eduard Lebedyuk · Mar 22, 2020 Adjusting LD_LIBRARY_PATH in containers I'm building a container from store/intersystems/iris-community:2019.4.0.383.0 . I need to add my folder to the LD_LIBRARY_PATH so that my custom shared library would load at runtime. How can I do that? Here's what I tried: #Containerization #Docker #InterSystems IRIS 0 2 0 3.3K
Question Eduard Lebedyuk · Mar 17, 2020 Building $lb from C I have a C string and I need to build a $lb from it. This code works fine for strings shorter than 254 characters: char *str = "some string"; int len = strlen(str); int add = 2; char *list = malloc(len + add + 1); char lenChar = len + add; sprintf(list, "%c\x01%s", lenChar, str); Thought maybe someone can share the code for longer strings? #Callout #InterSystems IRIS 0 1 1 319
Question Eduard Lebedyuk · Mar 6, 2020 Force terminal to the foreground after current command finishes running Simple problem: I leave a long-running command in terminal Switch to another task(s) Remember that I need to check on my command after a few hours Is there any way to force terminal to the foreground after current command ends? This is Windows with cterm/iristerm although Putty/Kitty solution would also be nice. #Microsoft Windows #Red Hat Enterprise Linux (RHEL) #Terminal #InterSystems IRIS 1 6 0 618
Discussion Eduard Lebedyuk · Mar 6, 2020 Temporary Tables in InterSystems IRIS Temporary tables are tables available for a current process only (and destroyed when process ends). What are you approaches to creating temporary tables? #SQL #InterSystems IRIS 1 5 0 1.1K
Question Eduard Lebedyuk · Mar 4, 2020 Request Timeout in Business Processes I want to send requests from custom BP with timeout and be able to understand that timeout event happened. I thought that I need to implement OnTimeout method in my process (in either caller or callee), however it seems like OnTimeout is never called. Let's say we have this parent process: #Business Process (BPL) #Interoperability #Ensemble #InterSystems IRIS 0 2 0 750