Eduard Lebedyuk · Mar 4, 2020 go to post

Great article, Mark!

I have a few notes and questions:

1. Here's a brief comparison of different storage categories:

  • Intel® Optane™ DC Persistent Memory has read throughput of 6.8 GB/s and write throughput 1.85 GB/s (source).
  • Intel® Optane™ SSD has read throughput of 2.5 GB/s and write throughputof 2.2 GB/s at (source).
  • Modern DDR4 RAM has read throughput of ~25 GB/s.

While I certainly see the appeal of DC Persistent Memory if we need more memory than RAM can provide, is it useful on smaller scale? Say I have a few hundred gigabytes of indices I need to keep in global buffer and be able to read-access fast. Would plain DDR4 RAM be better? Costs seem comparable and read throughputof 25 Gb/s seems considerably better.

2. What RAM was used in a Server #1 configuration?

3. Why are there different CPUs between servers?

4. Workload link does not work.

Eduard Lebedyuk · Feb 28, 2020 go to post

I'd recommend:

  1. Write LoadStream method with the same signature which logs all passed arguments.
  2. Call it from .Net
  3. Check what's actually gets passed inside.
Eduard Lebedyuk · Feb 28, 2020 go to post

Use byte[] to pass streams. So:

byte[] bytes = Encoding.Default.GetBytes(txt);
...
var parameter = new object[]
        {
            bytes,
            qspec,  
            errorlog,
            loadedItems
        };
Eduard Lebedyuk · Feb 27, 2020 go to post

That's a fairly recent version of Python. Not sure if old Python Binding works with it. I can recommend you to:

Eduard Lebedyuk · Feb 27, 2020 go to post

As to Supported Server Platforms, it might be even Ubuntu 18.04 LTS for x86-64 rather than 16.04.  

Question was about Ensemble initially which supports 16.04. InterSystems IRIS Supports 18.04.

And what about RHEL 8? Which IRIS version will be supported under this OS?  

Asking @Andreas Dieckow to comment.

Eduard Lebedyuk · Feb 27, 2020 go to post

Any exceptions on stack?

import sys, traceback
traceback.format_exception(sys.last_type, sys.last_value, sys.last_traceback)

Can you run SELECT 1 query?

Eduard Lebedyuk · Feb 26, 2020 go to post

To answer that, before query is compiled all arguments are parametrized:

like 'text%'

becomes

like ?

so we can't really replace LIKE with %STARTSWITH on code generation step (there's a brackets argument specification I suppose).

Eduard Lebedyuk · Feb 25, 2020 go to post

Properties inherited from % classes and properties starting with %% are skipped in DTL.

Multidimensional properties are skipped in DTL.

Found official (but experimental - use at your own risk) way.

Your class should extend Ens.GenericObject and implement %EnumerateProperties method.

Documentation.

Eduard Lebedyuk · Feb 25, 2020 go to post

Share a code sample please?

One other thing: both methods should be either methods or classmethods.

Eduard Lebedyuk · Feb 24, 2020 go to post

Sure, you can access it as:

process.AlertGroups

process is a special variable, holding the current instance of the BPL process.

Eduard Lebedyuk · Feb 23, 2020 go to post

Load method writes to the current device which is a big no in the Native API ecosystem. Add flags to suppress all output:

var qspec = "/displaylog=0 /displayerror=0";  
Eduard Lebedyuk · Feb 22, 2020 go to post

Supported platforms for Ensemble are listed here, for InterSystems IRIS here.

If you don't want to use RHEL you can choose between:

  • Ubuntu 16.04 LTS
  • Oracle 7
  • SUSE Linux Enterprise Server 12

I prefer Ubuntu.

Eduard Lebedyuk · Feb 20, 2020 go to post

1 sql request per property, or only one "big" sql request ?

How are you planning on merging distinct requests? One case I've seen where you need something like this is when you want to get a valid subset of filter values (which would return 1+ rows) for each next filter, but in the end all filters are still combined into one query.

You need to decide on:

  • what predicates are allowed (=, %STARTSWITH, <, >, LIKE, IN, ISNULL, BETWEEN)
  • what logic operations are allowed (OR, AND, NOT)
  • are nesting and brackets allowed
  • is it free form (auto constructed from metadata) or fixed (from a pre-set list of properties).

After that on a client you construct filter object, validate and parse it on a server and execute the query.

If you're not satisfied with performance, server-side part can be tweaked without modifying the client.

what's the disadvantage of using lot of indexes ?

INSERTS/UPDATES are slower, more space is needed.

Eduard Lebedyuk · Feb 19, 2020 go to post

There could be two issues:

  • Race condition
  • SQL error

For race condition you need to compare the time when the query is executed to the time when Workflow objects are created.

For sql construct query as a string and trace that.

Eduard Lebedyuk · Feb 18, 2020 go to post

PartoNo is present thrice in your XML so you should correspondingly set

PropertyPartoNo As %String;

  three times. One time it also an attribute so add XMLPROJECTION="attribute". Docs.

Eduard Lebedyuk · Feb 17, 2020 go to post

You can replace

do myStream.Rewind()
set len = 32000
While (len > -1) {
    set sRead = myStream.Read(.len)
    do httpRequest.EntityBody.Write(sRead)
}

With

set sc = httpRequest.EntityBody.CopyFrom(myStream)
Eduard Lebedyuk · Feb 16, 2020 go to post

Tasks contain session reference so you can simplify your query to:

SELECT
TaskStatus_Request As ID
FROM EnsLib_Workflow.TaskResponse
WHERE TaskStatus_SessionId = ?

For debugging: add hang 1 before executing SQL. What happens?

What do you want to do with ID?

Eduard Lebedyuk · Feb 16, 2020 go to post

im still not able access all values for example :  

XML import must end successfully before you can access parsed object.

As the error states, do you have TruLaser.Order class and is it compiled?