Dmitry Maslennikov · Aug 26, 2023 go to post

That means improper configuration for the webserver. Anything that goes through a CSP application goes this way.

Properly configured webserver, should take care of static files without IRIS, just process them itself.

In this case, IRIS will not even know about requests to the static files.

Remember, that you should not use a private Webserver in the production at all, and have to have something manually configured. And any newest IRIS non-community versions since 2023.2 will not even install a private webserver anymore unless the IRIS is updated from some previous version.

Dmitry Maslennikov · Aug 24, 2023 go to post

Right, it's possible to make it similar to other Database connectors, and I suppose even add it to the list of available connectors. So, anyone will be able to use it, with any IRIS instance, but only SQL way, without the need for any development on the IRIS side.

Dmitry Maslennikov · Aug 24, 2023 go to post

IRIS containers will only be tagged with the year and release, such as “2023.2”

What about images on Docker Hub?

No latest-cd, no 2023.2, no multi-arch images?

In some cases, when I need speed of downloading images I preferer using this place

Dmitry Maslennikov · Aug 24, 2023 go to post

I don't think so, but I don't see why it cannot be developed anyway. I could probably develop it if you need it.

Dmitry Maslennikov · Aug 12, 2023 go to post

I did not find there anything, that I would recommend anybody at all. 

  • compose version, uses Durable SYS, not what I would like to recommend
  • plain Dockerfile, too much garbage, not sure how it is working though
Dmitry Maslennikov · Aug 11, 2023 go to post

Fortunately, Community Images has not been affected, yet. But who knows for how long.

But, looks like we need something user-friendly than official WebGateway images.

And I'd like to be able to easily switch between Community and Enterprise in any community project. But It's kind of tricky now, have to keep the version in mind.

you can use $zstrip, where action *P, * is for any place, and P any punctuation

for example

USER>write $zstrip("before!@#$%^&*()_+\-=\[\]{};':""\\|,.<>\/?after", "*P")
beforeafter

And if you just want to check if the string contains any punctuations, you can compare if the original string does not equal the same after $zstrip.

if you wish to use regexp, you can use $match

USER>write $match(".!@", "^[!@#$%^&*()_+\-=\[\]{};':""\\|,.<>\/?]*$")
1

Yeah, this module regexp, supports recursive, but it's not out of the box solution, and requires to be installed first, unfortunately

NodeJS support for IRIS exists, but too limited, the new version is still on the way, and I have no idea when it comes

But, as I see this thing is a testing engine, what exactly do you want to see from this connectivity with IRIS?

Probably it does not require anything specifically for IRIS, and can be used in a common way

Dmitry Maslennikov · Jul 28, 2023 go to post

Python

ClassMethod IsValid(w As %String) As %Boolean [ Language = python ]
{
import re;p=r'\([^()]*\)'
while re.search(p,w):w=re.sub(p,'',w)
return len(w)==0
}
Dmitry Maslennikov · Jul 27, 2023 go to post

It's quite tricky to find this page. And I tried, to go through a help page from Management Portal, to find any details, about which version is supported. Anyway, the error seems useless, while it could mention the supported versions too.

Dmitry Maslennikov · Jul 26, 2023 go to post

While my global is quite simple, and it's size is about 1.1 GB, or around 18 bytes per record

USER>do ##class(%GlobalEdit).GetGlobalSize("/usr/irissys/mgr/user","YYY",.all,.used)

USER>zw all
all=1109

USER>w all*1024*1024/65000000
17.89031975384615385

After restarting, with a cold cache, I got 17 seconds

USER>s sub="", count = 0, ts = $zh for { set sub = $Order(^YYY(sub)) quit:sub=""  set count = count + 1 } write !,"elapsed: ", $zh-ts 

elapsed: 16.994676

So, my disk can read around 65MB per sec

Dmitry Maslennikov · Jul 26, 2023 go to post

If your enterprise still uses mechanical disks, that's still a factor that has to be considered

All the blocks required to be read to get through the list can be placed all around the disk/s. And it takes time. On a live system, with many changes, and when a lot of different data is stored, the next block can be far from the previous one. So, on mechanical discs, defragmentation is matter, and may slow the speed.

I don't know the character of your data, but if you have a lot of data, stored in the globals, it will require to read much more blocks, to even just count the items.

And most probably the easiest way to solve it, is just to use bitmap index.

Dmitry Maslennikov · Jul 26, 2023 go to post

If you wish to have a conditional filter, then you can use it this way

SELECT * FROM SomeTable
WHERE (:FilterName   = '' OR Name   LIKE :FilterName)
  AND (:FilterValue1 = '' OR Value1 LIKE :FilterValue1)
  AND (:FilterValue2 = '' OR Value2 LIKE :FilterValue2)
Dmitry Maslennikov · Jul 26, 2023 go to post

As I mentioned above, it's a complicated question, and to be sure what's really happening, and why the speed is so slow, it requires a look deeply into the database file and into hardware.

Dmitry Maslennikov · Jul 26, 2023 go to post

110 minutes, it seems impossible, or, it's something way too wrong

USER>set ts = $zh f i=1:1:65000000 { set ^YYY(i)="somedata" } write !,"elapsed: ", $zh-ts 

elapsed: 11.126631

USER>s sub="", count = 0, ts = $zh for { set sub = $Order(^YYY(sub)) quit:sub=""  set count = count + 1 } write !,"elapsed: ", $zh-ts 

elapsed: 9.549079

Here result in seconds

Yes, for sure, my example is too simple, and too far from any real situation. 

And there are multiple issues that may happen with your data, it can be how it is stored, where it is stored, how much data in values. And it's difficult to suggest how to check it

Have a look at my series of articles about globals in the database, just for information, it may help understand something, what may go wrong

In any case, there is a right way to count objects, without counting all of them this way. Is using bitmap index, which you can use even if you have own storage, and do not use objects yet. You still able to build own bitmap index, and count items by this index will be at least 64000 times faster, whereas 64000 is just chunk size for bitmap, and speed will vary depends if you don't have much empty spaces between id's, which needs to be numeric

Dmitry Maslennikov · Jul 18, 2023 go to post

What is the actual concern, then?

From my experience on different systems with highload, I did not see effects, that could point to think about it. 

Dmitry Maslennikov · Jul 18, 2023 go to post

Python may help

Class dc.Demo
{

ClassMethod ValidateJSON(data As %String = "") As %Status [ Language = python ]
{
import iris
import json
from json import JSONDecodeError

try:
    json.loads(data)
    return iris.system.Status.OK()
except JSONDecodeError as ex:
    return iris.system.Status.Error(5001, f"{ex.msg}: line {ex.lineno} column {ex.colno} (char {ex.pos})")
except Exception as ex:
    return iris.system.Status.Error(5001, repr(ex))
}

}

And result

USER>set status = ##class(dc.Demo).ValidateJSON("{""aa"":123 ""name"": ""value""}") do:'status $system.OBJ.DisplayError(status) 
ERROR #5001: Expecting ',' delimiter: line 1 column 11 (char 10)

USER>set status = ##class(dc.Demo).ValidateJSON("{""aa"": true, ") do:'status $system.OBJ.DisplayError(status) 
ERROR #5001: Expecting property name enclosed in double quotes: line 1 column 14 (char 13)

USER>set status = ##class(dc.Demo).ValidateJSON("{""aa"": wrong ") do:'status $system.OBJ.DisplayError(status) 
ERROR #5001: Expecting value: line 1 column 8 (char 7)

USER>set status = ##class(dc.Demo).ValidateJSON("{""aa"": true}") do:'status $system.OBJ.DisplayError(status)
Dmitry Maslennikov · Jul 17, 2023 go to post

try this

set objectContext = ##class(Some.Class).%OpenId(123)
write ##class(Ens.Rule.Definition).EvaluateRules("Rule.ClassName",,objectContext)
Dmitry Maslennikov · Jul 14, 2023 go to post

The error on screen shot saying Access Denied, why do you think it's Timeout?

Check the amount of connection available for you, and how much connection you do

Dmitry Maslennikov · Jul 13, 2023 go to post

Not so much magic in it, if you already know how to read it, the content of XData is just a Stream, which can be used both ways. Just Write to it, and %Save it. And you will probably need to compile the class

Class Demo.Test
{

XData OpenAPI [ MimeType = application/json ]
{
}

ClassMethod Update()
{
    set xdata = ##class(%Dictionary.XDataDefinition).IDKEYOpen($ClassName(), "OpenAPI")
    do xdata.Data.Write("{}")
    do xdata.%Save()
}

}

In VSCode, the content of XData will not appear after that, because it happened on the server, and VSCode will not see the changes, you'll need to export it manually