Eduard Lebedyuk · Apr 9, 2019 go to post

Is it one node or known nodes which can contain characters for escaping?

If so custom datatype may be a better solution.

Eduard Lebedyuk · Apr 9, 2019 go to post

Can you please provide an example?

I'm aware only of %XML.PropertyParameters but there's nothing but parameters.

Eduard Lebedyuk · Apr 9, 2019 go to post

Here's what I've coded.

Property:

Class Test.String Extends %String
{

ClassMethod StorageToLogical(%val As %String) As %String [ CodeMode = objectgenerator ]
{
	set property = $g(%member)
	do %code.WriteLine($c(9) _ "Quit """ _ property _ """")
	quit $$$OK
}

ClassMethod LogicalToStorage(%val As %String) As %String [ CodeMode = objectgenerator ]
{
	set property = $g(%member)
	do %code.WriteLine($c(9) _ "Quit """ _ property _ """")
	quit $$$OK
}

}

Class:

Class Test.Obj Extends %RegisteredObject
{

Property prop As Test.String;

}

However reference to property does not return anything (expected to return property name):

w obj.prop
zw obj.prop
>""

Any ideas?

Eduard Lebedyuk · Apr 8, 2019 go to post

Comment out  OnGetConnections method and restart the service.

Do you still get errors?

Eduard Lebedyuk · Apr 6, 2019 go to post

You can use DATEDIFF:

set tx = $ZDT($H,3,1,3)
hang 5
write $SYSTEM.SQL.DATEDIFF("hour", $ZDT($H,3,1,3), tx)
>0
write $SYSTEM.SQL.DATEDIFF("second", $ZDT($H,3,1,3), tx)
>-6
Eduard Lebedyuk · Apr 6, 2019 go to post

Good article!

Please post docker-compose definition as a text.

There's a code formatting style too

Eduard Lebedyuk · Apr 5, 2019 go to post

I would like to advise against this course of action, there are several reasons:

  1. Ensemble messages should be as small as possible. If you can pass id only, pass id only, etc. Minimizing message size keeps production efficient.
  2. ResultSet does not contain the data itself, it's more like a compiled instructions on how to get the data. Only when you're calling Next method the data is actually loaded into memory
  3. Results of SQL query should be immediately acted upon, because the older the SQL results, the more they differ with reality. it is best to pass parameters and execute query in-place.

If you want it for debugging purposes you can add a trace event which would store ids only for example, but if you actually need to pass a set of results between different business hosts it may be beneficial to you to rethink the production architecture.

Here's some questions:

  1. What business hosts do you have?
  2. What data do you pass between different hosts?
  3. Can you pass parameters between hosts and execute a query on a target host?
  4. Can you pass not a set between hosts, but rather elements individually?
Eduard Lebedyuk · Apr 3, 2019 go to post

Thanks, Aleksandar!

So HTTPS/WebServices/WebSockets are not widely supported?

I was just reading the standard spec and it was kind of implying that HTTPS or WebSockets are the way.

Eduard Lebedyuk · Apr 3, 2019 go to post

Can you explain a bit what do you want?

Do you want to execute some query and pass all results in it from one process to another in a message?

Eduard Lebedyuk · Apr 2, 2019 go to post

Some options:

> - Utilize another language or library that has methods to parse the data into an Excel file (https://stackoverflow.com/questions/17684610/python-convert-csv-to-xlsx).

If you want to use Python from Cache, check PythonGateway.

Eduard Lebedyuk · Mar 30, 2019 go to post

It's actually a wrapper for the same idea - if HeadOfQueue is checked, the resend message is inserted with a higher priority than the highest priority existing queue message. It can be seen in EnQueue method of Ens.Queue class.

Eduard Lebedyuk · Mar 29, 2019 go to post

Mimedata is subscripted by name and index.

So in your case:

set name = "BulkFileUpload"
for i=1:1:%request.CountMimeData(name)
    set mimeData = %request.GetMimeData(name, , i)
}

On each iteration mimeData variable would hold the stream with one next mimedata.

%request is simply an object of %CSP.Request class, check the docs or code to know how it works.

Additionally you can use this snippet to see what's inside %request, %response and %session objects:

set %response.ContentType = "html"
do ##class(%CSP.Utils).DisplayAllObjects()
quit $$$OK
Eduard Lebedyuk · Mar 29, 2019 go to post

<FILEFULL>  - Caché attempted to allocate a disk block for more global data or routine storage, but the attempt failed because the Caché database is full and could not be expanded.

Affected db is /hs-connect-hom/db/BPINTEGRADEV-GLB.

Eduard Lebedyuk · Mar 28, 2019 go to post

Bitmap indices maintain one node per each chunk of 64 000 id's, if at least one id from that range exists. So random integer ids can slow bitmaps down. On the other hand if there are two consecutive but spread (i.e 1..1000 and 100000...110000) id sequences it would generate just 2 global nodes so everything should be ok in that scenario.

Check index global in various scenarios:

 

Example.Bitmap

Eduard Lebedyuk · Mar 28, 2019 go to post

Eduard, are you referring to the Priority property of the Ens.MessageHeader class?

Yes.

That seems to be used exclusively for marking the message for Async vs. Synchronous delivery.

These priorities are available:

#define eMessagePriorityHighSync 1
#define eMessagePrioritySync     2
#define eMessagePrioritySimSync  4
#define eMessagePriorityAsync    6

Sync by default is 2, so specifying priority 1 may indeed help. Cursory glance at Ens.Queue indicates that messages with priority 1 would be processed first.

Eduard Lebedyuk · Mar 28, 2019 go to post

While messages do have priority, it seems to be internal property. You can try to check it on a dev system but I'd advise against changing it on a production system.

The easiest way is to have two operations - one for priority source, another for everything else and route messages to one or another operation.

Eduard Lebedyuk · Mar 27, 2019 go to post

But this also means that you can't ship the whole vendor copy of the global as you will overwrite the onsite ID counter node.

You can! When you load globals specify /mergeglobal flag to merge the global with existing data instead of overwriting it:

set sc = $system.OBJ.Load("global.xml", "/mergeglobal=1")

seed the ID counter at the site to a really high number

Bitmap indices would really slow down from that.