Dmitry Maslennikov · Aug 29, 2022 go to post

So, it looks like you doing it a wrong way. 

If you need to build your application, then you have to do it with Dockerfile during the build stage, not when it is just up and running. And you still build some container before it.

In any case you may use this way, to wait until it's started

sleep 5; docker exec $CONTAINER /usr/irissys/dev/Cloud/ICM/waitISC.sh

Teah, not documented, internally used script, but nothing offered instead.

Contact me directly, I may help to review the build process, and give particular recommendations.

Dmitry Maslennikov · Aug 28, 2022 go to post

Nowadays I would not recommend plain CSP files at all, and for sure, and totally no ZEN. 

I see that you use Python in some cases, I may recommend you use Django in that case, I wrote a few articles about it recently.

Or just do REST with %CSP.REST class, and do plain web application on plain HTML and JS, or may use ReactDOM (my application as an example).

Dmitry Maslennikov · Aug 26, 2022 go to post

10 seconds may not be enough, in my case starting IRIS may take more than one minute.

Where do you use the sleep command, and what for?

Dmitry Maslennikov · Aug 23, 2022 go to post

SAM is an extra bonus (arguable) to Prometheus/Grafana.

There are no SAM at all without Grafana/Prometheus

Dmitry Maslennikov · Aug 23, 2022 go to post

If to be honest, I have no idea, of the reasons for appearing SAM in the way it appeared. SAM is a bunch of tools.

  • Grafana, AlertManager - Visualization, and alerting
  • Prometheus - Time-Series Database, which in fact do requests to IRIS to collect metrcis
  • SAM itself, is from what I got, is just an UI tool which helps kind of organize your cluster and configure Prometheus+Grafana. And it uses the whole IRIS just for it.

And in fact SAM is not a requirement for it all. The thing is on your servers, where you have couple of API endpoints for Prometheus. And As far as I remember, the code there is closed, and you can't extend it. But you can easily add, your own endpoints, with your custom metrics, in understandable by Prometheus format. Look a this article as an example

So, any new metrics are supposed to be added in your servers, not in SAM.

And there is another way. Last year I developed a plugin to Grafana itself, which can connect directly to IRIS by its super port, and collect data in any way. So, even like, just without Prometheus at all, just Grafana and IRIS. It's possible to move some metrics logic outside of IRIS. Something like, use SQL query as a metric, or read some global, and visualize it in Grafana. That plugin is just a proof of concept, and can't be used in production. It requires some work on it, but I did not see so much interest in it, yet. And I would really like to improve it and make it useful.

Dmitry Maslennikov · Aug 23, 2022 go to post

And in fact, I've asked about this particular task at Global Summit 2022. And I'm really interested if any of the companies have this request too? Nowadays, there are a lot of such tools for many programming languages but ObjectScript. And in some cases it could become a requirement, to scan your application, no matter the language it's written.

I hope, that maybe someone from InterSystems may add something. Pinging @Andreas Dieckow 

Dmitry Maslennikov · Aug 23, 2022 go to post

Not sure why would you need to connect SAM container directly, but ok.

As Robert, already mentioned, to open terminal inside the container, you can do this command

docker exec -it {conatiner_id} bash

-i for interactive, -t for tty

-u root, if you would need to get root access, not needed in most of the cases.

bash is for command which you need to execute, so, it can be just

docker exec -it {conatiner_id} iris session IRIS

where the first iris is a command, session command there and last IRIS is an instance name (by default in docker container)

The next question is how to connect with VSCode. So, first of all, it should be connected over internal WebServer, or another way you managed to configure for access web. So, container have to be started with mapped port 52773

You may get authorization issues with a freshly started container, while it may require you to change the password. VSCode requires authorization. So, just simple config should work

{
  "objectscript.conn": {
    "active": true,
    "port": 52773,
    "host":"localhost",
    "username": "_system",
    "password": "SYS",
    "ns": "%SYS",
  }
}
Dmitry Maslennikov · Aug 18, 2022 go to post

No reasons at all have it inside of InterSystems out of the box.

You should have your source code in source control system, so, your code should exist as files, then you may simply count just lines in files

find src -type f | xargs wc -l
Dmitry Maslennikov · Aug 15, 2022 go to post

Hi, Yeah at this time no one security scanner supports ObjectScript. There are a few reasons for it. 

At this time, the only tool closest to it is ObjectScriptQuality, which can scan for possible bugs right now. But can be extended for security scans as well. With proper funding, it's possible to do it there. But only as a scanner just for code.

Another way is to implement a very new especially for a Security scanning tool, a complete scanner for enironment.

If your company or other companies would like to invest in such a project, I can implement such tool.

Dmitry Maslennikov · Aug 15, 2022 go to post

I see discord as an additional way to get in touch with the community. And there is possible to be online and get answers a bit faster.

If using something paid is okay, I'd recommend using Abby Recognition Server. We've been using it in our processes, with scanners, so, we get documents with barcodes automatically in our Docflow system. Or you can at least look for solutions similar to it.

well, looks so, but there are no methods, which will return available connections.

Anyway, another point of my post, is that it's not enough at all. Only 5 connections and you almost have no control over usage, you can spend all connections too fast. For instance, I'm using DBeaver, and when it connects, it uses 3 workers, and utilize 3 connections. When I develop Django application, I have to be sure, to run in single thread mode, or, it will use all connections too fast. Any development in any language, will get own limits as well. And sometime, you may get some unexpected issues, like with LOAD DATA, you may think, yep, it's just a SQL query, which can be executed in your process, so, no extra connections will be used, but it's wrong. And you always should keep in mind, that you may quickly get into limit. You connected to DBveaver, have one terminal, SMP, something else, and you decided to compile your code in VSCode, nope, no place for it. You have to disconnect DBeaver or, find another way to free connections.

Yes, I get it. I just don't get why I spend my connections on something, that I don't expect to spend. I'm too limited. How many connections, any of the processes may consume? I have no idea how to know it.

Well, yes I see, it's a Community Edition. But how I can be so sure, that the licensed version, will work another way?  There is a limit of 25 connections, and if someway, in the background it will create more connections than left, It will consume 25 license units at once, and it's exactly what I would not want to get in production. I need expected behavior. And this is not expected at all.

just 100 rows, you think, it should not be so long,

no no way, we need to consume one more connection for you. Are you out of connections, who cares?

Next, it will be error 504

Seriously, how to use it?

Found one more thing. Kind of a useful new feature LOAD DATA. But why does it use external java and consumes so precious connections? So, I get issues like this.

08/03/2022 18:50:52 - INFO: Running SQL Statement: Loading file sample_file.csv:
LOAD BULK %NOJOURN DATA FROM FILE '/home/irisowner/taxi/data/sample_file.csv' INTO NYTaxi.RowRides (VendorID,tpep_pickup_datetime,tpep_dropoff_datetime,passenger_count,trip_distance,RatecodeID,store_and_fwd_flag,PULocationID,DOLocationID,payment_type,fare_amount,extra,mta_tax,tip_amount,tolls_amount,improvement_surcharge,total_amount) USING '{ "from": {"file": {"columnseparator":",", "header": true } } }'
08/03/2022 18:50:52 - INFO: Preparing Loading file sample_file.csv - OK
08/03/2022 18:51:53 - ERROR: Error executing Loading file sample_file.csv: ERROR #5023: Remote Gateway Error: Connection cannot be established
08/03/2022 18:51:53 - INFO: Finished loading NYTaxi.RowRides in 60.28s

And there one another issue, which I often see, when using external languages. The connection waits is 60 seconds, and fails, why it does not fail fast? It already knows that there are no licenses/connections left, what is the reason of wait?

Dmitry Maslennikov · Jul 30, 2022 go to post

Well, I've managed to solve the pagination issue, it's kind of working (even with some bugs from IRIS, reported about it). And I don't like it anyway, as it's not the way it's supposed to be. But working

Dmitry Maslennikov · Jul 29, 2022 go to post

docker-compose is just a wrapper around Docker. 

But anyway, I'm sure you can still use docker no matter what environment you have. As soon as you can run any virtual machine hypervisor, you can even use a separate machine from yours. Yeah, there are probably some limitations, but not sure if they are not solvable. I'm not a Windows user at all.

Since the beginning of the era of Docker, there was a way, named docker-machine, but I suppose it's not in development anymore.

There is a possibility to install client only on windows, and there was a way to connect it to any external docker server by setting environment variable DOCKER_HOST

Dmitry Maslennikov · Jul 26, 2022 go to post

Yeah, actually there is an extra package available in pip, named djangorestframework, which helps to easily wrap models to REST service. I think I'll do the next part to describe how to do it, with this package. Stay tuned

Please, next time, when you spontaneously add flags and remove flags or features that prevent starting IRIS in Docker, think about end-users, who would need, to run different versions of IRIS, it makes it more complicated to follow all those changes. One version does not work with flags, another does not work with this flag. We need something more stable. When I need to configure the CI process for multiple versions, now I should somehow decide which version has this flag and which has not.

in IRIS,

cache[.exe] renamed to irisdb[.exe]

cconttrol[.exe] renamed to iris[.exe]

So, just use irisdb.exe instead of cache.exe

Dmitry Maslennikov · Jun 27, 2022 go to post

The link you added says about compatibility with version 2018.1 in Async mode, and it's the latest version of Caché/Ensemble. And in fact, renamed globals are not an issue in most cases, those globals are mostly temporary and not mirrored. So, theoretically, it should work.