Search

Clear filter
Announcement
Raj Singh · May 10, 2023

InterSystems Studio is deprecated, starting with 2023.2

InterSystems is committed to providing a high quality developer experience including a great IDE (Integrated Developer Experience). For the past several years we have been evolving Visual Studio Code's ObjectScript tooling in parallel with our long-standing IDE, InterSystems Studio. There have been over 46,000 downloads of the VSCode-ObjectScript plugin, and the feedback from developers is that this is a great developer experience, and now superior to InterSystems Studio. With our 2023.2 release we are deprecating InterSystems Studio (deprecated designates a feature or technology that InterSystems no longer actively develops, and for which better options exist). We will continue to maintain, release, and support InterSystems Studio for quite some time, and we appreciate that it is still an important tool for some customers. However, customers should be advised that we are not investing in it. Our focus is on VSCode. I've appreciated all the customer input as we've grown our ecosystem of VS Code extensions, keeping them open source while offering full support, and maintaining regular and rapid release cycles.As we continue this journey, I look forward to continuing to hear your feedback, ideas, and code. Feel free to comment below or direct message me. As always, your voice plays a major role in this important process. For development VS Code is great. Indent is a lot better and also the syntax checking. One small functionality I'm missing is to open classes fast with a shortcut. We're using HealthConnect and at an item the Class Name is shown in the management portal: I can copy the class name, go to studio press Ctrl-O and paste the class name: In VS code I can open also with Ctrl-O but then I need to fill in /HS/FHIRServer/Interop.HTTPOperation.cls Could be a small improvement? I still can't see my csp files or .bas routines in VS Code. What do I have wrong? @David.Hockenbroch We just improved the UI for creating a new server-side editing workspace folder. If you have no workspace open, you can follow the steps here to create a new one. If you do, you can add a new folder to you workspace by right-clicking in the file explorer and selecting "Add Server Namespace to Workspace..". That command will follow steps 4 and on. To see CSP files, select "Web Application Files" in the menu from step 8. To see basic files, select "code files in <NS>", then select "Filter", then make sure your custom filter contains the "*.bas" pattern. It can include other file types as well. @Menno.Voerman Unfortunately I don't think this is possible. That command is for opening files, and technically the name of the file is "HS/FHIRServer/Interop.HTTPOperation.cls", not "HS.FHIRServer.Interop.HTTPOperation.cls". VS Code is great for development, while InterSystems extensions behavior is disappointing sometimes. E.g., since some update was installed, <Ctrl/Mouse pointer> stopped referencing the methods of another class. <Right button menu -> Goto Definition> stopped working as well. Is it a bug or a feature? @Alexey.Maslov That sounds like a bug to me. Can you file a GitHub issue with steps to reproduce? It would also help to know the versions of the extensions you have installed, the version of IRIS you're connected to, and the text of the file that you see the bug in. Done, expecting that InterSystems ObjectScript was the right choice for the kind of issue. The export capabilities in VSCode are very poor compared to Studio. There should be a possibility to export multiple classes/routines in xml format. VSCode also lacks the different Wizards (SOAP/XML) and the guided way (File/New...) to create classes, processes, DTLs, BPLs and so on. You can't edit BPLs and DTLs with VSCode. Why would you need XML? Hi @Mikko.Taittonen! Why would you need XML export for classes/routines? Why not UDL? UDL is much more readable? @Mikko.Taittonen The vscode-objectscript extension does provide New File commands for Interoperability classes. You can read the documentation here. The SOAP wizard can be accessed from the Server Actions menu. BPL and DTL classes can be edited textually. Support for the graphical editors will be added when they are rewritten using Angular. For a preview of how that would work, you can try out the new Angular Rule Editor in VS Code. For what it is worth: I don't agree.Studio is a Objectscript dedicated IDE (Editor), rather clean and unobtrusive.It could be enhanced quite simple.The only problem is Windows only (which is still 57.37% of all desktops) Fully support this!It's a sense less attack to the traditional installed base ! With our 2023.2 release we are deprecating InterSystems Studio (deprecateddesignates a feature or technology that InterSystems no longer actively develops, and for which better options exist). We will continue to maintain, release, and support InterSystems Studio for quite some time, and we appreciate that it is still an important tool for some customers. However, customers should be advised that we are not investing in it. Our focus is on VSCode. In what sense is this an "attack"? C'mon! we heard this to often: WebLink, Caché, ...- We will continue to maintain, release, and support ....- and every IRIS Version needs a new Studio version Hi: This is possible . How to quickly open class in VS Code | InterSystems Developer Community |. The answer to this is here: if you are using the server-side editing paradigm, which matches what you're used to with Studio, make sure you follow the instructions in the "Enable Proposed APIs" section of the extension's README (also available here). you can then use Crtl+P to find the item you need. my setup instructions The additional features (and the APIs used) are: Server-side searching across files being accessed using isfs (TextSearchProvider) Quick Open of isfs files (FileSearchProvider). Download and install a beta version from GitHub. This is necessary because Marketplace does not allow publication of extensions that use proposed APIs. Go to https://github.com/intersystems-community/vscode-objectscript/releases Locate the beta immediately above the release you installed from Marketplace. For instance, if you installed 2.4.3, look for 2.4.4-beta.1. This will be functionally identical to the Marketplace version apart from being able to use proposed APIs. Download the VSIX file (for example vscode-objectscript-2.4.4-beta.1.vsix) and install it. One way to install a VSIX is to drag it from your download folder and drop it onto the list of extensions in the Extensions view of VS Code. From Command Palette choose Preferences: Configure Runtime Arguments. In the argv.json file that opens, add this line (required for both Stable and Insiders versions of VS Code): "enable-proposed-api": ["intersystems-community.vscode-objectscript"] Exit VS Code and relaunch it. Verify that the ObjectScript channel of the Output panel reports this: intersystems-community.vscode-objectscript version X.Y.Z-beta.1 activating with proposed APIs available. After a subsequent update of the extension from Marketplace you will only have to download and install the new vscode-objectscript-X.Y.Z-beta.1 VSIX. None of the other steps above are needed again. To see CSP files with server side editing if you hold shift before clicking the pencil icon it will load up a web files view Is there a recent and detailed article comparing VSCode plugin and the latest Studio? Something like this is what Studio still does better and this is what plugin does better. Hi @jaroslav.rapp. Attack may be a strong word, but I understand the feeling when beloved tools get less attention than others. We'd love to never leave a technology behind, but the reality is that with limited resources we sometimes have to devote more effort to technologies that will have bigger benefits for our users going forward. It's not always an easy decision, but I believe the short-term pain is well worth the long-term benefits. Hi @Anna.Golitsyna. This recent discussion, First Community Roundtable: VSCode vs Studio, may be useful. I've never used VS Code, and I don't know anything about it. I am wondering whether there are equivalents for a couple things we often do in InterSystems Studio: Export (to XML) and import classes. Find in Files. Also, is there an equivalent to the Namespace Workspace that is available in Studio? That's the arrangement we use the most. Yeah,moving code between Studio instances to other namespaces on same or different serversimply by drag & drop Yes, you can do this in VS Code. Even better, when using the server-side editing paradigm a single VS Code instance can connect simultaneously to multiple namespaces on one or more servers, and you can drag/drop and copy/paste between them. We use the TrackWare SCCS, for both our Cache/IRIS and Delphi application development. TrackWare has the unique distinction of being written in both Delphi and Cache. It integrates well with Studio SCCS. We now own the TrackWare package and I have had to make updates to the Cache/IRIS side to keep it current. (It was formerly owned by Jorma Sinnoma (sp?) who is now a member of the InterSystems team.) It works for us and we would want to stay with it for as long as Studio functionality and SCCS integration stays intact. A real bugaboo for us, besides the ease with which we can check out and check in our Cache/IRIS code elements, is that we would have to come up with another product to maintain source control on the Delphi side. So, please do not stray from what Studio offers us now both as an IDE and its SCCS integration. Thank you Rich Filoramo InTempo Software I feel that I have not explained clearly enough the Studio features that we use. We often export classes to XML files. Similarly, we import XML files, compiling them as classes during import. I didn't mean to imply that this was done simply to transfer classes to other namespaces or servers. Rather, it's a way to archive classes as XML files. (We don't use a source control system.) We use the Find in Files utility to determine the classes and other files in which a given string exists. I mentioned the Namespace variation of the Studio Workspace pane because that is the arrangement of files (classes, lookup tables, message schemas, etc.) that we most often use. @Richard.Filoramo The server-side editing paradigm in VS Code is conceptually similar to Studio in that the files you edit are "virtual" and do not need to be exported to the file system. This mode supports Studio source control classes, so you can continue using them if you want. We have a documentation page that describes some useful features for migrating from Studio that describes where the Studio source control integration can be found in the VS Code UI. @Anna.Golitsyna We have a documentation page that describes some useful features for migrating from Studio that you may find useful. @Larry.Overkamp VS Code does not support exporting or importing source code as XML files. There are existing tools in the terminal and SMP for that. The server-side editing paradigm that John mentioned above is conceptually similar to Studio in that the files you edit are "virtual" and do not need to be exported to the file system to be edited. It supports viewing all files in a namespace like in Studio, and it also supports importing local .cls, .mac, .int and .inc files into that namespace. Searching for text across those virtual files is supported and the UI is much better than Studio since you can click on the match and jump right to that location in the file. Enabling that feature requires some extra steps due to a VS Code core limitation, but this is something that we anticipate will be resolved in the future. @Larry.Overkamp my reply was focused on what @jaroslav.rapp had posted. You also wrote: (We don't use a source control system.) Have you considered changing this situation? If so please take a look at Deltanji from George James Software (my employer). Some videos are available at https://www.youtube.com/playlist?list=PLGnA3ZIngG4oOUCEmplIYgSknQpNOtF08 Thanks, @Brett.Saviano . I'd like to assess what are plusses and minuses of migrating first. I'll watch it, thanks, Raj. I have to say though that I really prefer searchable text that can be visually scanned diagonally in 5 minutes as opposed to watching a 45-minute video. Oh well... What is the benefit of exporting to XML vs exporting to CLS? A thought about moving from *.xml source controlled files to *.CLS (UDL) file content with VSCode. The exported source content is different from existing in source control The export name is different and may be seen as an unrelated resource A while back I had shared community application ompare I mention as this utility allows the comparison of what is installed in a namespace, regardless if the external format was XML or UDL. Some may find useful to see the real differences between their own historic product releases and a current release. At least until have a few releases / baseline in their new source repository. Have notice other community apps like xml-to-udl that might be appropriate for need. I'll add to this, we use the same "embedded" source control behavior across Studio and VSCode for my team within InterSystems, and haven't had issues. @Richard.Filoramo , one question re: TrackWare - do you know offhand which "Actions" and "Other Studio actions" it uses in the UserAction method from %Studio.Extension.Base (see class reference)? There are some limitations/differences between VSCode and Studio but they're on things we see as either less common or undesirable to support from VSCode. One such case we've previously deemed "undesirable" is Action = 3, "Run an EXE on the client. The Target is the name of an executable file on the client machine. It is the responsibility of the customer to ensure this EXE is installed in a suitable location." Your statement that your source control system is written in ObjectScript and Delphi makes me think this might matter to you. More generally, @Brett.Saviano , there may be other aspects of complete support for the interface defined in %Studio.Extension.Base to consider. @Alexander.Woodhead Just to clarify for everyone, Studio source control classes that import/export XML files will continue to work and be supported. There just won't be a menu option in VS Code to export files as XML. @Anna.Golitsyna The big plus is that VS Code is in active development, while Studio hasn't seen enhancements in years and now is deprecated. Other than that, here are some benefits of VS Code: Supports Mac, Linux and Alpine Linux in addition to Windows. Much faster release cycles so you get new features and fixes faster. Always forward compatible without needing to install a new version. Much better intellisense support. (a large list of features can be found here) Modern UI with fully customizable themes. Can be connected to multiple server-namespaces in the same window. Debugging supports expanding OREF's to see their properties. Thanks Brett! I will add the support of: Docker Git source control Github/Gitlub interactive plugins Embedded Python Co-pilot (when VScode writes ObjectScript for you instead of you) Full-functional IRIS Terminal And options to use 3rd-party plugins, e.g. from George James, @John.Murray mentioned earlier. Find in Files works with the Enable proposed APIs and valid version working. Was not aware of drag/drop for export/import. I find even though a lot of the discussions around source control are great and easier using vs code I still don't feel there is an easy jumping in point to really get started to use a control system. With the discussion of Intersystem IRIS Studio or VS Code, I understand the initial reaction to think you are losing something using VS Code. Will you miss some things, I'm sure you will, but measured on the whole I feel like VS Code is a much better environment even if all you ever do is objectscript work. I feel like that's the critical thing to remember, there may be some differences but measured on the whole it is better, give it a try and give it a chance, especially learning the full capabilities. I agree. Adopting source control is like committing to a workout regimen. It's hard to get started and feels like a big hassle, but eventually you can't imagine living any other way, and you love the way your body of code looks ;) @Brett.Saviano @Evgeny.Shvarov You listed VSCode plusses, thanks. How about what Studio does that VSCode plus free plugins still do not? One of our programmers complained about debugging as of July 2022. Is it on par now? @Anna.Golitsyna I think the debugging experience in VS Code is actually better than Studio since you can view the properties of OREF's in the variables view in VS Code but not Studio. You can have that developer file an issue report on GitHub, or contact the WRC if you have a support contract. As for features in Studio but not VS Code, the biggest one is the Inspector. It is very unlikely that it will ever be implemented in VS Code. VS Code also does not support integration with the legacy Zen BPL and DTL editors. VS Code will support integration with the new Angular versions of those editors when they are implemented. VS Code also doesn't support syntax coloring for Cache Basic or MultiValue Basic, but you can still edit those files. Will you miss some things?Now working 20 years with Studio I'm kind of "married" knowing all good and bad features.I dislike the idea to face a "forced divorce". Dictated from outside. It smells like very bad times in past. The opposite of freedom of decision. some context about me.. I've been working with InterSystems technologies since 1991 so I've been thru all of the changes for the past 32 years. Unless you give it a chance you won't have an opportunity to see what are the good features in VS code. There is no doubt that working with VSCode is more productive than working with ISC Studio. I've been working with ISC Cache since 1997 and thank God ISC finally has a normal development IDE. But there are small things that need to be fine-tuned:1. When overriding, be able to include the original implementation as well2. The terminal cannot process Home End keys, etc., and it throws lines.3. Close automatically opened routines/classes when debugging is finished4. In the debug console, the zwrite option5. Option to switch from read only file to edit file on GIT disk6. Debugging INT source codes does not work well7. jump to label+offset and a lot of little things will certainly appear. Maybe the problem is that I'm still working on Ensemble 2018 Josef Hi @Josef.Zvonicek, I'm glad that VS Code is making you more productive, and thanks for the feedback. I have some comments about your fine-tuning list: The "override class members" functionality is implemented by the Language Server extension. If you file an issue on its GitHub repository I would be happy to consider this enhancement request. The VS Code integrated terminal is part of the core product, and not our extensions, so I'm not sure we can do anything about this. Can you provide more details about how you started the terminal and the expected vs actual behavior? Newer versions of the vscode-objectscript extension should avoid opening that extra copy of the file when debugging. If you're using recent version like 2.8.0 or 2.8.1 and this isn't working, please file a GitHub issue in that extension's repository and I will take a look at it. The debug console can only evaluate expressions. It's not a full terminal and cannot execute commands, so this isn't possible unfortunately. I'm not sure what a GIT disk is. Are you editing files on your local file system? Can you describe what doesn't work well, and what we could do to make things better? There is a command called "Open Error Location..." that you can execute from the command palette. It prompts you to enter a "label+offset^routine" string and then opens that location. It only works for INT routines though. and just today spotted https://blog.postman.com/introducing-the-postman-vs-code-extension/ . This isn't full formed as they report We will continuously ship features and improvements—such as support for Postman Collections and environments—so be on the lookout. We value your input, so if you have any feedback on this beta version, please feel free to leave it in the comments. but just one more example why measured on the whole VS Code really is a better environment IMHO. For me it's a horrible news 😭 I really prefer to use Studio when explaining how to create properties (particularly relationships) and queries (particularly Class Queries based on COS) to students who see IRIS for the first and the last time during my classes. And when something goes wrong (and it does a lot of the time) it's usually easier to ask them to delete the code that produces error and rewrite it while I'm looking than to figure out what's wrong with it. And if it something more complicated than simple properties it can take a lot of time. Besides, not all students know (and want/need to learn) how to use VS Code and look for proper plug-ins, extensions etc. It will really make my life that much harder. one of my (former) customers suggested this approach: Train COS not on IRIS but on some Caché/ENS 2018 instances with Studio or on some older IRIS version As they run pure COS they have Studio for Training. An no need of new features once all the logic works they may move the result to some final IRIS (if ever they migrated) With #2 (at least for me anyway), the issue seems to be related to running iris session when using the Windows version of ssh.exe (called from VS Code, configured in settings under node terminal.integrated.profiles.windows). Home and End work normally at the Linux shell prompt, but when running iris session the effect is that either key produces the same result as pressing the Enter key. The current command is executed and a new IRIS prompt is generated. It doesn't seem to be a VS Code problem so much as an ISC problem, at least on Windows. Please, give VSCode a try. Regarding of extensions, you can give students a repository with .vscode/extensions.json, that will already contain examples. E.g. here is how my extensions.json looks like: { "recommendations": [ "eamodio.gitlens", "georgejames.gjlocate", "github.copilot", "intersystems-community.servermanager", "intersystems-community.sqltools-intersystems-driver", "intersystems-community.vscode-objectscript", "intersystems.language-server", "mohsen1.prettify-json", "ms-azuretools.vscode-docker", "ms-python.python", "ms-python.vscode-pylance", "ms-vscode-remote.remote-containers" ] } This will not install extensions automatically, but they will be shown as recommended for the workspace, like that: Here is the template they can start from and here is an example extensions.json file. @Irene.Mikhaylova please also look at VS Code's recently-introduced Profiles feature. I imagine this could be useful in learning contexts. Maybe my VS Code setup isn't correct, but if I need to explore % class files to learn more about behavior of some methods (let's face it, the documentation isn't always revealing), I use Studio. A recent example was learning what methods of %CSP.Page I could override and which order the override-ed methods were called in the code. I know in the past I've referenced other things. It's not often but it's helpful when we can. I haven't found a way to view % classes in VS Code. Maybe someone can help me if that's something I've missed! Hi @Michael.Davidovich, I can show you how to configure VS Code to see system classes. Are you using client-side or server-side editing? @Michael.Davidovich you might find this extension useful for exploring inherited methods etc: https://marketplace.visualstudio.com/items?itemName=georgejames.objectscript-class-view One quick/dirty(?) way is to do a "View Code in Namespace" for "%SYS". Under the %SYS namespace the percent classes are not filtered out. In the interest of accuracy, Studio does allow looking at OREFS to see their properties (View As > Object, or Dump object). I've also used Studio for 20+ years. I can still remember how much better it was than what we had before. We can all still use Studio if we want; it's not a forced divorce. But we hope that VS Code -- ObjectScript's features will make you comfortable enough to decide to do a conscious uncoupling. And as Frank Sinatra sang: "Love's much lovelier, the second time around." And he could have sung that at the Diplomat Hotel in Fort Lauderdale in 1974, where coincidentally InterSystems is hosting our Global Summit this year! We sometimes export classes from one environment and import them to another. I don't see .cls as a supported file type for those activities. Hi @Larry.Overkamp ! You can use $system.OBJ.ExportUDL() to export in CLS or MAC or INC. and $System.OBJ.Load or $system.OBJ.LoadDir() to import CLS or XML or MAC. As for transferring code between systems I'd recommend to maintain code in repositories (e.g. git) and deploy code via InterSystems Package Manager. The format doesn't matter as long as you can easily package multiple classes/routines in a single file. By easily I that mean that you should be able to choose the exported classes/routines eg. from a class tree. If I can guess you need export several classes/routines/macro in one file e.g. to deploy to another server. I'd recommend to use InterSystems Package Manager for it @Brett.Saviano Sorry I didn't see this until just now. We are editing on client-side. Is there documentation for this? I searched "package manager" in the documentation and didn't get anything in the results.... Package Manager is going to be a part of a product in near future, but right now it is not a part and can be installed with the following command: s r=##class(%Net.HttpRequest).%New(),r.Server="pm.community.intersystems.com",r.SSLConfiguration="ISC.FeatureTracker.SSL.Config" d r.Get("/packages/zpm/latest/installer"),$system.OBJ.LoadStream(r.HttpResponse.Data,"c") Caution! This is for IRIS only. The package manager. It has documentation, a bunch of videos, and there is a tag here. If for Interoperability productions it may also be appropriate to weigh up existing capabilities available for Production deployment. See: https://docs.intersystems.com/irisforhealth20232/csp/docbook/DocBook.UI.Page.cls?KEY=EGDV_deploying It provides functionality for detecting implementation used by a production. Have created idea for Production exports to generate IPM modules as well as the usual XML export deployment. https://ideas.intersystems.com/ideas/DPI-I-382 Readers of this thread may be interested in this discussion I just started about the export/import topic: https://community.intersystems.com/post/studio-vs-code-migration-addressing-exportimport-pain-point
Article
Michael Braam · Aug 17, 2022

Leveraging the external messaging API in InterSystems IRIS

Being interoperable is more and more important nowadays. InterSystems IRIS 2022.1 comes with a new messaging API to communicate with event streaming platforms like Kafka, AWS SQS/SNS, JMS and RabbitMQ.This article shows how you can connect to Kafka and AWS SQS easily.We start with a brief discussion of the basic concepts and terms of event streaming platforms. Event streaming platforms purpose and common terms Event streaming platforms like Kafka or AWS SQS are capable to consume a unbound stream of events in a very high frequency and can react to events. Consumers read the data from streams for further processing. They are often used in IoT environments. Common terms in this arena are: Topic/Queue, the place where data is stored Producer, creates and sends data (events, messages) to a topic or queue Consumer, reads events/messages from one or more topics or queues Publish/Subscribe, producers send data to a queue/topic (publish), consumers subscribe to a topic/queue and get automatically notified if new data arrives Polling, consumers have to actively poll a topic/queue for new data Why are they used? Decoupling of producers and consumers Highly scalable for real time data Do I really need them? As a InterSystems IRIS developer probably not, but you are not alone... The external messaging API The new API classes are located in the %External.Messaging package. It contains generic Client-, Settings- and Message classes. The specialized classes for Kafka, AWS SQS/SNS, JMS, RabbitMQ are subclasses of these generic classes. The basic communication flow is: Create a settings object for your target platform. This is also responsible for the authentication against the target platform. Create a specific client object and pass the settings object to it Create a message object and send it to the target. The following sections demonstrate how you can communicate with Kafka and AWS SQS (Simple Queue Service). Interacting with Kafka Let's start with a Kafka example. First we create a class which leverages the new %External Messaging API to create a topic, send and receive a message to and from Kafka. It first creates a Kafka settings object set tSettings = ##class(%External.Messaging.KafkaSettings).%New() set tSettings.servers = $$$KAFKASERVER set tSettings.groupId = "iris-consumer" After setting the Kafka server address it sets a Kafka group id.With these settings a Kafka client object is created: set tClient = ##class(%External.Messaging.Client).CreateKafkaClient(tSettings.ToJSON(),.tSc) It then creates a topic by invoking the CreateTopic() method of the Kafka client: Set tSC = tClient.CreateTopic(pTopicName,tNumberOfPartitions,tReplicationFactor) Below is the full code sample: Include Kafka.Settings Class Kafka.api [ Abstract ] { ClassMethod CreateTopic(pTopicName As %String) As %Status { #dim tSc as %Status = $$$OK try { set tSettings = ##class(%External.Messaging.KafkaSettings).%New() set tSettings.servers = $$$KAFKASERVER set tSettings.groupId = "iris-consumer" set tClient = ##class(%External.Messaging.Client).CreateKafkaClient(tSettings.ToJSON(),.tSc) $$$ThrowOnError(tSc) Set tNumberOfPartitions = 1 Set tReplicationFactor = 1 Set tSC = tClient.CreateTopic(pTopicName,tNumberOfPartitions,tReplicationFactor) $$$ThrowOnError(tSC) $$$ThrowOnError(tClient.Close()) } catch tEx { set tSc = tEx.AsStatus() } return tSc } } After creating a topic we can send and receive messages from Kafka. The code is similiar to the above code ClassMethod SendMessage(pMessage As %String, pTopic As %String) As %Status { #dim tSettings as %External.Messaging.KafkaSettings #dim tClient as %External.Messaging.KafkaClient #dim tMessage as %External.Messaging.KafkaMessage #dim tSc as %Status = $$$OK try { set tSettings = ##class(%External.Messaging.KafkaSettings).%New() set tSettings.servers = $$$KAFKASERVER set tSettings.groupId = "iris-consumer" set tMessage = ##class(%External.Messaging.KafkaMessage).%New() set tMessage.topic = pTopic set tMessage.value = pMessage set tClient = ##class(%External.Messaging.Client).CreateKafkaClient(tSettings.ToJSON(),.tSc) $$$ThrowOnError(tSc) Set producerSettings = "{""key.serializer"":""org.apache.kafka.common.serialization.StringSerializer""}" $$$ThrowOnError(tClient.UpdateProducerConfig(producerSettings)) $$$ThrowOnError(tClient.SendMessage(tMessage)) $$$ThrowOnError(tClient.Close()) } catch tEx { set tSc = tEx.AsStatus() } return tSc } ClassMethod ReceiveMessage(pTopicName As %String, pGroupId As %String = "iris-consumer", Output pMessages) As %Status { #dim tSettings as %External.Messaging.KafkaSettings #dim tClient as %External.Messaging.KafkaClient #dim tMessage as %External.Messaging.KafkaMessage #dim tSc as %Status = $$$OK try { set tSettings = ##class(%External.Messaging.KafkaSettings).%New() set tSettings.servers = $$$KAFKASERVER set tSettings.groupId = pGroupId set tClient = ##class(%External.Messaging.Client).CreateKafkaClient(tSettings.ToJSON(),.tSc) $$$ThrowOnError(tSc) Set producerSettings = "{""key.serializer"":""org.apache.kafka.common.serialization.StringSerializer""}" $$$ThrowOnError(tClient.UpdateProducerConfig(producerSettings)) $$$ThrowOnError(tClient.ReceiveMessage(pTopicName, .pMessages)) $$$ThrowOnError(tClient.Close()) } catch tEx { set tSc = tEx.AsStatus() } return tSc } Let's try it. I have a Kafka instance running and first we create a topic community with the CreateTopic method above: Please ignore the log4j warnings here. The method returns a status code OK. So the topic was created. Next let's send a message to this topic. To verify that the message is sent to the topic, I have a generic Kafka consumer running. This consumer listens to the topic community: So let's send a message to this topic. I'll send a JSON-String to it, but basically you can send any message format to a topic. Let's check if the consumer received the message: The message was successfully received by the consumer. Receiving messages and deleting topics is similiar to the above sample. Below is the full sample implementation. The include file Kafka.settings only contains a macro definition: #define KAFKASERVER <Kafka server location and port>. Include Kafka.Settings Class Kafka.api [ Abstract ] { ClassMethod CreateTopic(pTopicName As %String) As %Status { #dim tSc as %Status = $$$OK try { set tSettings = ##class(%External.Messaging.KafkaSettings).%New() set tSettings.servers = $$$KAFKASERVER set tSettings.groupId = "iris-consumer" set tClient = ##class(%External.Messaging.Client).CreateKafkaClient(tSettings.ToJSON(),.tSc) $$$ThrowOnError(tSc) Set tNumberOfPartitions = 1 Set tReplicationFactor = 1 Set tSC = tClient.CreateTopic(pTopicName,tNumberOfPartitions,tReplicationFactor) $$$ThrowOnError(tSC) $$$ThrowOnError(tClient.Close()) } catch tEx { set tSc = tEx.AsStatus() } return tSc } ClassMethod DeleteTopic(pTopicName As %String) As %Status { #dim tSc as %Status = $$$OK try { set tSettings = ##class(%External.Messaging.KafkaSettings).%New() set tSettings.servers = $$$KAFKASERVER set tSettings.groupId = "iris-consumer" set tClient = ##class(%External.Messaging.Client).CreateKafkaClient(tSettings.ToJSON(),.tSc) $$$ThrowOnError(tSc) Set tNumberOfPartitions = 1 Set tReplicationFactor = 1 Set tSC = tClient.DeleteTopic(pTopicName) $$$ThrowOnError(tSC) $$$ThrowOnError(tClient.Close()) } catch tEx { set tSc = tEx.AsStatus() } return tSc } ClassMethod SendMessage(pMessage As %String, pTopic As %String) As %Status { #dim tSettings as %External.Messaging.KafkaSettings #dim tClient as %External.Messaging.KafkaClient #dim tMessage as %External.Messaging.KafkaMessage #dim tSc as %Status = $$$OK try { set tSettings = ##class(%External.Messaging.KafkaSettings).%New() set tSettings.servers = $$$KAFKASERVER set tSettings.groupId = "iris-consumer" set tMessage = ##class(%External.Messaging.KafkaMessage).%New() set tMessage.topic = pTopic set tMessage.value = pMessage set tClient = ##class(%External.Messaging.Client).CreateKafkaClient(tSettings.ToJSON(),.tSc) $$$ThrowOnError(tSc) Set producerSettings = "{""key.serializer"":""org.apache.kafka.common.serialization.StringSerializer""}" $$$ThrowOnError(tClient.UpdateProducerConfig(producerSettings)) $$$ThrowOnError(tClient.SendMessage(tMessage)) $$$ThrowOnError(tClient.Close()) } catch tEx { set tSc = tEx.AsStatus() } return tSc } ClassMethod ReceiveMessage(pTopicName As %String, pGroupId As %String = "iris-consumer", Output pMessages) As %Status { #dim tSettings as %External.Messaging.KafkaSettings #dim tClient as %External.Messaging.KafkaClient #dim tMessage as %External.Messaging.KafkaMessage #dim tSc as %Status = $$$OK try { set tSettings = ##class(%External.Messaging.KafkaSettings).%New() set tSettings.servers = $$$KAFKASERVER set tSettings.groupId = pGroupId set tClient = ##class(%External.Messaging.Client).CreateKafkaClient(tSettings.ToJSON(),.tSc) $$$ThrowOnError(tSc) Set producerSettings = "{""key.serializer"":""org.apache.kafka.common.serialization.StringSerializer""}" $$$ThrowOnError(tClient.UpdateProducerConfig(producerSettings)) $$$ThrowOnError(tClient.ReceiveMessage(pTopicName, .pMessages)) $$$ThrowOnError(tClient.Close()) } catch tEx { set tSc = tEx.AsStatus() } return tSc } } Interacting with AWS SQS How would you communicate with AWS SQS (Simple Queue Service)? The basic procedure is pretty similiar. But AWS requires authentication and AWS doesn't use the term topic. They talk about queues. You can send a message to a queue and consumers can receive messages from one or more queues. Similar to my api class above I've created something for AWS SQS. Class AWS.SQS.api [ Abstract ] { ClassMethod SendMessage(pMessage As %String, pQueue As %String) As %Status { #dim tSettings as %External.Messaging.SQSSettings #dim tMessage as %External.Messaging.SQSMessage #dim tClient as %External.Messaging.SQSClient #dim tSc as %Status = $$$OK try { $$$ThrowOnError(##class(AWS.Utils).GetCredentials(.tCredentials)) set tSettings = ##class(%External.Messaging.SQSSettings).%New() set tSettings.accessKey = tCredentials("aws_access_key_id") set tSettings.secretKey = tCredentials("aws_secret_access_key") set tSettings.sessionToken = tCredentials("aws_session_token") set tSettings.region = "eu-central-1" set tMessage = ##class(%External.Messaging.SQSMessage).%New() set tMessage.body = pMessage set tMessage.queue = pQueue set tClient = ##class(%External.Messaging.Client).CreateSQSClient(tSettings.ToJSON(),.tSc) $$$ThrowOnError(tSc) $$$ThrowOnError(tClient.SendMessage(tMessage)) } catch tEx { set tSc = tEx.AsStatus() } return tSc } ClassMethod ReceiveMessage(pQueueName As %String, Output pMessages) As %Status { #dim tSettings as %External.Messaging.SQSSettings #dim tClient as %External.Messaging.SQSClient #dim tSc as %Status = $$$OK try { $$$ThrowOnError(##class(AWS.Utils).GetCredentials(.tCredentials)) set tSettings = ##class(%External.Messaging.SQSSettings).%New() set tSettings.accessKey = tCredentials("aws_access_key_id") set tSettings.secretKey = tCredentials("aws_secret_access_key") set tSettings.sessionToken = tCredentials("aws_session_token") set tSettings.region = "eu-central-1" set tClient = ##class(%External.Messaging.Client).CreateSQSClient(tSettings.ToJSON(),.tSc) $$$ThrowOnError(tSc) $$$ThrowOnError(tClient.ReceiveMessage(pQueueName, .pMessages)) } catch tEx { set tSc = tEx.AsStatus() } return tSc } ClassMethod DeleteMessage(pQueueName As %String, pReceiptHandle As %String) As %Status { #dim tSettings as %External.Messaging.SQSSettings #dim tClient as %External.Messaging.SQSClient #dim tSc as %Status = $$$OK try { $$$ThrowOnError(##class(AWS.Utils).GetCredentials(.tCredentials)) set tSettings = ##class(%External.Messaging.SQSSettings).%New() set tSettings.accessKey = tCredentials("aws_access_key_id") set tSettings.secretKey = tCredentials("aws_secret_access_key") set tSettings.sessionToken = tCredentials("aws_session_token") set tSettings.region = "eu-central-1" set tClient = ##class(%External.Messaging.Client).CreateSQSClient(tSettings.ToJSON(),.tSc) $$$ThrowOnError(tSc) $$$ThrowOnError(tClient.DeleteMessage(pQueueName, pReceiptHandle)) } catch tEx { set tSc = tEx.AsStatus() } return tSc } ClassMethod CreateQueue(pQueueName As %String) As %Status { #dim tSettings as %External.Messaging.SQSSettings #dim tClient as %External.Messaging.SQSClient #dim tSQSSettings as %External.Messaging.SQSQueueSettings #dim tSc as %Status = $$$OK try { $$$ThrowOnError(##class(AWS.Utils).GetCredentials(.tCredentials)) set tSettings = ##class(%External.Messaging.SQSSettings).%New() set tSettings.accessKey = tCredentials("aws_access_key_id") set tSettings.secretKey = tCredentials("aws_secret_access_key") set tSettings.sessionToken = tCredentials("aws_session_token") set tSettings.region = "eu-central-1" set tClient = ##class(%External.Messaging.Client).CreateSQSClient(tSettings.ToJSON(),.tSc) $$$ThrowOnError(tSc) set tSQSSettings = ##class(%External.Messaging.SQSQueueSettings).%New() $$$ThrowOnError(tClient.CreateQueue(pQueueName,tSQSSettings)) } catch tEx { set tSc = tEx.AsStatus() } return tSc } ClassMethod DeleteQueue(pQueueName As %String) As %Status { #dim tSettings as %External.Messaging.SQSSettings #dim tClient as %External.Messaging.SQSClient #dim tSQSSettings as %External.Messaging.SQSQueueSettings #dim tSc as %Status = $$$OK try { $$$ThrowOnError(##class(AWS.Utils).GetCredentials(.tCredentials)) set tSettings = ##class(%External.Messaging.SQSSettings).%New() set tSettings.accessKey = tCredentials("aws_access_key_id") set tSettings.secretKey = tCredentials("aws_secret_access_key") set tSettings.sessionToken = tCredentials("aws_session_token") set tSettings.region = "eu-central-1" set tClient = ##class(%External.Messaging.Client).CreateSQSClient(tSettings.ToJSON(),.tSc) $$$ThrowOnError(tSc) $$$ThrowOnError(tClient.DeleteQueue(pQueueName)) } catch tEx { set tSc = tEx.AsStatus() } return tSc } } It contains methods for creating and deleting queues and sending and receiving messages to and from a queue. One of the key points here is how to authenticate. I didn't want to have my credentials in my code. So I created a little helper method to retrieve the credentials from my local credentials file and return it as subscripted array to use it in my api methods: ClassMethod GetCredentials(Output pCredentials) As %Status { #dim tSc as %Status = $$$OK set tFilename = "/dur/.aws/credentials" try { set tCredentialsFile = ##class(%Stream.FileCharacter).%New() $$$ThrowOnError(tCredentialsFile.LinkToFile(tFilename)) // first read the header set tBuffer = tCredentialsFile.ReadLine() for i=1:1:3 { set tBuffer = tCredentialsFile.ReadLine() set pCredentials($piece(tBuffer," =",1)) = $tr($piece(tBuffer,"= ",2),$c(13)) } } catch tEx { set tSc = tEx.AsStatus() } return tSc } To complete this article, let's create a queue community in the AWS region "eu-central-1" (Frankfurt, Germany). The queue has been successfully created and is visible in the AWS console for my account: Next, let's send a message to this queue: The method call returns 1. So the message has been successfully sent. Finally let's poll the queue from the AWS console: The message has been successfully delivered to the queue. Conclusion The external messaging api in InterSystems IRIS 2022.1 makes it really simple to communicate with event streaming platforms.Hope you find this useful.
Announcement
Anastasia Dyubaylo · Sep 22, 2022

[Video] Analytics with InterSystems New and Next 2022

Hi Developers, Enjoy watching the new video on InterSystems Developers YouTube: ⏯ Analytics with InterSystems New and Next 2022 @ Global Summit 2022 In this video, you'll see an overview of new and improved capabilities for analytics and artificial intelligence on data managed by InterSystems. We'll take a look at analytics across InterSystems IRIS and InterSystems IRIS for Health platforms, HealthShare, and TrakCare. This session will help you determine which additional sessions about analytics and artificial intelligence are relevant to you. Presenters:🗣 @Carmen.Logue, Product Manager, Analytics & AI, InterSystems🗣 @Thomas.Dyar, Product Specialist, Machine Learning, InterSystems🗣 @Benjamin.DeBoe, Product Manager, InterSystems Enjoy watching and stay tuned! 👍🏼
Announcement
Anastasia Dyubaylo · Dec 13, 2022

[Video] InterSystems IRIS Cloud IntegratedML

Hey Developers, Watch this video to learn how to use InterSystems IRIS Cloud IntegratedML: ⏯ InterSystems IRIS Cloud IntegratedML @ Global Summit 2022 🗣 Presenter: @Kinshuk.Rakshith, Sales Engineer, InterSystems Subscribe to InterSystems Developers YouTube to stay tuned!
Announcement
Anastasia Dyubaylo · Dec 9, 2022

[Video] Using Variables in InterSystems ObjectScript

Hi Developers, Enjoy watching the new video on InterSystems Developers YouTube: ⏯ Using Variables in InterSystems ObjectScript Learn about different variable types in InterSystems ObjectScript and what they are used for, and how to assign values to the most common variable types. You will also see how operator precedence works. Enjoy it and stay tuned! 👍
Announcement
Anastasia Dyubaylo · Dec 12, 2022

InterSystems Developer Ecosystem Fall News 2022

Hello and welcome to the Developer Ecosystem Fall News! This fall we've had so much fun and activities online and offline in the InterSystems Developer Ecosystem. In case you missed something, we've prepared for you a selection of the hottest news and topics to catch up on! News 🫂 InterSystems Developer Ecosystem Team 📊 Online Analytics Dashboard for Community Members 🎃 Halloween season on Global Masters 🔗 Developer Connections on GM 💡 InterSystems Ideas News 🔥 Back to school on FHIR with DC FR 🎉 InterSystems a Leader in Latest Forrester Wave Report: Translytical Data Platforms Q4 2022 📝 Updated Learning Path "Getting Started with InterSystems ObjectScript" ✅ InterSystems IRIS System Administration Specialist Certification Exam is now LIVE 📦 ZPM is now InterSystems Package Manager (IPM) Contests & Events InterSystems Interoperability Contest: Building Sustainable Solutions Contest Announcement Kick-off Webinar Technology Bonuses Time to Vote Technical Bonuses Results Winners Announcement Meetup with Winners Your Feedback InterSystems IRIS for Health Contest: FHIR for Women's Health Contest Announcement Kick-off Webinar Technology Bonuses Time to Vote Technical Bonuses Results Winners Announcement Community Roundtables 1. VSCode vs Studio 2. Best Source Control 3. Developing with Python InterSystems Idea-A-Thon Contest Announcement Winners Announcement 📄 [DC Contest] 1st Tech Article Contest on Chinese Developer Community ⏯ [Webinar] What’s New in InterSystems IRIS 2022.2 ⏯ [Webinar] Building and Enabling Healthcare Applications with HL7 FHIR ⏯ [Webinar] Deployments in Kubernetes with High Availability 👥 [Conference] InterSystems Iberia Summit 2022 👥 [Conference] InterSystems UK & Ireland Summit 2022 👥 [Conference] InterSystems at Big Data Minds DACH 2022 in Berlin 👥 [Conference] InterSystems Partnertage DACH 2022 👥 [Conference] InterSystems at data2day 👥 [Conference] InterSystems at Global DevSlam in Dubai 👾 [Hackathon] InterSystems at HackMIT 👾 [Hackathon] InterSystems at CalHacks hackathon 👾 [Hackathon] InterSystems at TechCrunch Disrupt 👾 [Hackathon] InterSystems at the European Healthcare Hackathon in Prague ☕️ [Meetup] InterSystems Developer Meetup in San Francisco ☕️ [Meetup] The 1st Spanish Developer Community Meetup in Valencia ☕️ [Meetup] InterSystems <> Mirantis Developer Meetup on Kubernetes in Boston 👋 InterSystems FHIR Healthtech Incubator Caelestinus Final Demo Day Latest Releases ⬇️ Developer Community Release, September 2022 ⬇️ Open Exchange - ObjectScript Quality status ⬇️ New Multi-Channel View on Global Masters ⬇️ InterSystems IRIS, IRIS for Health, HealthShare Health Connect, & InterSystems IRIS Studio 2022.2 ⬇️ InterSystems IRIS, IRIS for Health, & HealthShare Health Connect 2022.1.1 ⬇️ InterSystems IRIS, IRIS for Health, & HealthShare Health Connect 2022.3 developer previews Preview 1 Preview 2 ⬇️ InterSystems IRIS, IRIS for Health, & HealthShare Health Connect 2022.2 developer previews Preview 7 Preview 8 Preview 9 Preview 10 ⬇️ InterSystems Package Manager Release 0.5.0 Release 0.4.0 ⬇️ InterSystems extension for Docker Desktop ⬇️ VS Code Server Manager 3.2.1 ⬇️ SAM (System Alerting & Monitoring) 2.0 ⬇️ InterSystems Container Registry web user interface Best Practices & Key Questions 🔥 Best Practices of Autumn 2022 GitHub Codespaces with IRIS Using Grafana directly from IRIS Uploading and downloading files via http Adding VSCode into your IRIS Container Reading AWS S3 data on COVID as SQL table in IRIS IRIS Embedded Python with Azure Service Bus (ASB) use case BILLIONS - Monetizing the InterSystems FHIR® with Google Cloud's Apigee Edge Let's fight against the machines! Top 10 InterSystems IRIS Features The way to launch Jupyter Notebook + Apache Spark + InterSystems IRIS Apache Web Gateway with Docker ❓ Key Questions of Autumn 2022: September, October, November People and Companies to Know About 👋 Muhammad Waseem - New Developer Community Moderator 👋 Tete Zhang - New Developer Community Moderator 👋 New Partner - PainChek® Ltd 🌟 Global Masters of Autumn 2022: September, October, November Job Opportunities 💼 InterSystems HealthShare Architect (Remote Opportunity) 💼 InterSystems HealthShare Practice Lead (Remote Opportunity) 💼 REMOTE InterSystems Object Developer with Docker Experience 💼 Integration Developer OR Business Analyst with IRIS/Ensemble 💼 Looking for InterSystems Developer So... Here is our take on the most interesting and important things! What were your highlights from this past season? Share them in the comments section and let's remember the fun we've had! @Anastasia.Dyubaylo, I am always amazed at what you and your team accomplishes ... great work! As usual, lots of things are going on in the Community! Thanks, Ben! Glad to hear! Your feedback is always greatly appreciated :) Even more ahead ;)
Announcement
Elena E · Feb 20, 2023

Open Discussion about InterSystems Open Exchange

Dear all, We would like to invite you to an exciting online event related to the InterSystems Open Exchange app gallery. The purpose is to discuss the features and upgrades of the Open Exchange and gather feedback from the Community. Date: March 1st, 2023Time: 9:00 am Boston // 3:00 pm Berlin // 6:00 pm Dubai // 10:00 pm Beijing time>> Registration here << Topics that we will cover: There are many packages. There are duplications of functionality the packages provide. Most packages only have one contributor - teamwork encouragement Many packages haven't been updated in a long time. Apps bundles Demo for the apps The format of the event will be an open table discussion, where we will present our ideas and the vector of development. Then, we will ask for your feedback and encourage everyone to participate in the discussion. Agenda: 5 min - A short overview of app quality check feature (for moderators) 10 min - Questions and feedback 10 min - Our vision to address the issues mentioned above. 20 min - Questions and feedback 25 min - open talk - other ideas, wishes, comments towards Open Exchange If you have any other ideas or topics that you would like to discuss, feel free to put them in the comments or announce them during the meeting. We look forward to seeing you there and having an engaging discussion. >> Register here << . You are correct module.xml indicates IPM/ZPM usage and that's OK.But "Packages" is much wider since it also includes those parts that do not contain installable code or data to load but (if well prepared) a bunch of additional information like (hopefully) user guides, installation guides, description of the purpose of the packages, as well as screenshots, examples, ..... All this is not part of the IPM module. for good reasons.I would feel "module" as a downgrade of the excellent work the contributors provided to the community. . I think by "packages" @Elena.E6756 means any applications on OEX. Fully agree:Package was used for the chapter of OEX from day zero!.Instead of semantic discussions, it would be much more important to take care of quality and completeness and easy-to-evaluate examples for the community.Every member of the community is a customer. To my understanding this is majorpoint of being different do other code exchange and discussion platforms.I have checked almost all packages (except the commercials) and most contributors seem to share this understanding. Though I have to admit that there are also lessservice-minded contributors that just don care about issues and PRs.A community of white sheep only is an illusion.I've seen too much to have such dreams Was this event recorded? How did it go? Hi @Adam.Coppola We haven't recorded the event, unfortunately.We got some useful feedback from Dmitry Maslennikov, as he was the most active participant. Now the feedback is getting processed and as soon as we put anything on the roadmap I will let community know.If you have any questions, requests or ideas you may contact me anytime via direct messages.
Announcement
Bob Kuszewski · Feb 15, 2023

InterSystems Supported Platforms Update Feb-2023

InterSystems Supported Platforms Update Feb-2023 Welcome to the very first Supported Platforms Update! We often get questions about recent and upcoming changes to the list of platforms and frameworks that are supported by the InterSystems IRIS data platform. This update aims to share recent changes as well as our best current knowledge on upcoming changes, but predicting the future is tricky business and this shouldn’t be considered a committed roadmap. We’re planning to publish this kind of update approximately every 3 months and then re-evaluate in a year. If you find this update useful, let us know! We’d also appreciate suggestions for how to make it better. With that said, on to the update… IRIS Production Operating Systems and CPU Architectures Red Hat Enterprise Linux Recent Changes IRIS 2022.1.2 adds support for RHEL 9.0. 9.0 is a major OS release that updates the Linux Kernel to 5.14, OpenSSL to 3.0, and Python 3.9 IRIS 2022.2.0 removes support for RHEL 7.x. RHEL 7.9 is still supported in earlier versions of IRIS. Upcoming Changes RHEL 9.1 was released in November, 2022. Red Hat is supporting this minor version only until RHEL 9.2 is released, so InterSystems will not be adding 9.1 as a supported platform. RHEL 9.2 is planned to be released in late Q2, 2023 and Red Hat is planning to support 9.2 for 4 years. InterSystems is planning to do additional testing of IRIS on RHEL 9.2 through a new process we’re calling “Minor OS version certification” that is intended to provide additional security that a minor OS update didn’t break anything obvious. RHEL 8.4 extended maintenance ends 5/31/2023, which means that IRIS will stop supporting this minor version at that time as well. Further reading: RHEL Release Page Ubuntu Recent Changes IRIS 2022.1.1 adds support for Ubuntu 22.04. 22.04 is a major OS release that updates the Linux Kernel to 5.15, OpenSSL to 3.0.2, and Python 3.10.6 IRIS 2022.2.0 removes support for Ubuntu 18.04. Ubuntu 18.04 is still supported in earlier versions of IRIS. IRIS 2022.1.1 & up containers are based on Ubuntu 22.04. Upcoming Changes Ubuntu 20.04.05 LTS and 22.04.01 LTS have been recently released. InterSystems is planning to do additional testing of IRIS on 20.04.05 LTS and 22.04.01 LTS through a new process we’re calling “Minor OS version certification”. We’ll have more on these “Minor OS version certifications” in a future newsletter. The next major update of Ubuntu is scheduled for April, 2024 Further Reading: Ubuntu Releases Page SUSE Linux Recent Changes IRIS 2022.3.0 adds support for SUSE Linux Enterprise Server 15 SP4. 15 SP4 is a major OS release that updates the Linux Kernel to 5.14, OpenSSL to 3.0, and Python 3.9 Upcoming Changes Based on their release rhythm, we expect SUSE to release 15 SP5 late Q2 or early Q3 with support added to IRIS after that. Further Reading: SUSE lifecycle Oracle Linux Recent Changes IRIS 2022.3.0 adds support for Oracle Linux 9. Oracle Linux 9 is a major OS release that tracks RHEL 9, so it, too, updates the Linux Kernel to 5.14, OpenSSL to 3.0, and Python 3.9 Upcoming Changes Oracle Linux 9.1 was released in January, 2023. Further Reading: Oracle Linux Support Policy Microsoft Windows Recent Changes We haven’t made any changes to the list of supported Windows versions since Windows Server 2022 was added in IRIS 2022.1 Upcoming Changes Windows Server 2012 will reach its end of extended support in October, 2023. If you’re still running on the platform, now is the time to plan migration. Further Reading: Microsoft Lifecycle AIX Recent Changes We haven’t made any changes to the list of supported AIX versions since AIX 7.3 was added and 7.1 removed in IRIS 2022.1 Upcoming Changes InterSystems is working closely with IBM to add support for OpenSSL 3.0. This will not be included in IRIS 2023.1.0 as IBM will need to target the feature in a further TL release. The good news is that IBM is looking to release OpenSSL 3.0 for both AIX 7.2 & 7.3. IBM released AIX 7.3 TL1 in December and certification is in progress. The next TL releases are expected in April. Further Reading: AIX Lifecycle Containers Recent Changes We are now publishing multi-architecture manifests for IRIS containers. This means that pulling the IRIS container tagged 2022.3.0.606.0 will download the right container for your machine’s CPU architecture (Intel/AMD or ARM). If you need to pull a container for a specific CPU architecture, tags are available for architecture-specific containers. For example, 2022.3.0.606.0-linux-amd64 will pull the Intel/AMD container and 2022.3.0.606.0-linux-arm64v8 will pull the ARM container. Upcoming Changes We will phase out the arm-specific image names, such as iris-arm64 in favor of the multi-architecture manifests in the second-half of the year. We will also start to tag the preview containers with “-preview” so that it’s clear which container is the most recent GA release. IRIS Development Operating Systems and CPU Architectures MacOS Recent Changes We haven’t made any changes to the list of supported MacOS versions since we moved to MacOS 11 in IRIS 2022.1 Upcoming Changes We’re planning to add support for MacOS 13 in 2023, perhaps as early as IRIS 2023.1. CentOS We are considering removing support for CentOS/CentOS Stream. See reasoning below. Red Hat has been running a developer program for a few years now, which gives developers access to free licenses for non-production environments. Developers currently using CentOS are encouraged to switch to RHEL via this program. CentOS Stream is now “upstream” of RHEL, meaning that it has bugs & features not yet included in RHEL. It also updates daily, which can cause problems for developers building on the platform (to say nothing of our own testing staff). We haven’t made any changes to the list of supported CentOS versions since we added support for CentOS 8-Stream and removed support for CentOS 7.9 in IRIS 2022.1 Caché & Ensemble Production Operating Systems and CPU Architectures Recent Changes Cache 2018.1.7 adds support for Windows 11 InterSystems Supported Platforms Documentation The InterSystems Supported Platforms documentation is source for definitive list of supported technologies. IRIS 2020.1 Supported Server Platforms IRIS 2021.1 Supported Server Platforms IRIS 2022.1 Supported Server Platforms IRIS 2022.3 Supported Server Platforms Caché & Ensemble 2018.1.7 Supported Server Platforms … and that’s all folks. Again, if there’s something more that you’d like to know about, please let us know. Nice work on the containers side @Robert.Kuszewski !
Announcement
Dmitry Maslennikov · Sep 16, 2022

InterSystems extension for Docker Desktop is now published

Great news, the extension to Docker Desktop for InterSystems Container Registry is now publicly available for everyone. It is already available in the marketplace in Docker Desktop. It was published today, and it requires restarting Docker Desktop to see it. Feel free to post any feedback in the GitHub repository, here
Announcement
Jessica Simmons · Nov 1, 2022

InterSystems HealthShare Architect (Remote Opportunity)

VetsEZ is seeking a full-time remote InterSystems HealthShare / IRIS Architect to design and deliver integrated health solutions for our federal healthcare clients with a focus on automation and semantic interoperability. This role focuses on understanding complex technical and business requirements and translating them into highly scalable, robust integration architectures. Act as a technical lead, and mentor team members while maintaining a hands-on role. The candidate must reside within the continental US. Responsibilities: Architecting and configuring the InterSystems HealthShare / IRIS platform with a focus on Automation and CI/CD Utilizing Healthcare Interoperability Standards (HL7v2, FHIR, CCDA, IHE, X12) appropriately in solution designs Understanding and translating business and technical requirements, particularly those that are unique to healthcare, into architectures and solution designs Lead development teams in building solutions as an architect and automating processes Developing and implementing APIs and Web Services (REST, SOAP) and designing API-based solutions Utilizing CI/CD technologies and processes including but not limited to Git, Jenkins, Docker Using AWS-based cloud architectures, VM and Containers, and deployment strategies to Architect solutions Implementing and using authorization frameworks, including OAuth 2.0, OIDC, and SAML 2.0 Utilizing Enterprise Integration Patterns in solution designs Requirements: Bachelor's degree in Information Technology, Computer Science, or other related fields 3+ years of experience in InterSystems ObjectScript, .NET (C#), Java, or other Object-Oriented Programming languages Strong interpersonal skills with hands-on Architect leadership experience to guide and mentor a team Flexible and able to adapt to frequently changing standards and priorities Proven experience developing and implementing highly scalable enterprise-level interoperability solutions Passion for deploying scalable, robust solutions with an eye towards futureproofing HealthShare Unified Care Record Technical Specialist Additional Qualifications: Must be able to obtain and maintain Public Trust Clearance Background in the Department of Veterans Affairs and healthcare preferred Certified Maximo Deployment Professional and Certified SAFe Agile Architect Benefits: Medical/Dental/Vision 401k with Employer Match Corporate Laptop PTO + Federal Holidays Training opportunities Remote work options Qualified applicants will receive consideration for employment without regard to race, color, religion, sex, national origin, sexual orientation, gender identity, disability, or protected veteran status. Sorry, we are unable to offer sponsorship currently. https://vetsez.breezy.hr/p/391438edae0f01-intersystems-healthshare-architect-remote-opportunity?state=published
Question
Vishnu G · Dec 14, 2022

Does InterSystems has CDS Hook implementations?

Does InterSystems has CDS Hook implementations? if yes, where I could get the details. What's CDS? I suppose this is it Hi Vishnu! InterSystems has recently released a beta of the Healthcare Action Engine for limited customer testing. The Healthcare Action Engine is an extended healthcare decision support service; it includes workflows for implementing your own CDS Hooks services and for brokering connections between clients, data sources, and third-party CDS Hooks Services. The Healthcare Action Engine is a stand-alone product, but it is designed to integrate seamlessly with InterSystems HealthShare product ecosystem. Because of this, documentation for the product is included as part of our HealthShare documentation, here. (Note that, for security reasons, you must authenticate as a registered HealthShare customer with your WRC credentials to access HealthShare documentation.) If you'd like to learn more about the Healthcare Action Engine, I encourage you to contact your organization's InterSystems sales associate. As the technical writer responsible for documenting the Healthcare Action Engine as it continues to develop, I'm also happy to answer further questions. Following up on Shawn's response, these resources might also be helpful in the meantime, and perhaps for others - A Global Summit 2022 session titled Healthcare Action Engine and CDS Hooks: Sneak Peek (includes PDF slides and recording). An online exercise titled Configuring Alerts for Clinicians with the Healthcare Action Engine. "See how to use key features of the Healthcare Action Engine to set up real-time alerts for clinicians. In this exercise, you will build decision support, design a notification using a CDS Hooks card, and write a rule to deliver it." [I believe the same comment Shawn mentioned about being required to be a HealthShare customer in order to access this content is relevant here as well.] Thank you very much. I got it. Thank you very much. I got it.
Announcement
Anastasia Dyubaylo · Feb 23, 2023

Tech Article Contest: InterSystems IRIS Tutorials

Hello Community, After the last heated programming contest, we're happy to announce the next InterSystems technical article writing competition! ✍️ Tech Article Contest: InterSystems IRIS Tutorials ✍️ Write an article that can be considered a tutorial for InterSystems IRIS programmers of any level: beginner / middle / senior from March 1st to March 31st. 🎁 Prizes for everyone: A special prize pack for each author who takes part in the competition! 🏆 Main Prizes: There are 6 prizes to choose from. Prizes 1. Everyone is a winner in InterSystems Tech Article Contest! Any member who writes an article during the competition period will receive special prizes: 🎁 Branded Organic Canvas Tote Bag 🎁 Moleskine Lined Notebook 2. Expert Awards – articles will be judged by InterSystems experts: 🥇 1st place: Mars Pro Bluetooth speakers / AirPods Max 🥈 2nd place: Apple AirPods Pro with Wireless Charging Case / JBL Pulse 4 Light Show Speaker 🥉 3rd place: Magic Keyboard Folio for iPad / Bose Soundlink Micro Bluetooth Speaker Or as an alternative, any winner can choose a prize from a lower prize tier than his own. 3. Developer Community Award – article with the most likes. The winner will have the option to choose one of the following prizes: 🎁 Magic Keyboard Folio for iPad 🎁 Bose Soundlink Micro Bluetooth Speaker Note: The author can only be awarded once per category (in total the author will win 2 prizes: one for Expert and one for the Community) In the event of a tie, the number of votes of the experts for the tied articles will be considered as a tie-breaking criterion. Who can participate? Any Developer Community member, except for InterSystems employees. Create an account! Contest period 📝 March 1st - March 31st: Publication of articles and voting time. Publish an article(s) throughout this period. DC members can vote for published articles with Likes – votes in the Community award. Note: The sooner you publish the article(s), the more time you will have to collect both Expert & Community votes. What are the requirements? ❗️ Any article written during the contest period and satisfying the requirements below will automatically* enter the competition: The article must be a tutorial** on the InterSystems IRIS topic. It can be either for beginners, middle or senior developers. The article must be in English (incl. inserting code, screenshots, etc.). The article must be 100% new (it can be a continuation of an existing article). The article cannot be a translation of an article already published in other communities. The article should contain only correct and reliable information about InterSystems technology. The article has to contain the Tutorial tag. Article size: 400 words minimum (links and code are not counted towards the word limit). Max 3 entries from the same author are allowed. Articles on the same topic but with dissimilar examples from different authors are allowed. * Articles will be moderated by our experts. Only valid content will be eligible to enter the contest. ** Tutorials provide step-by-step instructions that a developer can follow to complete a specific task or set of tasks. 🎯 EXTRA BONUSES This time we decided to add additional bonuses that will help you to win the prize! Please welcome: Bonus Nominal Details Topic bonus 5 If your article is on the topic from the list of the proposed topics (listed below), you will receive a bonus of 5 Expert votes (vs 1st place selected by an Expert = 3 votes). Video bonus 3 Format of the presentation of the content of the article: besides publishing the article make an explanatory video. Discussion bonus 1 Article with the most useful discussion, as decided by InterSystems experts. Only 1 article will get this bonus. Translation bonus 1 Publish a translation of your article on any of the regional Communities. Learn more. Note: Only 1 vote per article. New member bonus 3 If you haven't participated in the previous contests, your article(s) will get 3 Expert votes. Proposed topics Here's a list of proposed topics that will give your article extra bonuses: ✔️ Working with IRIS from C#✔️ Working with IRIS from Java✔️ Working with IRIS from Python✔️ Using Embedded Python✔️ Using Python API✔️ Using Embedded SQL✔️ Using ODBC/JDBC✔️ Working with %Query/%SQLQuery✔️ Using indexes✔️ Using triggers✔️ Using JSON✔️ Using XML✔️ Using REST✔️ Using containers✔️ Using kubernetes Note: Articles on the same topic from different authors are allowed. ➡️ Join InterSystems Discord to chat about the rules, topics & bonuses. So, It's time to show off your writing skills! Good luck ✨ Important note: Delivery of prizes varies by country and may not be possible for some of them. A list of countries with restrictions can be requested from @Liubka.Zelenskaia Great, I love to write tutorials. The winner will get a badge on GM too? I'm uncovering my keyboard and stretching my fingers Is the article word count a minimum or maximum? Neither; all articles must be exactly 400 words. JK; that needs clarification. 400 words minimum – updated the announcement ;) Thanks for the heads up, guys! Hi Devs) What's great news! 🤩 5 news articles have appeared on the Contest page: Tutorial - Streams in Pieces by @Robert.Cemper1003 Quick sample database tutorial by @Heloisa.Paiva Tutorial - Working with %Query #1 by @Robert.Cemper1003 Tutorial - Working with %Query #2 by @Robert.Cemper1003 Tutorial - Working with %Query #3 by @Robert.Cemper1003 Waiting for other interesting articles) 😎 of course! there will be special badges on Global Masters ;) Example: Robert Cemper is so powerful Hey Devs! The 8 new articles have been added to the contest! SQLAlchemy - the easiest way to use Python and SQL with IRIS's databases by @Heloisa.Paiva Creating an ODBC connection - Step to Step by @Heloisa.Paiva Tutorial - Develop IRIS using SSH by @wang.zhe Getting Started with InterSystems IRIS: A Beginner's Guide by @A.R.N.H.Hafeel Creating a DataBase, namespace, inserting data and visualizing data in the front end. by @A.R.N.H.Hafeel InterSystems Embedded Python in glance by @Muhammad.Waseem Query as %Query or Query based on ObjectScript by @Irene.Mikhaylova Setting up VS Code to work with InterSystems technologies by @Maria.Gladkova Important note: We do not prohibit authors from using AI when creating content, however, articles must contain only correct and reliable information about InterSystems technology. Before entering the contest, articles are moderated by our experts. In this regard, we have updated the contest requirements. Hi, Community! Seven more tutorials have been added to the contest! Tutorial: Improving code quality with the visual debug tool's color-coded logs by @Yone.Moreno Kinds of properties in IRIS by @Irene.Mikhaylova Backup and rebuilding procedure for the IRIS server by @Akio.Hashimoto1419 Stored Procedures the Swiss army knife of SQL by @Daniel.Aguilar Tutorial how to analyze requests and responses received and processed in webgateway pods by @Oliver.Wilms InterSystems's Embedded Python with Pandas by @Rizmaan.Marikar2583 Check them out! Hey, Developers! Two more articles have been added to the contest! Tutorial - Creating a HL7 TCP Operation for Granular Error Handling by @Julian.Matthews7786 Tutorial for Middle/Senior Level Developer: General Query Solution by @姚.鑫 There are already 19 tutorials that have been uploaded!Almost one week left to the end of the contest, and we are waiting forward to more articles! Developers! A lot of tutorials have been added to the contest!🤩 And only four days left to the end of publication and voting! Hurry up and upload your articles!🚀 Community! Three more articles have been added to the contest! Perceived gaps to GPT assisted COS development automatons by @Zhong.Li7025 SQL IRIS Editor and IRIS JAVA CONNECTION by @Jude.Mukkadayil Set up an IRIS docker image on a Raspberry Pi 4 by @Roger.Merchberger Devs, only one day left to the end of the contest! Upload your tutorials and join the contest! Our Tech Article contest is over! Thank you all for participating in this writing competition :) As a result, 🔥 24 AMAZING ARTICLES 🔥 Now, let's add an element of intrigue... The winners will be announced on Monday! Stay tuned for the updates.
Article
Anastasia Dyubaylo · Apr 7, 2023

How to use search on InterSystems Developer Community

Hi Community! We know that sometimes you may need to find info or people on our Community! So to make it easier here is a post on how to use different kinds of searches: find something on the Community find something in your own posts find a member by name ➡️ Find some info on the Community Use the search bar at the top of every page - a quick DC search. Enter a word or phrase, or a tag, or a DC member name, and you'll get the results in a drop-down list: Also, you can press Enter or click on a magnifying glass and the search results will open. On this page, you can refine your results: You can choose if you want to search only in Questions, Articles, etc, or your own posts. You can look for posts of a particular member. You can look for posts with specific tags. You can set up a time limit and sort them by date/relevance. ➡️ Find something in your own posts Go to your profile, choose Posts on the left-hand side, and after the page refreshes just write what you want to find in the search bar: ➡️ Find a Community member If you know his or her name or e-mail open the Menu in the top left: and click on Members: This will open a table with all the members of this Community and at the top of it there is a Search box: Hope you'll find these explanations useful. Happy searching! ;)
Article
Mikhail Khomenko · May 15, 2017

Making Prometheus Monitoring for InterSystems IRIS and Caché

Prometheus is one of the monitoring systems adapted for collecting time series data. Its installation and initial configuration are relatively easy. The system has a built-in graphic subsystem called PromDash for visualizing data, but developers recommend using a free third-party product called Grafana. Prometheus can monitor a lot of things (hardware, containers, various DBMS's), but in this article, I would like to take a look at the monitoring of a Caché instance (to be exact, it will be an Ensemble instance, but the metrics will be from Caché). If you are interested – read along. In our extremely simple case, Prometheus and Caché will live on a single machine (Fedora Workstation 24 x86_64). Caché version: %SYS>write $zvCache for UNIX (Red Hat Enterprise Linux for x86-64) 2016.1 (Build 656U) Fri Mar 11 2016 17:58:47 EST Installation and configuration Let's download a suitable Prometheus distribution package from the official site and save it to the /opt/prometheus folder. Unpack the archive, modify the template config file according to our needs and launch Prometheus. By default, Prometheus will be displaying its logs right in the console, which is why we will be saving its activity records to a log file. Launching Prometheus # pwd/opt/prometheus# lsprometheus-1.4.1.linux-amd64.tar.gz# tar -xzf prometheus-1.4.1.linux-amd64.tar.gz# lsprometheus-1.4.1.linux-amd64 prometheus-1.4.1.linux-amd64.tar.gz# cd prometheus-1.4.1.linux-amd64/# lsconsole_libraries consoles LICENSE NOTICE prometheus prometheus.yml promtool# cat prometheus.yml global: scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.scrape_configs: - job_name: 'isc_cache' metrics_path: '/metrics/cache' static_configs: - targets: ['localhost:57772']# ./prometheus > /var/log/prometheus.log 2>&1 &[1] 7117# head /var/log/prometheus.logtime=«2017-01-01T09:01:11+02:00» level=info msg=«Starting prometheus (version=1.4.1, branch=master, revision=2a89e8733f240d3cd57a6520b52c36ac4744ce12)» source=«main.go:77»time=«2017-01-01T09:01:11+02:00» level=info msg=«Build context (go=go1.7.3, user=root@e685d23d8809, date=20161128-09:59:22)» source=«main.go:78»time=«2017-01-01T09:01:11+02:00» level=info msg=«Loading configuration file prometheus.yml» source=«main.go:250»time=«2017-01-01T09:01:11+02:00» level=info msg=«Loading series map and head chunks...» source=«storage.go:354»time=«2017-01-01T09:01:11+02:00» level=info msg=«23 series loaded.» source=«storage.go:359»time=«2017-01-01T09:01:11+02:00» level=info msg="Listening on :9090" source=«web.go:248» The prometheus.yml configuration is written in the YAML language, which doesn't like tabulation symbols, which is why you should use spaces only. We have already mentioned that metrics will be downloaded from http://localhost:57772 and we'll be sending requests to /metrics/cache (the name of the application is arbitrary), i.e. the destination address for collecting metrics will be http://localhost:57772/metrics/cache. A "job=isc_cache" tag will be added to each metric. A tag, very roughly, is the equivalent of WHERE in SQL. In our case, it won't be used, but will do just fine for more than one server. For example, names of servers (and/or instances) can be saved to tags and you can then use tags to parameterize requests for drawing graphs. Let's make sure that Prometheus is working (we can see the port it's listening to in the output above – 9090): A web interface opens, which means that Prometheus is working. However, it doesn't see Caché metrics yet (let's check it by clicking Status → Targets): Preparing metrics Our task is to make metrics available to Prometheus in a suitable format at http://localhost:57772/metrics/cache. We'll be using the REST capabilities of Caché because of their simplicity. It should be noted that Prometheus only “understands” numeric metrics, so we will not export string metrics. To get the latter, we will use the API of the SYS.Stats.Dashboard class. These metrics are used by Caché itself for displaying the System toolbar: Example of the same in the Terminal: %SYS>set dashboard = ##class(SYS.Stats.Dashboard).Sample() %SYS>zwrite dashboarddashboard=<OBJECT REFERENCE>[2@SYS.Stats.Dashboard]+----------------- general information ---------------| oref value: 2| class name: SYS.Stats.Dashboard| reference count: 2+----------------- attribute values ------------------| ApplicationErrors = 0| CSPSessions = 2| CacheEfficiency = 2385.33| DatabaseSpace = "Normal"| DiskReads = 14942| DiskWrites = 99278| ECPAppServer = "OK"| ECPAppSrvRate = 0| ECPDataServer = "OK"| ECPDataSrvRate = 0| GloRefs = 272452605| GloRefsPerSec = "70.00"| GloSets = 42330792| JournalEntries = 16399816| JournalSpace = "Normal"| JournalStatus = "Normal"| LastBackup = "Mar 26 2017 09:58AM"| LicenseCurrent = 3| LicenseCurrentPct = 2. . . The USER space will be our sandbox. To begin with, let's create a REST application /metrics. To add come very basic security, let's protect our log-in with a password and associate the web application with some resource – let's call it PromResource. We need to disable public access to the resource, so let's do the following: %SYS>write ##class(Security.Resources).Create("PromResource", "Resource for Metrics web page", "")1 Our web app settings: We will also need a user with access to this resource. The user should also be able to read from our database (USER in our case) and save data to it. Apart from this, this user will need read rights for the CACHESYS system database, since we will be switching to the %SYS space later in the code. We'll follow the standard scheme, i.e. create a PromRole role with these rights and then create a PromUser user assigned to this role. For password, let’s use "Secret": %SYS>write ##class(Security.Roles).Create("PromRole","Role for PromResource","PromResource:U,%DB_USER:RW,%DB_CACHESYS:R")1%SYS>write ##class(Security.Users).Create("PromUser","PromRole","Secret")1 It is this user PromUser that we will used for authentication in the Prometheus config. Once done, we'll re-read the config by sending a SIGNUP signal to the server process. A safer config # cat /opt/prometheus/prometheus-1.4.1.linux-amd64/prometheus.ymlglobal: scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.scrape_configs: - job_name: 'isc_cache' metrics_path: '/metrics/cache' static_configs: - targets: ['localhost:57772'] basic_auth: username: 'PromUser' password: 'Secret'## kill -SIGHUP $(pgrep prometheus) # or kill -1 $(pgrep prometheus) Prometheus can now successfully pass authentication for using the web application with metrics. Metrics will be provided by the my.Metrics request processing class. Here is the implementation: Class my.Metrics Extends %CSP.REST { Parameter ISCPREFIX = "isc_cache"; Parameter DASHPREFIX = {..#ISCPREFIX_"_dashboard"}; XData UrlMap [ XMLNamespace = "http://www.intersystems.com/urlmap" ] { <Routes> <Route Url="/cache" Method="GET" Call="getMetrics"/> </Routes> } /// Output should obey the Prometheus exposition formats. Docs: /// https://prometheus.io/docs/instrumenting/exposition_formats/ /// /// The protocol is line-oriented. A line-feed character (\n) separates lines. /// The last line must end with a line-feed character. Empty lines are ignored. ClassMethod getMetrics() As %Status { set nl = $c(10) do ..getDashboardSample(.dashboard) do ..getClassProperties(dashboard.%ClassName(1), .propList, .descrList) for i=1:1:$ll(propList) { set descr = $lg(descrList,i) set propertyName = $lg(propList,i) set propertyValue = $property(dashboard, propertyName) // Prometheus supports time series database // so if we get empty (for example, backup metrics) or non-digital metrics // we just omit them. if ((propertyValue '= "") && ('$match(propertyValue, ".*[-A-Za-z ]+.*"))) { set metricsName = ..#DASHPREFIX_..camelCase2Underscore(propertyName) set metricsValue = propertyValue // Write description (help) for each metrics. // Format is that the Prometheus requires. // Multiline descriptions we have to join in one string. write "# HELP "_metricsName_" "_$replace(descr,nl," ")_nl write metricsName_" "_metricsValue_nl } } write nl quit $$$OK } ClassMethod getDashboardSample(Output dashboard) { new $namespace set $namespace = "%SYS" set dashboard = ##class(SYS.Stats.Dashboard).Sample() } ClassMethod getClassProperties(className As %String, Output propList As %List, Output descrList As %List) { new $namespace set $namespace = "%SYS" set propList = "", descrList = "" set properties = ##class(%Dictionary.ClassDefinition).%OpenId(className).Properties for i=1:1:properties.Count() { set property = properties.GetAt(i) set propList = propList_$lb(property.Name) set descrList = descrList_$lb(property.Description) } } /// Converts metrics name in camel case to underscore name with lower case /// Sample: input = WriteDaemon, output = _write_daemon ClassMethod camelCase2Underscore(metrics As %String) As %String { set result = metrics set regexp = "([A-Z])" set matcher = ##class(%Regex.Matcher).%New(regexp, metrics) while (matcher.Locate()) { set result = matcher.ReplaceAll("_"_"$1") } // To lower case set result = $zcvt(result, "l") // _e_c_p (_c_s_p) to _ecp (_csp) set result = $replace(result, "_e_c_p", "_ecp") set result = $replace(result, "_c_s_p", "_csp") quit result } } Let's use the console to check that our efforts have not been vain (added the --silent key, so that curl doesn't impede us with its progress bar): # curl --user PromUser:Secret --silent -XGET 'http://localhost:57772/metrics/cache' | head -20# HELP isc_cache_dashboard_application_errors Number of application errors that have been logged.isc_cache_dashboard_application_errors 0# HELP isc_cache_dashboard_csp_sessions Most recent number of CSP sessions.isc_cache_dashboard_csp_sessions 2# HELP isc_cache_dashboard_cache_efficiency Most recently measured cache efficiency (Global references / (physical reads + writes))isc_cache_dashboard_cache_efficiency 2378.11# HELP isc_cache_dashboard_disk_reads Number of physical block read operations since system startup.isc_cache_dashboard_disk_reads 15101# HELP isc_cache_dashboard_disk_writes Number of physical block write operations since system startupisc_cache_dashboard_disk_writes 106233# HELP isc_cache_dashboard_ecp_app_srv_rate Most recently measured ECP application server traffic in bytes/second.isc_cache_dashboard_ecp_app_srv_rate 0# HELP isc_cache_dashboard_ecp_data_srv_rate Most recently measured ECP data server traffic in bytes/second.isc_cache_dashboard_ecp_data_srv_rate 0# HELP isc_cache_dashboard_glo_refs Number of Global references since system startup.isc_cache_dashboard_glo_refs 288545263# HELP isc_cache_dashboard_glo_refs_per_sec Most recently measured number of Global references per second.isc_cache_dashboard_glo_refs_per_sec 273.00# HELP isc_cache_dashboard_glo_sets Number of Global Sets and Kills since system startup.isc_cache_dashboard_glo_sets 44584646 We can now check the same in the Prometheus interface: And here is the list of our metrics: We won’t focus on viewing them in Prometheus. You can select the necessary metric and click the “Execute” button. Select the “Graph” tab to see the graph (shows the cache efficiency): Visualization of metrics For visualization purposes, let’s install Grafana. For this article, I chose installation from a tarball. However, there are other installation options, from packages to a container. Let's perform the following steps (after creating the /opt/grafana folder and switching to it): Let's leave the config unchanged for now. On our last step, we launch Grafana in the background mode. We'll be saving Grafan's log to a file, just like we did with Prometheus: # ./bin/grafana-server > /var/log/grafana.log 2>&1 & By default, Grafana’s web interface is accessible via port 3000. Login/password: admin/admin. A detailed instruction on making Prometheus work with Grafana is available here. In short, we need to add a new Data Source of the Prometheus type. Select your option for direct/proxy access: Once done, we need to add a dashboard with the necessary panels. The test sample of a dashboard is publicly available, along with the code of the metrics collection class. A dashboard can be simply imported to Grafana (Dashboards → Import): We'll get the following after import: Save the dashboard: Time range and update period can be selected in the top right corner: Examples of monitoring types Let's test the monitoring of calls to globals: USER>for i=1:1:1000000 {set ^prometheus(i) = i}USER>kill ^prometheus We can see that the number of references to globals per second has increased, while cache efficiency dropped (the ^Prometheus global hasn’t been cached yet): Let's check our license usage. To do this, let's create a primitive CSP page called PromTest.csp in the USER namespace: <html><head><title>Prometheus Test Page</title></head><body>Monitoring works fine!</body></html> And visit it so many times (we assume that the /csp/user application is not password-protected): # ab -n77 http://localhost:57772/csp/user/PromTest.csp We'll see the following picture for license usage: Conclusions As we can see, implementing the monitoring functionality is not hard at all. Even after a few initial steps, we can get important information about the work of the system, such as: license usage, efficiency of globals caching, application errors. We used the SYS.Stats.Dashboard for this tutorial, but other classes of SYS, %SYSTEM, %SYS packages also deserve attention. You can also write your own class that will supply custom metrics for your own application – for instance, the number of documents of a particular type. Some useful metrics will eventually be compiled into a separate template for Grafana. To be continued If you are interested in learning more about this, I will write more on the subject. Here are my plans: Preparing a Grafana template with metrics for the logging daemon. It would be nice to make some sort of a graphical equivalent of the ^mgstat tool – at least for some of its metrics. Password protection for web applications is good, but it would be nice to verify the possibility of using certificates. Use of Prometheus, Grafana and some exporters for Prometheus as Docker containers. Use of discovery services for automatically adding new Caché instances to the Prometheus monitoring list. It's also where I'd like to demonstrate (in practice) how convenient Grafana and its templates are. This is something like dynamic panels, where metrics for a particular selected server are shown, all on the same Dashboard. Prometheus Alert Manager. Prometheus configuration settings related to the duration of storing data, as well possible optimizations for systems with a large number of metrics and a short statistics collection interval. Various subtleties and nuances that will transpire along the way. Links During the preparation of this article, I visited a number of useful sites and watched a great deal of videos: Prometheus project website Grafana project website Blog of one of Prometheus developers called Brian Brazil Tutorial on DigitalOcean Some videos from Robust Perception Many videos from a conference devoted to Prometheus Thank you for reading all the way down to this line! Hi Mikhail, very nice! And very useful.Have you done any work on templating, e.g. so one or more systems may be selected to be displayed on one dashboard? Hi, Murray! Thanks for your comment! I'll try to describe templating soon. I should add it to my plan. For now, an article about ^mgstat is almost ready (in head -)). So stay tuned for more. Hi, Murray!You can read continuation of article here. There templates are used. Hi Mikhail, very nice! I am configure here the process! Where are the metric values stored? What kind of metrics can be added via SetSensor? Only counters or also gauges and histograms? Metrics in this approach are stored in Prometheus. As Prometheus is time-series database, you can store any numeric metric there either counter or gauge. Hum... ok for that part I understand it, but if I extend the %SYS.Monitor.SAM.Abstract (https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=GCM_rest) and SetTimer method, do you know where is it stored? I'm not sure, but think that SAM-implementation is based on System Monitor (https://docs.intersystems.com/iris20194/csp/docbook/DocBook.UI.Page.cls?KEY=GCM_healthmon) in some fashion. Could you clarify your task? Do you want to know an exact name of Global where samples are stored? For what?Link you've shared describes how to expose your custom numeric metric that could be read by Prometheus, for instance, and then stored there. 💡 This article is considered as InterSystems Data Platform Best Practice.
Announcement
Anastasia Dyubaylo · Mar 23, 2018

Meet InterSystems Developer Community SubReddit!

Hi Community!Please welcome the InterSystems Developer Community SubReddit!Here you will find all the most interesting announcements from InterSystems Developer Community, i.e. useful articles, discussions, announcements and events.A little about Reddit: — is a social news aggregation, web content rating, and discussion website.See how DC SubReddit looks like:Subscribe to the DC SubReddit and maybe it will become one of your favorites!