Article Eduard Lebedyuk · Jan 12, 2021 1m read How to work with InterSystems IRIS from DataGrip DataGrip is a multi-engine database environment targeting the specific needs of professional SQL developers, DataGrip makes working with databases an enjoyable and productive experience. To work with InterSystems IRIS from DataGrip you'll need to add InterSystems JDBC driver first (once per DataGrip) and after that add all your InterSystems IRIS connections. Part 1: Add InterSystems IRIS JDBC Driver 1. Go To File → DataSources #JDBC #SQL #InterSystems IRIS 1 0 0 621
Article Eduard Lebedyuk · Dec 2, 2020 2m read Calculating detailed class/table size In the good old days (tm) determining the size of the data, streams, and indices for a class/table was easy - you just ran %GSIZE and check D, S, and I globals respectively. However, nowadays sharding, optimized global names, and indices in separate globals produce %GSIZE output looking like this: #Sharding #SQL #InterSystems IRIS Open Exchange app 12 6 5 1.1K
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 559
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 830
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.1K
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 587
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.6K
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 1 423
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 381
Article Eduard Lebedyuk · Feb 11, 2020 6m read Asymmetric RSA encryption with JS and InterSystems IRIS Asymmetric cryptography is a cryptographic system that uses pairs of keys: public keys which may be disseminated widely, and private keys which are known only to the owner. The generation of such keys depends on cryptographic algorithms based on mathematical problems to produce one-way functions. Effective security only requires keeping the private key private; the public key can be openly distributed without compromising security. In such a system, any person can encrypt a message using the receiver's public key, but that encrypted message can only be decrypted with the receiver's private key. Robust authentication is also possible. A sender can combine a message with a private key to create a short digital signature on the message. Anyone with the sender's corresponding public key can combine the same message and the supposed digital signature associated with it to verify whether the signature was valid, i.e. made by the owner of the corresponding private key. (C) Wikipedia. #Encryption #REST API #InterSystems IRIS Open Exchange app 0 2 0 599
Article Eduard Lebedyuk · Jan 16, 2020 2m read Python Gateway VI: Jupyter Notebook This series of articles would cover Python Gateway for InterSystems Data Platforms. Execute Python code and more from InterSystems IRIS. This project brings you the power of Python right into your InterSystems IRIS environment: Execute arbitrary Python code Seamlessly transfer data from InterSystems IRIS into Python Build intelligent Interoperability business processes with Python Interoperability Adapter Save, examine, modify and restore Python context from InterSystems IRIS Other articles The plan for the series so far (subject to change). Part I: Overview, Landscape, and Introduction Part II: Installation and Troubleshooting Part III: Basic functionality Part IV: Interoperability Adapter Part V: Execute function Part VI: Jupyter Notebook <-- you're here Part VII: Dynamic Gateway Part VIII: Proxy Gateway Part IX: Use cases and ML Toolkit Intro The Jupyter Notebook is an open-source web application that allows you to create and share documents that contain live code, equations, visualizations and narrative text. This extension allows you to browse and edit InterSystems IRIS BPL processes as jupyter notebooks. #Convergent Analytics #Machine Learning #Python #InterSystems IRIS Open Exchange app 4 0 0 574
Article Eduard Lebedyuk · Jan 13, 2020 1m read Difference between while and for While and for are pretty similar, but sometimes you need to do a not recommended thing - change cycle boundaries. In this situation while and for are different. For calculates boundaries once per run and while calculates boundaries on every iteration. Consider this code sample: set x = 5 for i=1:1:x { write "i: ", i,", x: ", x,! set x = x+1 } You'll get this output: #Beginner #InterSystems IRIS 2 7 0 393
Article Eduard Lebedyuk · Jan 6, 2020 1m read Python Gateway V: Execute function This series of articles would cover Python Gateway for InterSystems Data Platforms. Execute Python code and more from InterSystems IRIS. This project brings you the power of Python right into your InterSystems IRIS environment: #Python #InterSystems IRIS Open Exchange app 0 0 0 334
Article Eduard Lebedyuk · Dec 17, 2019 3m read Python Gateway IV: Interoperability Adapter This series of articles would cover Python Gateway for InterSystems Data Platforms. Execute Python code and more from InterSystems IRIS. This project brings you the power of Python right into your InterSystems IRIS environment: #Business Operation #Business Process (BPL) #Interoperability #InterSystems IRIS Open Exchange app 2 0 0 414
Article Eduard Lebedyuk · Dec 9, 2019 1m read ÍàØâàÞæØâë and you If you work with anything other than English, you would earlier or later encounter the characters from the title or just plain ??????????. Encodings are usually known, but sometimes you just get gibberish and need to make sense of it. In this cases $zcvt is your friend, the three argument form specifically. But there are a lot of options. So here's an utility script to check how the text would look like in different encodings: #Beginner #InterSystems IRIS 3 4 0 378
Article Eduard Lebedyuk · Dec 7, 2019 1m read About %objlasterror %objlasterror is a useful reference to the last error. Every time $$$ERROR is called, %objlasterror is set to a result of this call. It's important in cases where you want to convert exception to status: Try { // quality code } Catch ex { Set sc = $g(%objlasterror, $$$OK) Set sc = $$$ADDSC(sc, ex.AsStatus()) } Because AsStatus calls $$$ERROR under the wraps, the order is important, first you need to get %objlasterror and convert exception after that. #InterSystems IRIS 7 8 3 995
Article Eduard Lebedyuk · Dec 3, 2019 1m read Adding your own snippets to VS Code One of the most useful features in Studio is code snippets. Here's how to add snippets to VSCode. Here's a generalized instructions. 1. Go to File - Preferences - User Snippets and choose objectscript. 2. Add your snippet, here's an example: #Code Snippet #VSCode #InterSystems IRIS 6 1 5 589
Article Eduard Lebedyuk · Nov 22, 2019 1m read Serving HTTPS requests from InterSystems API Management This quick guide shows how to serve HTTPS requests with InterSystems API Management. Advantage here is that you have your certs on one separated server and you don't need to configure each backend web-server separately. Here's how: 1. Buy the domain name. 2. Adjust DNS records from your domain to the IAM IP address. 3. Generate HTTPS certificate and private key. I use Let's Encrypt - it's free. 4. Start IAM if you didn't already. 5. Send this request to IAM: #API #REST API #InterSystems IRIS 2 2 1 512
Article Eduard Lebedyuk · Nov 20, 2019 9m read Developing REST API with a spec-first approach In this article, I would like to talk about the spec-first approach to REST API development. While traditional code-first REST API development goes like this: Writing code REST-enabling it Documenting it (as a REST API) Spec-first follows the same steps but reverse. We start with a spec, also doubling as documentation, generate a boilerplate REST app from that and finally write some business logic. This is advantageous because: You always have relevant and useful documentation for external or frontend developers who want to use your REST API Specification created in OAS (Swagger) can be imported into a variety of tools allowing editing, client generation, API Management, Unit Testing and automation or simplification of many other tasks Improved API architecture. In code-first approach, API is developed method by method so a developer can easily lose track of the overall API architecture, however with the spec-first developer is forced to interact with an API from the position if API consumer which usually helps with designing cleaner API architecture Faster development - as all boilerplate code is automatically generated you won't have to write it, all that's left is developing business logic. Faster feedback loops - consumers can get a view of the API immediately and they can easier offer suggestions simply by modifying the spec Let's develop our API in a spec-first approach! #API #Best Practices #InterSystems API Manager (IAM) #REST API #InterSystems IRIS 12 6 9 3K
Article Eduard Lebedyuk · Oct 21, 2019 4m read Using InterSystems API Management to Load Balance an API InterSystems API Management (IAM) - a new feature of the InterSystems IRIS Data Platform, enables you to monitor, control and govern traffic to and from web-based APIs within your IT infrastructure. In case you missed it, here is the link to the announcement. And here's an article explaining how to start working with IAM. In this article, we would use InterSystems API Management to Load Balance an API. In our case, we have 2 InterSystems IRIS instances with /api/atelier REST API that we want to publish for our clients. There are many different reasons why we might want to do that, such as: Load balancing to spread the workload across servers Blue-green deployment: we have two servers, one "prod", other "dev" and we might want to switch between them Canary deployment: we might publish the new version only on one server and move 1% of clients there High availability configuration etc. #API #InterSystems API Manager (IAM) #REST API #SOAP #InterSystems IRIS 7 3 4 764