Question Norman W. Freeman · May 7, 2023 Is there a limit to the number of processes IRIS can create to process concurrent requests ? I did some experiments on my local machine and found out that IRIS seems to associate each request (eg: CSP request) to a dedicated process named IrisDB.exe This process has 3 threads, and one of them seems to be the main working thread (that will the handle request). If I spawn many concurrent requests, the number of IrisDB processes on my local machine will grow (to make sure each request can be handled in parallel). It seems there is a limit : it will create no more than 64 processes to handle requests (eg: even if 100 concurrent requests are send to IRIS). #InterSystems IRIS 1 3 0 458
Question Norman W. Freeman · Apr 4, 2023 Why loading X509 credentials fails when called under context of a CSP request ? I use the following code to grab 509 certificate and show private key : #CSP #InterSystems IRIS 0 5 0 417
Question Norman W. Freeman · Mar 9, 2023 How to get a list of all classes of a given namespace ? I use the following query to get a list of all classes : #InterSystems IRIS 0 1 1 725
Question Norman W. Freeman · Feb 15, 2023 What is "~pointer" in globals, is there a way to see what is behind ? Out of curiosity, I was looking in ^ROUTINE global to see how routines are stored internally. I found out that lot of nodes are displaying "~pointer" as associated value (eg: instead of a string). What are those pointers ? My guess is that it references some cache internal structure (eg: some nodes inside a B-Tree). Is there a easily way to see what is behind ? Are pointers useful for user globals or is this something purely internal to Cache database ? #Databases #Globals #Caché #InterSystems IRIS 0 1 0 262
Question Norman W. Freeman · Feb 8, 2023 Why are "Exclusive_e->Delock" needed when saving persistent objects in a transaction ? (and can they be avoided) I use the following code (which is a simplified version of what happen on a server) : #Database Transaction Processing #InterSystems IRIS 0 6 0 296
Question Norman W. Freeman · Jan 19, 2023 Why is node ordering different between two environments ? I have noticed that the way the nodes are ordered is different between 2 different environments. If I create the following global : #Globals #Caché #InterSystems IRIS 0 5 0 234
Question Norman W. Freeman · Nov 29, 2022 Is there a way to modify %SYS classes for debugging purposes ? I got an error that occurs inside %CSP.Broker. That class is located inside %SYS namespace. I tried lot of things (including checking system logs) but ultimately what would really help would be to be able to modify that class to add my own logs into it. If I try to modify it, I got this error message: Item '%CSP.Broker' is mapped from a database that you do no have write permissions on. #InterSystems IRIS 0 5 0 517
Question Norman W. Freeman · Oct 12, 2022 How to check if on a file on a network shared folder is available/exists with a timeout ? I use the following code to check the last modified date of file which is on a network shared folder (eg: "\\someserver\subfolder\foobar.txt") #InterSystems IRIS 0 2 0 813
Question Norman W. Freeman · Jul 29, 2022 Is there an equivalent to the Business Intelligence (BI) classes in IRIS ? I have migrated one project from CACHE to IRIS that contains lot of classes that inherit from BI (Business Intelligence). Usually it looks like this : #InterSystems IRIS 0 3 1 541
Question Norman W. Freeman · Jul 1, 2022 Is there a way to use IRIS from command line (eg: batch file), the same way as it can be done in CACHE ? We recently migrated to IRIS. Before, the CACHE.EXE executable could be invoked from a batch file directly : C:\InterSystems\Cache\bin\cache.exe -s C:\InterSystems\Cache\mgr -U %SYS This will display the following in console : Node: DESKTOP-8H4B321, Instance: CACHE USER> Additionally, the pipe instruction can be used to redirect some commands directly echo write 50 | C:\InterSystems\Cache\bin\cache.exe -s C:\InterSystems\Cache\mgr -U %SYS #InterSystems IRIS 0 5 0 603
Question Norman W. Freeman · Jun 28, 2022 Is it possible to call a method in a specific namespace without changing current namespace ? I want to call a method which is in %SYS namespace : #Caché 0 4 0 646
Question Norman W. Freeman · Jan 26, 2022 How to get current date and time in YYYYMMDDHHMMSS format ? I would like to get current date and time in this format : YYYYMMDDHHMMSS (eg: 20220126155704) Simplest way to do that I found so far is this : $translate($zdatetime($horolog,8,1), " :", "") It works, but it's not that great (I would like to avoid string manipulation) Is there a better, cleaner way ? #Caché 0 9 0 2.6K
Question Norman W. Freeman · Jan 17, 2022 How to create a toolbar button in Cache Studio that trigger a custom command after click ? I would like to create a toolbar button in Cache Studio. After clicking on it, it would run a custom command (eg: to execute a routine that will clean a global). I took a look at dialog that is shown after right clicking on a toolbar in Studio, then choosing "Customize" but AFAIK there is nothing there that allow such a thing. I know it's possible to customize menu items by extending %Studio.SourceControl.Base class, is there something similar for toolbars ? Here is some base code example (based on Danny Wijnschenk answer) : #Studio #Caché 0 6 0 327
Question Norman W. Freeman · Oct 29, 2021 How to migrate a CACHE database and code to IRIS ? I have a workstation with a CACHE instance up and running. On that same workstation there is also an instance of IRIS (fresh install). I would like to migrate manually the CACHE database to IRIS (ideally, all globals, routines and classes). What I tried is to copy C:\InterSystems\Cache\mgr\CACHE.DAT to C:\InterSystems\IRIS\mgr\IRIS.DAT (after shutting down both instances) but it does not work. I got the following message : (112) The service for the IRIS instance did not start. #Databases #Caché #InterSystems IRIS 0 6 2 1.3K
Question Norman W. Freeman · Oct 8, 2021 Starting a new job with "job" command take more time than expected I use the following code to start a start a job : Class MyClass Extends (...) { ClassMethod Foo() { job $CLASSMETHOD("MyClass","MyMethod") //take forever depending hardware } ClassMethod MyMethod() { //do database related stuff } } On local environment, calling Foo() is instantaneous (a few ms). On production/test servers (which have much better hardware than local) calling this function is slow and take between 200 ms to 800 ms. Obviously starting a new job with "job" command take lot of time on those environments. #Performance #Caché 0 3 0 313
Question Norman W. Freeman · Oct 5, 2021 Could caché database encryption have an noticeable impact on performance ? I would like to know if an encrypted caché database can run significantly slower than a normal "unencrypted" database, in a way that is noticeable to the end user (e.g. slower response time for most pages, especially the ones that rely on read/writing to globals). I searched in Intersystems knowledge base and couldn't find anything related. I'm looking for possible before/after benchmarks. #Databases #Encryption #Performance #Caché 0 3 0 319
Question Norman W. Freeman · Aug 27, 2021 How to iterate a local array with $QUERY() in a job ? In Caché, it's possible to iterate a local array using $QUERY() : set a("foo") = 50 set a("bar") = 30 set key = "a" for { set key = $QUERY(@key) quit:key="" write key_" = "_@key } This code works perfectly, unless it's called in a job (eg: a routine called by the JOB command). #Globals #Caché 1 3 1 390
Question Norman W. Freeman · Aug 19, 2021 What is the maximum size of the URI of a request and how to increase it ? I have a CSP page that throw a "414 error - Request-URI Too Long" when I put lot of text (eg : 10000 characters) into a field of a submitted form. The form is submitted using POST method. Based on some experiments I made, it seems the max size of a URL is around 8200 characters. What is the official limit, and is there a way to increase it ? I searched in the documentation but couldn't find anything. #CSP #Caché 1 5 0 3.7K
Question Norman W. Freeman · May 26, 2021 How to add a try / catch block inside a routine that contains indentation with "." characters ? I have some code in a mac routine that use indentation and the "." character : IF condition1 DO .WRITE YCR,... .WRITE YCR,... .WRITE YCR,... I would like to add a try / catch block between the write statements.I can't refactor the whole code and use indentation with curly braces instead (there is too much code, not written by me) I have tried the following but it does not work (it compiles, but code stop running right before the try keyword) #Error Handling #Caché 0 2 0 326
Question Norman W. Freeman · Dec 24, 2020 Is there a way to automatically remove some specific characters from the response of a web service ? I have implemented a web service that inherit from %SOAP.WebService It exposes classes with string properties : #Databases #XML #Caché 0 1 0 602