Eduard Lebedyuk · Jul 2, 2021 go to post

I'm authorized in containers.intersystems.com in docker. Is that not enough? Interesting.

Eduard Lebedyuk · Jul 2, 2021 go to post

What happened to intersystems/arbiter? I  can't find it in containers.intersystems.com registry:

>docker-ls.exe repositories  --registry https://containers.intersystems.com
requesting list . done
repositories:
- intersystems/iris-community
- intersystems/iris-community-arm64
- intersystems/iris-ml-community
- intersystems/irishealth-aa-community
- intersystems/irishealth-community
- intersystems/irishealth-community-arm64
- intersystems/irishealth-ml-community
- intersystems/sam

However, a direct pull succeeds:

docker pull containers.intersystems.com/intersystems/arbiter:2021.1.0.215.0
2021.1.0.215.0: Pulling from intersystems/arbiter
f22ccc0b8772: Already exists
3cf8fb62ba5f: Already exists
e80c964ece6a: Already exists
cc40d98799c0: Pull complete
4179ff34652c: Pull complete
70ed38c703cc: Pull complete
ab1c2108b984: Pull complete
758289e88757: Pull complete
Digest: sha256:51c31749251bea1ab8019a669873fd33efa6020898dd4b1749a247c264448592
Status: Downloaded newer image for containers.intersystems.com/intersystems/arbiter:2021.1.0.215.0
containers.intersystems.com/intersystems/arbiter:2021.1.0.215.0

@Luca Ravazzolo?
 

Eduard Lebedyuk · Jun 28, 2021 go to post

The value has reached 7gb and now it has become a problem.

So, how's the memory consumption now?

Eduard Lebedyuk · Jun 24, 2021 go to post

Is there a way to do the same but for the query text and documents, and not document and documents?

Eduard Lebedyuk · Jun 24, 2021 go to post

regarding your comment around moving JSON parsing to BS, is there a reason for doing so?  

In general it might be preferable to move from less structured data (JSON) to more structured data (Objects) as fast and as early in your processing pipeline as possible.

The reasons for it are varied but include:

  • Ability to query fields via SQL
  • Object access with defined properties anywhere downstream
  • Ability to build analytics on that data
  • Fail fast (in the case of parsing errors)

So in your case I would have structured it like this:

  • Business Service accepts JSON and parses it into one of the several classes
  • Business Service calls Business Routing Rule where target Business Process is determined and the message is sent
  • Business Process does not have parsing logic and just processes messages

It's also advantageous to move all parsing logic is in one place (Business Service) as it minimizes the amount of code written and frees Business Processes from the more low-level technical tasks which usually obfuscate the more high-level intent of a Business Process.

Eduard Lebedyuk · Jun 23, 2021 go to post

Is mapi.exchange.msg.Communication persistent?

That said, I'd move JSON parsing to a BS, so mapi.exchange.msg.Communication becomes a request.

Eduard Lebedyuk · Jun 23, 2021 go to post

Here are some ideas for contestants:

  1. New ML language. Interoperability with numerical computational languages or even CASes proper are great and offer the freedom of choice. Furthermore, these math-oriented languages allow faster problem search/space traversal than more generalized languages such as Python. Several classes of supporting ML problems can be solved with them. Callout interface makes implementation process easy (reference community implementations: PythonGateway, RGateway, JuliaGateway). Suggested languages: Octave, Scilab
  2. New showcases in IoT, Real-Time predictions, RPA. Convergent Analytics group provides a lot of starting templates in these fields - as InterSystems IRIS capabilities are an especially good fit for them. I'm always interested in more examples, especially real-life examples of machine learning.
  3. Data Deduplication solutions. Do you have a dataset with a lot of dirty data and know how to clean it? Great. Make a showcase out of it.
  4. Reinforcement learning showcases. Examples of Partially observable Markov decision process or other reinforcement learning technologies.
Eduard Lebedyuk · Jun 18, 2021 go to post

This way then:

<call name='To application Rest' target='To application REST' async='0'>
  <request type='EnsLib.REST.GenericMessage' >
    <assign property="callrequest.Stream" value='##class(%Stream.GlobalCharacter).%New()'/>
    <assign property="status"  value='callrequest.Stream.CopyFrom(request.StreamFC)' action="set" />
    <assign property="status"  value='callrequest.HTTPHeaders.SetAt("application/xml", "Content-Type")' action="set" />
    <assign property="status"  value='callrequest.HTTPHeaders.SetAt(callrequest.Stream.Size, "Content-Length")' action="set" />
    <assign property="status"  value='callrequest.HTTPHeaders.SetAt("POST", "HttpRequest")' action="set" />
  </request>
</call>
Eduard Lebedyuk · Jun 18, 2021 go to post

Try to send it like this:

<call name='To application Rest' target='To application REST' async='0'>
  <request type='EnsLib.REST.GenericMessage' >
    <assign property="status"  value='callrequest.Stream.CopyFrom(request.StreamFC)' action="set" />
    <assign property="status"  value='callrequest.HTTPHeaders.SetAt("application/xml", "Content-Type")' action="set" />
    <assign property="status"  value='callrequest.HTTPHeaders.SetAt(callrequest.Stream.Size, "Content-Length")' action="set" />
    <assign property="status"  value='callrequest.HTTPHeaders.SetAt("POST", "HttpRequest")' action="set" />
  </request>
</call>

Also I think you can skip Content-Length - it's appended to the request automatically.

Eduard Lebedyuk · Jun 18, 2021 go to post

I had a similar requirement (only for automatic docs generation).

As each BH setting is also a class property, you can query %Dictionary for them. And build your CSVs from these queries.

 

Queries

/// Settings common for all Interoperability BH
Query defaultSettings() As %Query
{
SELECT
   prop.name "Setting",
   TRIM('"' FROM MAX(prop.InitialExpression)) "Default value",
   LIST(prop.parent) "Class",
   MAX(prop.Description) "Description"
FROM "%Dictionary".PropertyDefinition prop
JOIN "%Dictionary".CompiledParameter par ON par.parent = prop.parent AND par.Name = 'SETTINGS'
JOIN "%Dictionary".CompiledClass cls ON prop.parent = cls.Name
WHERE (cls.Super LIKE '%Ens.Host%' OR cls.Name = 'Ens.Host' OR cls.Name = 'Ens.BusinessProcessBPL') AND
       par."_Default" LIKE '%' || prop.Name || '%'
GROUP BY prop.Name
ORDER BY 1
}

/// User BH classes
Query productionClasses() As %Query
{
SELECT
   Name "Class",
   Description "Description"
FROM "%Dictionary".CompiledClass cls
WHERE Name LIKE '%'
       AND Super In ('Ens.BusinessProcessBPL', 'Ens.BusinessService', 'Ens.BusinessOperation', 'Ens.BusinessProcess')
ORDER BY 1
}

/// Settings for User BH
Query productionClassesSettings() As %Query
{
SELECT
   prop.parent "Class",
   prop.name "Setting",
   TRIM('"' FROM prop.InitialExpression) "Default value",
   prop.Description "Description"
FROM "%Dictionary".PropertyDefinition prop
JOIN "%Dictionary".CompiledParameter par ON par.parent = prop.parent AND par.Name = 'SETTINGS'
JOIN "%Dictionary".CompiledClass cls ON prop.parent = cls.Name
WHERE cls.Name LIKE '%' AND par."_Default" LIKE '%' || prop.Name || '%'
ORDER BY 1,2
}


/// Production elements
Query productionItems(production) As %Query
{
SELECT
   Name,
   ClassName
   /*,Comment*/
FROM Ens_Config.Item
WHERE Production = :production
}

/// Get settings of production item
Query productionItemsSettingsCall(production) As %Query
{
SELECT *
FROM User_util.productionItemsSettings(:production)
}

/// Custom query - get settings for production items
Query productionItemsSettings(production As %String) As %Query(CONTAINID = 0, ROWSPEC = "Element:%String,Setting:%String,Host:%String,Value:%String") [ SqlName = productionItemsSettings, SqlProc ]
{
}

ClassMethod productionItemsSettingsExecute(ByRef qHandle As %Binary, production As %String) As %Status
{
    set obj = ##class(Ens.Config.Production).%OpenId(production,,.sc)
    quit:$$$ISERR(sc) sc
    do ..clearProductionItems(.obj)
    set qHandle("production") = obj
    set qHandle("item") = 1
    set qHandle("itemCount") = qHandle("production").Items.Count()

    set qHandle("setting") = 1
    set qHandle("settingCount") = qHandle("production").Items.GetAt(qHandle("item")).Settings.Count()
    quit sc
}

ClassMethod productionItemsSettingsFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) As %Status [ PlaceAfter = productionItemsSettingsExecute ]
{
        #dim sc As %Status = $$$OK
        #dim item As Ens.Config.Item = qHandle("production").Items.GetAt(qHandle("item"))
        #dim setting As Ens.Config.Setting = item.Settings.GetAt(qHandle("setting"))

        set AtEnd = 0
        set Row = $lb(item.Name, setting.Name, setting.Target, setting.Value)
       
        if qHandle("setting")<qHandle("settingCount") {
                set qHandle("setting") = qHandle("setting") + 1
        } else {
                if qHandle("item")<qHandle("itemCount") {
                        set qHandle("item") = qHandle("item") + 1
                        set qHandle("setting") = 1
                        set qHandle("settingCount") = qHandle("production").Items.GetAt(qHandle("item")).Settings.Count()
                } else {
                        set AtEnd = 1
                }
        }
       
     quit sc
}

/// Remove production items without settings.
ClassMethod clearProductionItems(ByRef production As Ens.Config.Production)
{
    #dim item As Ens.Config.Item
    for i = production.Items.Count():-1:1 {
        set item = production.Items.GetAt(i)
        do:item.Settings.Count()=0 production.Items.RemoveAt(i)
    }
}
Eduard Lebedyuk · Jun 18, 2021 go to post

It's %request.Content.

Thanks for noticing that, fixed!

Looks like I mixed %CSP.Request:Content with %Net.HttpResponse:Data.

Eduard Lebedyuk · Jun 17, 2021 go to post

In that case:

Insert Into TableX
values ('Name', 'Address', 'Phone')

UNION

Insert Into TableX
values ('Name2', 'Address2', 'Phone2')

and so on.

Eduard Lebedyuk · Jun 17, 2021 go to post

Use docker-ls:

PS D:\Cache\distr> .\docker-ls tags --registry https://containers.intersystems.com intersystems/iris-community
requesting list . done
repository: intersystems/iris-community
tags:
- 2020.1.1.408.0
- 2020.3.0.221.0
- 2020.4.0.547.0
- 2021.1.0.215.0
Eduard Lebedyuk · Jun 17, 2021 go to post

I'm running:

store/intersystems/iris-ml-community:2021.1.0.215.0

And $zv is:

IRIS for UNIX (Ubuntu Server LTS for x86-64 Containers) 2021.1 (Build 215U) Wed Jun 9 2021 12:37:06 EDT

Are $zv for ml and non ml builds the same? How can I distinguish if my app is running on ml or non ml build?

Eduard Lebedyuk · Jun 17, 2021 go to post

Thank you for the info Guillaume!

I would like to clarify that I'm not an author of Community R Gateway (although I do publish it).

Shiao-Bin Soong is the author of both Community R Gateway and R Gateway.