This is not what the customer wants. He have a use case where he only needs to be able to create and decompress raw DEFLATE-compressed content.

What's the use case?

 

Also, why use node instead of just calling zlib directly:

zlib deflate string ?level?

I'm not talking about callout here (which could also be another valid approach) but just direct $zf(-1, "zlib ...") call

Can you please provide example of OnValidate?

Here's what I tried and it does not work:

Class Test.InboundAdapter Extends Ens.InboundAdapter
{

/// Stream class to store message body. Leave empty to use strings.
Property BodyClass As %Dictionary.CacheClassname;

Parameter SETTINGS = "BodyClass:Basic";

/// Does not get called.
Method OnValidate(args...)
{
    merge ^b = args
    quit $$$ERROR($$$GeneralError, "Some error")
}

/// Runtime only. And $username is always _Ensemble. ##super() is in Ens.Settings
Method AssignOneSetting(pProperty As %String, pValue As %String, pName As %String) As %Status
{
    set ^c($i(^c)) = $lb(pProperty, pValue, pName, $username)
    quit ##super(pProperty, pValue, pName)
}
}

You can give user %EnsRole_Operator role:
Role for operation staff managing the day-to-day status of a particular production. Users assigned to this role have the Read permission on the current configuration to determine what settings and code are in effect, but do not have permissions to modify the configuration. Operations staff may start and stop interfaces, and may start and stop the production. They do not have access to the contents of messages, but may resend messages which cause issues. Operators may view queue and job information, and may inspect the settings for purges, alerts, credentials, and lookup tables.

Other approach would be readonly access the tables of the Ens.Config package.

slash macro:

#if $$$isWINDOWS
///
    #define slash "\"
#else
///
    #define slash "/"
#endIf

That said, consider using %File API  to work with file names. I usually extract "storage directory" as an application-wide setting (normalized and validated on change) and just add a file name. This way user code can ignore most OS path differences.

SQL way (query docs, 1 means BS):

SELECT *
FROM Ens_Config.Production_EnumerateConfigItems('Your.Production', 1)

Object way:

set rs = ##class(Ens.Config.Production).EnumerateConfigItemsFunc("Your.Production", 1)
do rs.%Display()

Constants for Business Host Type (defined in EnsConstants.inc):

#define eHostTypeUnknown   0
#define eHostTypeService   1
#define eHostTypeProcess   2
#define eHostTypeOperation 3
#define eHostTypeActor     4

When talking about speed, one of the most important questions is what exactly do you need to speed up? You need to determine:

  • what queries are the most popular
  • what queries take the most time

to fix it. Some ways to fix performance are (easy to hard):

  • Add indices
  • Change classes
  • Change application architecture

Because in your case I see at least two request types which require different actions to speed them up:

  • Get last X changes
  • Get last X modified subjects