go to post Eduard Lebedyuk · May 12, 2020 $STORAGE is a special variable which contains the number of bytes available for a current process. After it hits zero you get STORE error. You can profile your code to see which part leaks memory. Small example: write $STORAGE >268326112 set i=1 write $STORAGE >268326104 kill i write $STORAGE >268326112 Check that: $storage before and after EvaluateClone call is the same $storage on each loop cycle is the same Another approach is throwing/catching and logging an exception and checking what's available in each frame. do clone.Children.RemoveAt(key) // update clone RemoveAt returns oref, maybe you need to kill it. I'm wondering if IS has a java-like garbage collector (as in "the object is automatically destroyed"), and if so, is this keeping up with the clone construction and killing, over a 200k+ loop? Is it an immediate thing, or is there a garbage collector crawling around looking for un-referenced objects? InterSystems products have automatic garbage collector. I'm not sure on the specifics. Calling @Dan Pasco.
go to post Eduard Lebedyuk · May 12, 2020 You can use Java Gateway and this project. On a first overview this looks like a container specification with standard crypto algorithms. So you can definitely implement it in InterSystems IRIS. I have done Xades implementation for InterSystems IRIS and it's doable (500 sloc total).
go to post Eduard Lebedyuk · May 11, 2020 2019.1.1 supports IAM. 2019.1.0 does not. So no need to upgrade. Docs: Web Application management User Management
go to post Eduard Lebedyuk · May 9, 2020 Idea for contestants. Julyter Notebooks kernel for InterSystems ObjectScript. Recently I developed bidirectional integration for Jupyter Notebooks. It allows you to create intelligent Business Processes with Python activities. Here's the code (it uses Native API for Python and there's less than a 1000 sloc in the whole integration). Here's some screenshots: However, as you see currently only BPLs with Python are supported. The idea for the app is simple - to do the reverse - add the ability for Julyter Notebooks to execute InterSystems ObjectScript code. Why? It's a great tool for quick prototyping and demos! How? Using Native API develop a wrapper kernel for InterSystems ObjectScript. Essentially all you need to do is to execute arbitrary string of code and return result. Check WebTerminal source code (by @Nikita Savchenko) to see how a similar application works. Docs: Wrapper Kernel docs List of Kernel Implementations More docs (all possible approaches)
go to post Eduard Lebedyuk · May 4, 2020 As second argument defaults to 1 and third can be skipped you can write just: if $e(chunk)=""""{ }
go to post Eduard Lebedyuk · Apr 30, 2020 There's a workaround for import: Set dynObj = {}.%FromJSON(jsonStream) Set hexStream = dynObj.%Get("hex_stream",,"stream") Set base64Stream = dynObj.%Get("base64_stream",,"stream") Set dynObj."hex_stream" = "" Set dynObj."base64_stream" = "" Do dynObj.%Remove("hex_stream") Do dynObj.%Remove("base64_stream") Set newObject = ..%New() Set newObject.HexStream = hexStream Set newObject.Base64Stream = base64Stream Set tSC = newObject.%JSONImport(dynObj)
go to post Eduard Lebedyuk · Apr 30, 2020 Try $$$TRACE("LastChecked value is: '" _ LastChecked _ "', compare: " _ (LastChecked="undefined"))
go to post Eduard Lebedyuk · Apr 30, 2020 You can add this to your code $$$TRACE("LastChecked value is: '" _ LastChecked _ "'") to get LastChecked value.
go to post Eduard Lebedyuk · Apr 30, 2020 Does not work for me: d ##class(dc.test).Test() ^dc.testD=5 ^dc.testD=5 PYTHON>w $zv IRIS for Windows (x86-64) 2020.1 (Build 215U) Mon Mar 30 2020 20:14:33 EDT
go to post Eduard Lebedyuk · Apr 29, 2020 Without reports suggested by other users there's not much I can tell you. What are global buffer sizes on prod/dev machines? Preheat global cache by looping over data global and compare the timings after that. List of utilities/reports that should help you: pButtons – all info you might need, open the ticket with WRC with this info. mgstat –main metrics PERFMON – get most used globals/routines GLOSTAT – system metrics %SYS.MONLBL – line by line code profiling GLOBUFF – global buffer analysis Check this series of articles by @Murray Oldfield.
go to post Eduard Lebedyuk · Apr 29, 2020 it's composite primary key, and I have good reasons for it. Which are? Can you compare the performance to index opening: s p=##class(digi.packet).IDKEYOpen("packet", 5237)
go to post Eduard Lebedyuk · Apr 29, 2020 Any particular reason your id is not an integer? I'd think it's a parent-child relationship but why a parent id is a string?
go to post Eduard Lebedyuk · Apr 29, 2020 but an approach could be with one client request end it, and return a new one What for? Ending the session means the client exited. You can add additional user supplied cookie(s) and check/modify/delete them as you wish. On every request even. The other option as mentioned is to encript trafic and therefore the cookie can no longer be used. Cookies absolutely can be used with encrypted traffic. HTTP/HTTPS makes no difference for cookies sent by a browser.
go to post Eduard Lebedyuk · Apr 29, 2020 That is right, but as long as the cookie session timeout is valid (let's say 60 seconds) anybody that intercepts that cookie is effectively authenticated as long as the timeout is valid. Only as long as they share the same remote address. HTTPS offers additional protection. Really if someone can decode your HTTPS traffic to get the cookie you have a bigger problem. Isn't there any way of invalidating a sessionID manually and creating a new one? do %session.Logout() Ends the session. Next request starts the new session.
go to post Eduard Lebedyuk · Apr 28, 2020 I don't know if it's officially supported.You can ask in WRC for support/help.Back to my previous idea, you can check if connection string for external DBMS supports Query Timeout and edit URL parameter in INC0001 gateway connection accordingly:
go to post Eduard Lebedyuk · Apr 27, 2020 Check StatementAttrs setting. It's a set of SQL Statement Attribute Options of the form attr:val,attr:val,...Do this in your Business Operation's OnInit method: Set ..Adapter.StatementAttrs="QueryTimeout:12"