搜索​​​​

清除过滤器
文章
Michael Lei · 七月 6, 2021

使用 Yape 解包 pButtons - 更新说明和快速指南

如果一张图片胜过千言万语,那么一段视频又价值几何? 当然胜过敲一个帖子。 请在 [InterSystems Developers YouTube](https://www.youtube.com/c/InterSystemsDevelopers) 观看我的“Coding talks”: 1. 使用 Yape 分析 InterSystems IRIS 系统性能。 第 1 部分:安装 Yape   在容器中运行 Yape。 2. Yape 容器 SQLite iostat InterSystems 提取和绘制 pButtons 数据,包括时间范围和 iostat。 如果您需要一个简单的方法来捕获和查看 Caché 和 IRIS 以及系统性能指标,可以安排每天运行 pButtons 来轻松实现。 [我之前写过这方面的文章](https://cn.community.intersystems.com/post/intersystems-数据平台的容量规划和性能系列文章)。 我经常需要查看客户系统以进行容量规划和性能检查,这就是我编写 Yape 并在 [GitHub](https://github.com/murrayo/yape "GitHub") 上提供它的原因。 我的 InterSystems 同事 Fabian 将 Yape 的内部结构带入了新方向,并[使其正式在容器中运行](https://community.intersystems.com/post/visualizing-data-jungle-part-iv-running-yape-docker-image)。 Fabian 已经离开 InterSystems,但我继续在 GitHub 上进行开源开发。 在过去一个月左右的时间里,我修复了一些操作系统命令格式错误,使日期处理更智能,在 vmstat 中添加了“Total CPU”图表(倒着看“id”导致我的脖子拉伤),以及其他修饰性更改。 如果您想为 Yape 做出贡献,它在 GitHub 上是开源的。 如果您有功能要求,请[通过建议页面](https://github.com/murrayo/yape/issues)告诉我。 另外,请查看 [Open Exchange 上的 Yape 应用程序](http://bit.ly/2WnqmSt)。 在接下来的几个月,我将分享工作流程中的其他一些技巧,并期望继续开发以使呈现的数据更加有用。 Yape 非常适合检查和查看昨天或过去一周发生的事件的趋势,但是您还需要实时监视和警报... 这里我也对将来的一些帖子做个预告 ;)  
文章
Jingwei Wang · 八月 25, 2021

精华文章---Object Script 基础知识(一)

Object Script(一) 概况 ObjectScript是一种用于在InterSystems IRIS数据平台上快速开发编程语言,它是面向对象的弱类型脚本语言,非常适用于各种应用,包括业务逻辑、应用集成和数据处理。 在这里,我将主要介绍ObjectScript的命令脚本,类,方法和Routine等使用方式和语法规范。如有任何疑问,可在InterSystems开发者社区进行深入讨论。 IDE选择 可以使用InterSystems IRIS内置的Studio或Visual Studio Code(需要安装Object Script扩展)来查看和编辑代码。这里我们使用InterSystems IRIS内置Studio来做示例。 如果你已安装InterSystems IRIS或者InterSystems HS 等任何InterSystems产品,找到右下角的图标 ,单击鼠标右键,点击Studio,如下图所示: 输入用户名和密码(用户名:superuser 密码:安装时自己设置的密码),即可进入到Studio开发环境,如下图所示: Terminal 可以直接打开InterSystems IRIS的终端尝试执行ObjectScript的简单指令。通过右下角的图标 ,单击鼠标右键,点击Terminal,如下图所示: 命名空间 启动一个终端会话后,输入用户名和密码(用户名可以使用superuser,密码是安装时自己设置的密码),之后就会显示你在哪个命名空间下,如下图所示,我的就在USRE这个命名空间下。 命名空间切换 do ^%CD set $namespace = "Namespace" Terminal指令语法 在终端中,可以输入各种ObjectScript命令语句。但是不支持多行模式,所以整个命令必须在单行输入。 常用执行指令 指令 缩写 操作 语法/示例 write w 打印变量 write "Hello World!" write ! W ! 新行打印变量 write !, "This", !, "Is", !, "A", !, "Multi-line", !, "Message!", ! write ? w ? 列定位打印变量 write !, "This", ?9, "Is", ?18, "A", ?27, "Columnar", ?36, "Message!", ! write # w # 清除屏幕 write # zwrite zw 打印变量的名称和它们的值 zwrite read r 读入字段 read x set s 赋值 set x = "Hello World!" kill k 清除变量,慎用(不加参数调用时将清除内存中的所有变量!) kill x quit q 终止一个例程的执行 后面加返回值(类似return) do d 调用函数,routine do ##class(myclass).[method](…) if 评估条件,并根据条件来决定运行哪些代码 if condition { code } elseif condition {code} else {code} for 重复代码的部分 FOR variable=start:increment:end {…} while 作用与无参数的For类似,都是重复代码的部分. 2. 与for的区别在于条件是在整个代码块之前(While)还是之后(Do/While)被评估 do {code} while condition 或者 while condition {code} 异常错误解读 输入 quit 退出错误 数据类型 %String, %Status, %Integer, %Double, %DateTime等 运算符 关系运算符:= , < ,> ,<= ,>= 算术运算符:+ ,- , * , / 等 逻辑运算符:&& , || , ' 连字符:_ 运算优先级:严格按照从左到右执行,数学运算没有优先级,但先计算括号内表达式。
问题
ruihua ruihua · 二月 21, 2022

关于产品原型的设计软件有哪些推荐?如何快速和高效地提升设计能力?

关于产品原型的设计软件有哪些推荐?如何快速和高效地提升设计能力? InterSystems 没有提供产品原型工具,请百度。 vs code 算吗?
公告
Michael Lei · 八月 30, 2023

搜索非结构化文本数据

亲身体验 SQL 搜索,它是 InterSystems IRIS® 数据平台中的一个工具,可让您快速搜索存储在 SQL 表中的大量非结构化文本数据(含练习,15m) 。
文章
姚 鑫 · 二月 25, 2021

第四十七章 Caché 变量大全 ^$JOB 变量

# 第四十七章 Caché 变量大全 ^$JOB 变量 提供系统间IRIS进程(`JOB`)信息。 # 大纲 ```java ^$JOB(job_number) ^$J(job_number) ``` # 参数 - `job_number` 输入ObjectScript命令时创建的系统特定OBJ编号。每个活动的InterSystems IRIS进程都有一个唯一的作业号。登录到系统会启动一个作业。在UNIX®系统上,作业号是调用InterSystems IRIS时启动的子进程的`PID`。`JOB_NUMBER`必须指定为整数;不支持十六进制值。 # 描述 可以将`^$JO`B结构化系统变量用作`$DATA`、`$ORDER`和`$QUERY`函数的参数,以获取有关本地InterSystems IRIS系统上是否存在InterSystems IRIS作业的信息。 # 示例 以下示例显示如何将`^$JOB`用作`$DATA`、`$ORDER`和`$QUERY`函数的参数。 ## 作为$DATA的参数 `$DATA(^$JOB(job_number))` `^$JOB`作为`$DATA`的参数返回一个整数值,该值指示指定的作业是否作为节点存在于`^$JOB`中。下表显示了`$DATA`可以返回的整数值。 Value | Meaning ---|--- 0 | `JOB`不存在 1 | `JOB`存在 以下示例测试系统间IRIS进程是否存在。 ```java DHC-APP>SET x=$JOB DHC-APP>WRITE !,$DATA(^$JOB(x)) 1 ``` 变量`x`设置为当前进程的作业号(例如:4294219937)。写入操作返回布尔值1,表示此进程存在。 ## 作为$ORDER的参数 `$ORDER(^$JOB(job_number),direction)` `^$JOB`作为`$ORDER`的参数,按排序顺序将下一个或上一个`^$JOB`编号返回到指定的作业编号。如果不存在作为`^$JOB`节点的此类`JOB`编号,`$ORDER`将返回空字符串。 Direction参数指定是否返回下一个或上一个`job`编号。如果不提供方向参数,InterSystems IRIS会将排序顺序中的下一个`job`编号返回给指定的`job`编号。 以下子例程搜索InterSystems IRIS作业表,并将`job`号存储在名为`job`的本地数组中。 ```java /// d ##class(PHA.TEST.SpecialVariables).JOB() ClassMethod JOB() { JOB SET pid="" FOR i=1:1 { SET pid=$ORDER(^$JOB(pid)) QUIT:pid="" SET JOB(i)=pid } zw JOB WRITE "总共job有: ",i QUIT } ``` ```java DHC-APP>d ##class(PHA.TEST.SpecialVariables).JOB() JOB(1)=612 JOB(2)=1424 JOB(3)=1972 JOB(4)=5624 JOB(5)=7244 JOB(6)=7864 JOB(7)=7872 JOB(8)=7892 JOB(9)=7920 JOB(10)=8332 JOB(11)=9048 JOB(12)=9084 JOB(13)=9340 JOB(14)=10084 JOB(15)=10112 JOB(16)=10156 JOB(17)=10200 JOB(18)=10212 JOB(19)=10828 JOB(20)=22432 总共job有: 21 ``` ## 作为$QUERY的参数 `$QUERY(^$JOB(job_number))` `^$JOB`作为`$QUERY`的参数,按排序顺序将下一个`^$JOB`编号返回到指定的`JOB`编号。如果`^$JOB`中没有这样的`JOB`编号作为节点,则`$QUERY`将返回空字符串。 以下示例返回InterSystems IRISJOB表中的前两个`JOB`。请注意间接运算符`(@)`的用法: ```java DHC-APP>SET x=$QUERY(^$JOB("")) DHC-APP> WRITE !,x ^$JOB("612") DHC-APP>WRITE !,$QUERY(@x) ^$JOB("1424") ```
文章
Kelly Huang · 八月 2, 2023

在本地的K8s 上部署一台FHIR服务器

这是一个使用 IKO 在 k3d 上部署 iris-oauth-fhir 的示例。 * iris-oauth-fhir 是一个示例,用于部署带有 OAuth2 身份验证功能的 FHIR 服务器,InterSystems IRIS for Health 作为资源服务器,Google OpenId 则作为授权服务器。 * k3d 作为一个轻量级封装器,用于在 docker 中运行 k3s (Rancher Lab 的最小 Kubernetes 发行版) * IKO 是一个在 Kubernetes 上部署 InterSystems IRIS for Health 的工具。 2. 目录表 1. K3D + iris-operator + iris-oauth-fhir 2. Table of Contents 2.1. Prerequisites 2.2. Installation 2.2.1. Warning 2.2.2. Build iris-oauth-fhir image 2.2.3. Download k3d 2.2.4. Create a registry 2.2.4.1. add registry to hosts 2.2.4.1.1. mac 2.2.4.1.2. windows 2.3. Start the culster 2.3.1. Check the cluster 2.3.2. Install iris-operator 2.3.2.1. install helm 2.3.2.2. install iris-operator 2.3.3. Install iriscluster 2.3.3.1. What are we going to deploy? 2.3.3.2. Prepare the deployment for the data node 2.3.3.3. Prepare the deployment for the web gateway node 2.3.4. Deploy iriscluster 2.3.5. Deploy ingress 2.4. Easy scale 2.5. Quick init 2.6. Quick deployment 2.1 须知 Docker Git Helm k3d kubectl IKO 2.2 安装 2.2.1 警告 这将是很值得经历的一段漫长的过程,您将学到很多关于 Kubernetes 和 InterSystems IRIS for Health 的知识。 2.2.2 构建 iris-oauth-fhir 镜像 首先克隆下面这个存储库 git clone https://github.com/grongierisc/iris-oauth-fhir 然后按照 README.md 中的说明构建 iris-oauth-fhir 镜像。 接下来我们安装 k3d。 2.2.3 下载k3d curl -s https://raw.githubusercontent.com/rancher/k3d/main/install.sh | bash 2.2.4 创建一个注册表 我们必须创建一个注册表,因为目前 Docker Desktop 还没有将其内部注册表用作容器 ID 注册表。有一项实验性功能可将 Docker Desktop 注册表用作容器 ID 注册表,但目前还不稳定。因此,我们将使用 k3d 创建一个注册表。 k3d registry create registry.localhost --port 5000 该命令将在端口 5000 上创建一个注册表。我们将用它来推送图像。这是在 k3d 中使用图像的唯一方法。 现在,我们将把注册表添加到 hosts 文件中。这样,我们就能将其用作 DNS 名称。这一点很重要,因为我们将在部署中使用它。这个 DNS 名称对于我们的主机和 Kubernetes 都是一样的。 2.2.4.1 将注册表添加到主机中 2.2.4.1.1. mac sudo sh -c 'echo "127.0.0.1 k3d-registry.localhost" >> /etc/hosts' 2.2.4.1.2 windows Open Notepad as an administrator. Open the file C:\Windows\System32\Drivers\etc\hosts. Add the following line to the end of the file: 127.0.0.1 k3d-registry.localhost. Save the file and close Notepad. 2.3 启动群集 现在,我们将使用此命令行启动群集: k3d cluster create demo --servers 1 --agents 2 --volume $(pwd)/k8s/data:/var/lib/rancher/k3s/storage@all --registry-use k3d-registry.localhost:5000 -p "8081:80@loadbalancer" -p "4443:443@loadbalancer" --api-port 6550 --volume "$(pwd)/k8s/config/traefik-config.yaml:/var/lib/rancher/k3s/server/manifests/traefik-config.yaml" 有哪些选项 --servers 1 will create one server node, server nodes are the master nodes. --agents 2 will create two agent nodes, agent nodes are the worker nodes. --volume $(pwd)/k8s/data:/var/lib/rancher/k3s/storage@all will mount the k8s/data folder to the cluster. This is where we will store our data. --registry-use k3d-registry.localhost:5000 will use the registry we created before. -p "8081:80@loadbalancer" -p "4443:443@loadbalancer" will expose the port 8081 and 4443 to the host. This is where we will access our cluster. --api-port 6550 will expose the port 6550 to the host. This is where we will access the Kubernetes API. --volume "$(pwd)/k8s/config/traefik-config.yaml:/var/lib/rancher/k3s/server/manifests/traefik-config.yaml" will mount the k8s/config/traefik-config.yaml file to the cluster. This is the configuration file for the ingress controller. This will configure the ingress controller to allow traefik to route the data on the secure port without verification of the certificate. # k8s/config/traefik-config.yaml apiVersion: helm.cattle.io/v1 kind: HelmChartConfig metadata: name: traefik namespace: kube-system spec: valuesContent: |- globalArguments: - "--serversTransport.insecureSkipVerify=true" 2.3.1 检查群集 为了让你了解 Kubernetes 集群的样子,下面是一个示意图: kubectl get nodes 你应该看到如下的内容 NAME STATUS ROLES AGE VERSION k3d-demo-server-0 Ready control-plane,master 10m v1.21.2+k3s1 k3d-demo-agent-0 Ready <none> 10m v1.21.2+k3s1 k3d-demo-agent-1 Ready <none> 10m v1.21.2+k3s1 这意味着集群已准备就绪。现在,您拥有了一个包含一个主节点和两个工作节点的 Kubernetes 集群。 2.3.2 安装 iris-operator 我们现在开始安装 iris-operator。iris-operator是一个 Kubernetes 操作器,用于在 Kubernetes 上部署 InterSystems IRIS for Health。它可在 WRC 或 InterSystems Container Registry 上获取。我们将使用 3.6.6.100 版本。 例如,如果容器注册表有 IKO,可以使用此命令行: docker pull containers.intersystems.com/intersystems/iris-operator-amd:3.6.6.100 现在,我们将标记这个image,将其推送到注册表中: docker tag intersystems/iris-operator-amd:3.6.6.100 k3d-registry.localhost:5000/intersystems/iris-operator-amd:3.6.6.100 继续推送 docker push k3d-registry.localhost:5000/intersystems/iris-operator-amd:3.6.6.100 要安装 Iko 操作员,我们将使用 helm。Helm 是 Kubernetes 的软件包管理器。可在here下载。 2.3.2.1 安装 helm curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 chmod 700 get_helm.sh ./get_helm.sh 2.3.2.2 安装 iris-operator helm install intersystems k8s/iris_operator_amd-3.6.6.100/chart/iris-operator 要检查 operator 是否正在运行,可以使用此命令行: kubectl --namespace=default get deployments -l "release=intersystems, app=iris-operator-amd" 你应该看到👇🏻的内容 NAME READY UP-TO-DATE AVAILABLE AGE intersystems-iris-operator 1/1 1 1 2m 2.3.3 安装 iriscluster 2.3.3.1 我们要部署什么 我们需要部署👇🏻的架构 One data node One web gateway node 正是我们在这个 docker-compose 文件中看到的内容: # docker-compose.yaml version: '3.6' services: iris: image: iris-oauth-fhir-iris:latest build: context: . dockerfile: Dockerfile restart: always ports: - 1972 - 8083:52773 - 53773 volumes: - ./:/irisdev/app/ - ./data:/data environment: - ISC_CPF_MERGE_FILE=/irisdev/app/common.cpf - ISC_OAUTH_SECRET_PATH=/irisdev/app/misc/auth/secret.json - ISC_DATA_DIRECTORY=/data/iris webgateway: build: context: ./webgateway args: link: 'iris' port: '52773' image: proxyiris:latest ports: - "8080:80" - "4443:443" volumes: - ./webgateway/CSP.ini:/opt/webgateway/bin/CSP.ini - ./webgateway/httpd-csp.conf:/usr/local/apache2/conf/extra/httpd-csp.conf 几个注意的点: 我们在数据节点中使用了 iris-oauth-fhir-iris:latest 镜像。 该镜像使用三个环境变量: ISC_CPF_MERGE_FILE 用于合并 common.cpf 文件。 ISC_OAUTH_SECRET_PATH 用于设置秘密文件的路径。 ISC_DATA_DIRECTORY 用于设置数据目录。 网络网关节点使用 proxyiris:latest 映像。 该镜像使用两个volumes: CSP.ini 用于配置 CSP 应用程序。 httpd-csp.conf 用于配置 apache 服务器。 因此,在 Kubernetes 部署中,我们必须做同样的事情。 这意味着我们必须 数据节点 向数据节点提供 common.cpf 文件。 同样也要提供 secret.json 文件,以配置 OAuth2 身份验证。 数据目录将作为volume加载。 对于网络网关节点: 向网络网关节点提供一些 CSP.ini 文件。 同样,httpd-csp.conf 文件用于配置 apache 服务器。 2.3.3.2 准备数据节点的部署 为了向数据节点提供 common.cpf 文件,我们将使用配置映射。配置映射是用于存储配置文件的 Kubernetes 对象。我们将使用本版本库中的 common.cpf 文件。 下面是配置映射的示意图: 要创建配置映射,我们将使用以下命令行: kubectl create cm iriscluster-config --from-file common.cpf 为了向数据节点提供 secret.json 文件,我们将使用一个secret。secret是用于存储敏感数据的 Kubernetes 对象。我们将使用该版本库中的 secret.json 文件。 要创建secret,我们将使用以下命令行: kubectl create secret generic iriscluster-secret --from-file misc/auth/secret.json 要将数据目录挂载为volume,这将是自动的。我们将使用 IrisCluster 定义拓扑部分的存储字段,并将其作为默认设置。 我们仍需将 iris-oauth-fhir-iris:latest 映像推送到注册表。我们将使用与之前相同的命令行: docker tag iris-oauth-fhir-iris:latest k3d-registry.localhost:5000/iris-oauth-fhir-iris:latest docker push k3d-registry.localhost:5000/iris-oauth-fhir-iris:latest 2.3.3.3 准备网络网关节点的部署 网络网关节点有点不同,因为我们不会使用 proxyiris:latest 映像。我们将使用 intersystems/webgateway:2023.1.1.380.0-linux-amd64 映像。该镜像可从 InterSystems Container Registry. 上获取。该镜像是原始 Web 网关镜像。 原始网络网关镜像与 proxyiris 镜像有何不同? proxyiris 已用自签证书预配置了 https。 因此,我们必须配置网络网关使用 https。为此,我们将使用一个secret。secret是一个用于存储敏感数据的 Kubernetes 对象。我们将使用该版本库中的 tls.crt 和 tls.key 文件。 要创建secret,我们将使用以下命令行: kubectl create secret tls tls-secret --key k8s/tls/tls.key --cert k8s/tls/tls.crt 好消息是,我们无需配置 CSP 应用程序和 apache 服务器。我们将使用 IrisCluster 定义中拓扑部分的 applicationPaths 和 alternativeServers 字段,并将它们作为默认设置。 在 docker-compose.yaml 文件中,我们必须配置 CSP.ini 文件和 httpd-csp.conf 文件。在 Kubernetes 部署中,我们不需要这样做,因为我们无法提前知道数据节点的 IP 地址。但我们仍然需要告诉 IKO 连接到数据节点的登录名和密码。为此,我们将使用一个secret。secret是一个用于存储敏感数据的 Kubernetes 对象。我们将使用该版本库中的 iris-webgateway-secret 文件。 要创建secret,我们将使用以下命令行: kubectl create secret generic iris-webgateway-secret --from-literal='username=CSPSystem' --from-literal='password=]]]U1lT' 我们仍然需要将 intersystems/webgateway:2023.1.1.380.0-linux-amd64 映像推送到注册表中。我们将使用与之前相同的命令行 docker tag containers.intersystems.com/intersystems/webgateway:2023.1.1.380.0-linux-amd64 k3d-registry.localhost:5000/intersystems/webgateway:2023.1.1.380.0-linux-amd64 docker push k3d-registry.localhost:5000/intersystems/webgateway:2023.1.1.380.0-linux-amd64 2.3.4 部署 iriscluster 现在,我们将安装 IrisCluster。IrisCluster 是一种 Kubernetes 自定义资源,用于在 Kubernetes 上部署 InterSystems IRIS for Health。它定义在 k8s/config/iris-sample.yaml 文件中。 # k8s/config/iris-sample.yaml ## uncommented fields deploy one InterSystems IRIS data server ## WARNING: default password is not reset, to do so include ## configSource below ## include commented fields for purposes described; see documentation at ## https://docs.intersystems.com/irislatest/csp/docbook/Doc.View.cls?KEY=AIKO_clusterdef_sample ## update image tags (from ":tag") before using; see list of available images at ## https://docs.intersystems.com/components/csp/docbook/Doc.View.cls?KEY=PAGE_containerregistry apiVersion: intersystems.com/v1alpha1 kind: IrisCluster metadata: name: sample spec: ## provide InterSystems IRIS license key if required # licenseKeySecret: # name: iris-key-secret ## specify files used to customize the configurations of ## InterSystems IRIS nodes, including passwordHash parameter ## to set the default password, securing InterSystems IRIS configSource: name: iriscluster-config ## provide repository credentials if required to pull images # imagePullSecrets: # - name: iris-pull-secret ## provide VolumeSource specifications for certificates for each desired TLS feature ## "common" enables all TLS features, but each particular feature's property is given priority over "common" tls: # common: # secret: # secretName: tls-certs # mirror: # csi: # driver: secrets-store.csi.k8s.io # readOnly: true # volumeAttributes: # secretProviderClass: "my-provider" webgateway: secret: secretName: tls-secret ## specify platform-specific storage class used to allocate storage ## volumes (default: use platform-defined class) # storageClassName: iris-ssd-storageclass ## select update strategy (default: RollingUpdate) # updateStrategy: # type: RollingUpdate ## create external IP address(es)for the cluster ## ("type: LoadBalancer" and "externalTrafficPolicy: Local" are required) # serviceTemplate: # spec: # type: LoadBalancer # externalTrafficPolicy: Local ## define persistent volumes (to be mounted by "volumeMounts:" in node definitions) # volumeClaimTemplates: # - metadata: # name: extra-disk # spec: # accessModes: # - ReadWriteOnce # resources: # requests: # storage: 2Gi ## define ephemeral volumes (to be mounted by "volumeMounts:" in node definitions) volumes: - name: auth-config secret: secretName: iriscluster-secret ## topology: defines node types to be deployed; only "data:" is required topology: data: image: k3d-registry.localhost:5000/iris-oauth-fhir-iris:latest ## set enviroment variable for the container podTemplate: spec: env: - name: ISC_OAUTH_SECRET_PATH value: /auth/secret.json ## deploy a sharded cluster of data nodes and (optionally) compute ## nodes; if not included, "data:" definition in "topology:" deploys ## a single data server, "compute:" adds application servers # shards: 2 ## deploy mirrored data nodes or data server (default: nonmirrored) # mirrored: true ## override default size and other attributes of predefined storage ## volumes for data nodes (additional volume names: storageWIJ, ## storageJournal1, storageJournal2); can also be included in ## "compute:" definition # storageDB: # resources: # requests: # storage: 10Gi # storageClassName: my-storageclass ## constrain nodes to platform-specific availability zones (can be ## included in other node definitions) # preferredZones: # - us-east1-a # - us-east1-b ## mount volumes defined in "volumeClaimTemplates:" (persistent) and "volumes:" (ephemeral) volumeMounts: - mountPath: "/auth" name: auth-config ## deploy webgateway (web server) nodes webgateway: image: k3d-registry.localhost:5000/intersystems/webgateway:2023.1.1.380.0-linux-amd64 type: apache replicas: 1 applicationPaths: - /csp/sys - /fhir/r4 alternativeServers: LoadBalancing loginSecret: name: iris-webgateway-secret ## deploy System Alerting and Monitoring (SAM) with InterSystems IRIS # sam: # image: containers.intersystems.com/intersystems/sam:tag ## deploy InterSystems API Manager (IAM) with InterSystems IRIS # iam: # image: containers.intersystems.com/intersystems/iam:tag 内容太多了!别担心,我们一一做解释 让我们从 configSource 部分开始: ## specify files used to customize the configurations of ## InterSystems IRIS nodes, including passwordHash parameter ## to set the default password, securing InterSystems IRIS configSource: name: iriscluster-config 这是我们之前创建的配置映射。我们将在这里找到 common.cpf 文件。 接下来是 tls 部分: ## provide VolumeSource specifications for certificates for each desired TLS feature ## "common" enables all TLS features, but each particular feature's property is given priority over "common" tls: webgateway: secret: secretName: tls-secret 这是我们之前创建的secret。我们将在这里找到 tls.crt 和 tls.key 文件。 接下来是volumes部分: ## define ephemeral volumes (to be mounted by "volumeMounts:" in node definitions) volumes: - name: auth-config secret: secretName: iriscluster-secret 这是我们之前创建的secret。我们将在这里找到 secret.json 文件。 IrisCluster 定义了如何在 Kubernetes 上部署 InterSystems IRIS for Health。重要的部分是拓扑部分。该部分定义了要部署的节点。在本例中,我们将部署一个数据节点和一个网络网关节点。 让我们看看数据节点的定义: ## topology: defines node types to be deployed; only "data:" is required topology: data: image: k3d-registry.localhost:5000/iris-oauth-fhir-iris:latest ## set enviroment variable for the container podTemplate: spec: env: - name: ISC_OAUTH_SECRET_PATH value: /auth/secret.json volumeMounts: - mountPath: "/auth" name: auth-config 图像字段定义了要使用的图像。我们将使用之前构建的映像。podTemplate 字段定义 Kubernetes pod 模板。env 字段定义要在容器中设置的环境变量。我们将使用该环境变量来设置将创建的秘密文件的路径。podTemplate 相当于 docker-compose.yaml 文件中的 podTemplate。volumeMounts 字段定义了要挂载到容器中的卷。我们将挂载之前创建的秘密。 现在让我们看看网络网关节点的定义: ## deploy webgateway (web server) nodes webgateway: image: k3d-registry.localhost:5000/intersystems/webgateway:2023.1.1.380.0-linux-amd64 type: apache replicas: 1 applicationPaths: - /csp/sys - /fhir/r4 alternativeServers: LoadBalancing loginSecret: name: iris-webgateway-secret 图像字段定义了要使用的图像。类型字段定义要部署的网络网关类型。我们将使用 apache。副本字段定义要部署的网络网关的数量。我们将部署一个。applicationPaths 字段定义路由到网络网关的应用程序路径。我们将把 /csp/sys 和 /fhir/r4 路由到网络网关。alternativeServers 字段定义要使用的替代服务器。我们将使用 LoadBalancing。loginSecret 字段定义连接网关和数据节点的登录名和密码。 要部署 IrisCluster,我们将使用以下命令行: kubectl apply -f k8s/config/iris-sample.yaml 要检查 IrisCluster 是否正在运行,可以使用此命令行: kubectl get iriscluster 几分钟后,可以看到👇🏻这些信息 NAME SHARDS MIRRORED STATUS AGE sample Running 2m16s 要了解 IrisCluster 的详细信息,可以使用此命令行: kubectl describe iriscluster sample 要检查 pod 是否正在运行,可以使用此命令行: kubectl get pods 几分钟后,可以看到👇🏻这些信息 NAME READY STATUS RESTARTS AGE intersystems-iris-operator-amd-87c955c9c-4zmrj 1/1 Running 0 44m sample-data-0 1/1 Running 0 4m19s sample-webgateway-0 0/1 ContainerCreating 0 17s 要获取 pod 的详细信息,可以使用以下命令行 kubectl describe pod sample-data-0 2.3.5 部署 ingress 现在,我们将部署一个ingress。ingress 是一个 Kubernetes 对象,用于将流量路由到正确的 pod。我们将使用 k8s/config/ingress.yaml 文件。 apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: ingress namespace: default spec: rules: - http: paths: - path: / pathType: Prefix backend: service: name: sample-webgateway port: number: 443 该ingress将把流量路由到端口为 443 的 sample-webgateway 服务。 要部署ingress,我们将使用以下命令行 kubectl apply -f k8s/config/ingress.yaml 要检查ingress是否正在运行,可以使用此命令行: kubectl get ingress 要测试整个过程,可以使用以下命令行: curl -k https://localhost:4443/fhir/r4/metadata 恭喜您!已成功的在 Kubernetes 上部署了 iris-oauth-fhir。 2.4 Easy Scale 如果要创建一个新租户,可以使用 iris-demo.yaml 文件。 基本上,它与 iris-sample.yaml 文件相同,只是改变了租户的名称。 你可以使用此命令行进行部署: kubectl apply -f k8s/config/iris-demo.yaml 您可以使用新的 ingress 将流量路由到新租户。 apiVersion: traefik.containo.us/v1alpha1 kind: Middleware metadata: name: strip-prefix namespace: default spec: stripPrefix: prefixes: - /sample - /demo --- apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: ingress namespace: default annotations: traefik.ingress.kubernetes.io/router.middlewares: default-strip-prefix@kubernetescrd spec: rules: - http: paths: - path: /sample pathType: Prefix backend: service: name: sample-webgateway port: number: 443 - path: /demo pathType: Prefix backend: service: name: demo-webgateway port: number: 443 新增两条路线 /sample to route the traffic to the sample-webgateway service. /demo to route the traffic to the demo-webgateway service. 您可以缩放 Compte 节点,但需要License Key。 2.5 快速 init Tag images docker tag iris-oauth-fhir-iris:latest k3d-registry.localhost:5000/iris-oauth-fhir-iris:latest docker tag containers.intersystems.com/intersystems/webgateway:2023.1.1.380.0-linux-amd64 k3d-registry.localhost:5000/intersystems/webgateway:2023.1.1.380.0-linux-amd64 docker tag intersystems/iris-operator-amd:3.6.6.100 k3d-registry.localhost:5000/intersystems/iris-operator-amd:3.6.6.100 Push image docker push k3d-registry.localhost:5000/iris-oauth-fhir-iris:latest docker push k3d-registry.localhost:5000/intersystems/webgateway:2023.1.1.380.0-linux-amd64 docker push k3d-registry.localhost:5000/intersystems/iris-operator-amd:3.6.6.100 2.6 快速部署 删除 cluster k3d cluster delete demo 创建 cluster k3d cluster create demo --servers 1 --agents 2 --volume $(pwd)/k8s/data:/var/lib/rancher/k3s/storage@all --registry-use k3d-registry.localhost:5000 -p "8081:80@loadbalancer" -p "4443:443@loadbalancer" --api-port 6550 --volume "$(pwd)/k8s/config/traefik-config.yaml:/var/lib/rancher/k3s/server/manifests/traefik-config.yaml" 安装 iris-operator helm install intersystems k8s/iris_operator_amd-3.6.6.100/chart/iris-operator 创建配置和Secret kubectl create cm iriscluster-config --from-file common.cpf kubectl create secret generic iriscluster-secret --from-file misc/auth/secret.json kubectl create secret tls tls-secret --key k8s/tls/tls.key --cert k8s/tls/tls.crt kubectl create secret generic iris-webgateway-secret --from-literal='username=CSPSystem' --from-literal='password=]]]U1lT' 部署 IrisCluster: kubectl apply -f k8s/config/iris-sample.yaml 部署 Ingress kubectl apply -f k8s/config/ingress.yaml
文章
姚 鑫 · 一月 27, 2023

第五十八章 使用 ^BLKCOL 监视块冲突

# 第五十八章 使用 `^BLKCOL` 监视块冲突 当一个进程被迫等待访问一个块时,就会发生块冲突。过多的块冲突会降低应用程序性能。 # `Using ^BLKCOL` 在 `IRIS®` 数据平台中,`^BLKCOL` 实用程序对指定时间段(默认为 `10` 秒)内的块碰撞进行采样,记录这段时间内指定时间间隔(默认为 `10` 毫秒)内的最新块碰撞。对于每个记录的冲突,`^BLKCOL` 不仅标识块,还标识涉及的全局及其在块中的第一个和最后一个引用,以及创建试图访问块的进程的例程和行。 注意:`irisstat -D` 选项,如本指南附录“使用 `irisstat` 实用程序监视 `IRIS`”中的使用选项运行 `irisstat` 中所述,也对块冲突进行采样,但仅识别涉及的块。 `irisstat -D` 的输出包含在 `^SystemPerformance` 实用程序生成的报告中,如本指南的使用 `^SystemPerformance` 监控性能一章所述。 运行 `^BLKCOL` 时,可以指定以下内容: - 采样周期的长度(以秒为单位) - 采样之间的间隔(以毫秒为单位) - 是否收集例程详细信息(默认为是) - 是否将输出格式化为: - 具有最高冲突计数的块列表(默认) - 涉及的所有块的列表`in collisions` - 来自检测到的所有块碰撞的逗号分隔值,按块编号和例程排序和计数 - 来自所有检测到的块碰撞的逗号分隔值,未排序(`RAW`) - 例程中的碰撞热点列表 - 要显示的块数(如果适用) - 是否将输出发送到文件 # `^BLKCOL Ouputend` 输出到文件 `^BLKCOL` 实用程序的使用显示在以下示例终端会话中: ```java %SYS>do ^BLKCOL Block Collision Analysis How many seconds should we sample: How long to wait (ms) between each sample: Collect routine details? Format for 'T'op counts, 'D'isplay all, 'S'orted CSV, 'H'ot spot, or 'R'aw CSV: Number of blocks to display: Output to file: Sampling ... (any key to interrupt) 625 block collisions in 735 samples. Block # (count) - Global refs (first - last in block) - Routine refs (SFN) 767 (395) in c:\InterSystems\iris\mgr\user\ ^acctest - ^acctest(10220," 167") (T/BPtr) 325 at ^AccessTest+156(4) 25 at ^AccessTest+121(4) 24 at ^AccessTest+92(4) 8 at ^AccessTest+109(4) 8 at ^AccessTest+127(4) 4 at ^AccessTest+170(4) 1 at ^AccessTest+163(4) 3890 (11) in c:\InterSystems\iris\mgr\user\ ^acctest(2552," 371") - ^acctest(2552," 38") (Data) 6 at ^AccessTest+164(4) 3 at ^AccessTest+163(4) 1 at ^AccessTest+134(4) 1 at ^AccessTest+156(4) 15572 (9) in c:\InterSystems\iris\mgr\user\ ^acctest(6980," 4795") - ^acctest(6988," 3259") (Data) 7 at ^AccessTest+134(4) 1 at ^AccessTest+164(4) 1 at ^AccessTest+170(4) 15818 (8) in c:\InterSystems\iris\mgr\user\ ^acctest(9124," 173") - ^acctest(9124," 1743") (Data) 5 at ^AccessTest+164(4) 3 at ^AccessTest+170(4) 971 (7) in c:\InterSystems\iris\mgr\user\ ^acctest(484," 3927") - ^acctest(484," 3938") (Data) 5 at ^AccessTest+170(4) 2 at ^AccessTest+164(4) 1137 (7) in c:\InterSystems\iris\mgr\user\ ^acctest(756," 4063") - ^acctest(756," 4073") (Data) 3 at ^AccessTest+109(4) 2 at ^AccessTest+134(4) 1 at ^AccessTest+156(4) 1 at ^AccessTest+163(4) 2999 (7) in c:\InterSystems\iris\mgr\user\ ^acctest(2092," 666") - ^acctest(2092," 674") (Data) 3 at ^AccessTest+170(4) 1 at ^AccessTest+109(4) 1 at ^AccessTest+121(4) 1 at ^AccessTest+134(4) 1 at ^AccessTest+164(4) 6173 (7) in c:\InterSystems\iris\mgr\user\ ^acctest(3684," 528") - ^acctest(3684," 536") (Data) 3 at ^AccessTest+163(4) 1 at ^AccessTest+109(4) 1 at ^AccessTest+156(4) 1 at ^AccessTest+164(4) 1 at ^AccessTest+170(4) 14617 (7) in c:\InterSystems\iris\mgr\user\ ^acctest(9688," 18") - ^acctest(9688," 26") (Data) 4 at ^AccessTest+170(4) 2 at ^AccessTest+164(4) 1 at ^AccessTest+134(4) 15282 (7) in c:\InterSystems\iris\mgr\user\ ^acctest(8700," 4889") - ^acctest(8760," 1402") (Data) 4 at ^AccessTest+170(4) 3 at ^AccessTest+164(4) %SYS>d ^BLKCOL Block Collision Analysis How many seconds should we sample: How long to wait (ms) between each sample: Collect routine details? Format for 'T'op counts, 'D'isplay all, 'S'orted CSV, 'H'ot spot, or 'R'aw CSV: H Number of blocks to display: Output to file: Sampling ... (any key to interrupt) 571 block collisions in 768 samples. Sorted by routine/line that waits for block ownership _____________________________________________________ (571) AccessTest (324) +156^AccessTest : s @G@($J,node)=$$getdata($E(Str,1,$r(1000))) ;SMLXXX+, AFH (54) +164^AccessTest : k @G@($J,node) (43) +134^AccessTest : . k @G@($J,node) (31) +92^AccessTest : . . k @G@($j) (28) +109^AccessTest : . s x=$O(@G@($J,x)) Sorted by routine that owns the block _____________________________________ (472) AccessTest (472) +AccessTest ```
问题
洪玉 刘 · 二月 8, 2023

pool

运行池的机制和组件运行池的建议配置大小 请参考我们的社区文章:运行池大小配置的解读 | InterSystems Developer Community | FTP|REST API|SOAP|DevOps
公告
Claire Zheng · 三月 26

相聚青岛|InterSystems诚邀您共赴2024 CHINC之约,即日起可预约展会Demo咨询

2024年3月29日-3月31日,由国家卫生健康委医院管理研究所主办、《中国数字医学》杂志社有限公司承办的“2024中华医院信息网络大会(CHINC)”将在青岛国际会展中心(红岛馆)举办。InterSystems诚邀您莅临展会,我们带来了内容丰富的Demo演示,包括:InterSystems IRIS 2024.1新特性、 InterSystems IRIS矢量存储和矢量查询、InterSystems FHIR数据资产化解决方案,以及InterSystems IRIS医疗版互联互通套件解决方案。 2024 CHINC期间,InterSystems在合作伙伴东华医为展位(B3馆-A02)设立Demo演示区,即日起即可预约现场Demo咨询,欢迎点击【此处】注册预约。 Demo演示详情 Demo演示: InterSystems IRIS 2024.1新特性 欢迎点击【此处】注册,预约Demo咨询 矢量查询 快速联机备份 (EAP) 多超级服务器端口SuperServer Ports FHIR R4 and R5 Object Model Generation IRIS for Health 支持 Smart on FHIR 2.0.0 FHIR查询的性能提升 新的监控指标 嵌入式Python BPL editor 灵活的Python版本设置 Demo演示: InterSystems IRIS矢量存储和矢量查询 欢迎点击【此处】注册,预约Demo咨询 InterSystems IRIS 提供全SQL的矢量存储和基于矢量相似度矢量查询能力 让业务数据无需迁移到其它平台就可以矢量化存储和查询 进一步通过集成矢量化语言模型、生成式语言模型,利用本地数据实现检索增强生成 Demo演示: InterSystems FHIR数据资产化解决方案 欢迎点击【此处】注册,预约Demo咨询 数据作为生产要素推动数字经济已成为我国国策。要让数据成为生产资料参与交易,则需满足两个条件:其一是建立数据生产、流通、消费环节中数据语义的一致性,使数据质量可被控制,数据价值可被度量;二是对数据进行按需加工,形成品类众多的半成品、预制件,以便适应各类业务场景的需要。也即:交易双方应对数据的含义和价值达成共识,这是能够交易的前提——这也正如在中国制造业高速发展的三十年中,标准化部件和预制件之于大规模生产的作用一样。 数据资产清单就是一种有助于在交易双方建立共识、进一步计量计价的有力工具。在医疗行业,FHIR可以成为语言基础,而SQL Builder则提供了FHIR数据资产清单。因此,“FHIR 存储库+SQL builder”能够构成盘活数据资产价值的解决方案。 InterSystems作为深耕医疗行业40余年的专业厂商,在IRIS for Health(IRIS医疗版)数据平台中,借助HL7 FHIR标准提供的语义基础,推出了集FHIR存储库、SQL Builder、FHIR API等功能于一体的医疗行业数据资产解决方案,用于满足医疗数据资产化的业务需要。 在本次解决方案展示中,我们将演示如何基于FHIR进行数据资产盘点,如何按需投放资产支撑数据集需求和数据应用,一遍盘活已成规模的行业数据。包括:1)使用SQL Builder投射SQL数据,在SQL上进一步支撑以数据集为基础的业务(数据集交易或BI),其中按需投放、最小化原则是重要的规约,而IRIS提供了这两种规约的直接支持。2)使用API支撑的业务,不仅仅是使用CRUD操作,FHIR的Search操作对于支撑CDSS等业务具有重要意义。 Demo演示: InterSystems IRIS医疗版互联互通套件 欢迎点击【此处】注册,预约Demo咨询 InterSystems IRIS医疗版互联互通套件是一个全面的解决方案,提供了一整套工具和标准,旨在支持互联互通成熟度测评和通过测评之后的数据利用。它提供了满足互联互通成熟度测评的符合性基础,包括数据元与值集标准以及基于互联互通规范的69个服务和53个电子病历共享文档。此外,该套件还赋能数据利用,能够将电子病历共享文档转换成FHIR资源并存储,通过FHIR SQL Builder实现FHIR资源到SQL表的转换,从而支持数据分析,这一功能打通了互联互通和FHIR生态系统,促进了医疗数据的流动和分析。 更多活动|答问卷,领取《FHIR白皮书》! 由HL7中国委员会主持撰写的《FHIR白皮书》包含FHIR的设计路线与版本、基本用法、核心定义解读与适配、FHIR的发布实施、本地化方法、国外典型实践和案例、国内案例、基于FHIR的参考架构等丰富的内容。欢迎点击【此处】答问卷,领取《FHIR白皮书》!
公告
Michael Lei · 二月 28, 2023

医疗数据去标识化工具 抢先体验计划

我们很高兴地宣布我们的抢先体验计划的最新成员 - Health Data De-ID工具。 该工具将根据 *HIPAA 安全港* 对结构化临床数据进行去标识化处理,并允许在需要时进行重新标识。它使用 InterSystems 的 *SDA* 规范格式,该格式用于我们从一种格式到另一种格式的所有标准转换,例如 *HL7* 到 *CDA*、*HL7* 到 *FHIR* 等。虽然该工具使用 XSLT 转换来提高性能原因,它提供了辅助方法,您不需要成为 XSLT 专家的情况下更轻松地调整开箱即用的去标识化规则。 Health Data De-ID 适用于任何 InterSystems 产品,从 InterSystems IRIS for Health 到 Health Connect 再到 Unified Care Record。 您可以在此处加入抢先体验计划 - [如何注册抢先体验计划 (EAP)]?我们需要您的反馈,因此请在您完成整个过程或遇到任何问题时与我们联系。
文章
Claire Zheng · 五月 18, 2023

【视频】对话:“数据二十条”与FHIR标准

“数据二十条”体现了怎样的制度创新和政策智慧?FHIR将如何发挥作用?来看InterSystems亚太区总经理老卢(Luciano Brustia)与CHIMA主任委员王才有的精彩探讨!
公告
Claire Zheng · 七月 4, 2022

2022年全球峰会主题演讲线上观看!

大家好! 一周前,在西雅图举办的InterSystems 2022年全球峰会刚刚结束,但对于那些错过会议现场的人,或者由于种种原因无法亲自参加会议的人(或者只是希望重新回忆并再次聆听会议的人)来说,线上主题演讲刚刚开始! 话不多说,请查收全球峰会上来自社区的问候: 欢迎通过YouTube播放列表观看2022年全球峰会三天所有主题演讲: ➡️ Global Summit 2022 on InterSystems Developers YouTube 明年,来佛罗里达州好莱坞加入我们吧!🤩 详情在这里.
文章
Claire Zheng · 三月 16, 2022

【极客聊吧】如何为用户提供更好的开发体验(上)

谈到开发体验,什么最重要?如何为客户提供更好的开发体验?InterSystems IRIS的最新版本有哪些新特性极大优化了用户的开发体验?这是本月“极客聊吧”聚焦的话题,我们将通过上、下两期视频进行探讨。在本期视频中,InterSystems中国销售工程师吕正之、马浩和WRC产品支持专家杨乐乐针对以下两点进行了分享:(1)开发语言的多样性与对FHIR的支持;(2)探讨开发平台的前瞻性:对Smart Data Fabric架构的支持。
公告
Michael Lei · 三月 25, 2022

新的在线 Kubernetes 练习!

大家好! 对于那些参加了2021年虚拟峰会的体验实验室的人来说,你可能还记得其中一个实验室会议是围绕Kubernetes进行的。我们现在已经将该实验室转换为完全线上按需使用。你可以启动一个小型的虚拟机集群,并按照练习来管理你的Kubernetes集群,将InterSystems IRIS容器部署到其中,并观察它在摧毁一个吊舱时的自我修复性质。 如果你有兴趣,这是一个很好的Kubernetes介绍。请看这里: 用InterSystems IRIS 和 Kubernetes实现高可用
公告
Hao Ma · 五月 7, 2021

开发者社区改版, April 2021

Hi Developers! 看看2021年4月的开发者社区新版本有些什么改善, 主要的新特性包括: This is a release of how did we improve the Developer Community in April 2021. The key features: 代码块里的‘拷贝到剪贴板’按钮 帖子翻译页 私信帖子作者 InterSystems官方版本和安全警示 以下是详细介绍。 代码块里的‘拷贝到剪贴板’按钮Copy-to-clipboard button to code blocks 现在你可以轻松的从任何帖子或者回复里拷贝代码 - 把鼠标放在代码块,然后按这个按钮: 帖子翻译页面 在DC网站你可以请求任意帖子的专业翻译,或者您自己翻译,到5中语言中的一种。为了做起来方便,我们改善了翻译页的界面。 1. 从下拉菜单选择您想要的目标语言: 2. 做出您的选择: 生成翻译 - 如果您希望翻译并发帖,按"Translate" 请求翻译 - 如果您希望我们提供专业翻译,按"Request" 私信帖子作者 现在你可以轻松的发送私信给帖子的作者。点击"Direct Message"按钮,私信会自动添加标题。 InterSystems官方版本和安全警示 InterSystems Official tag 会及时向您更新InterSystems官方声明。现在您可以过滤想要收到的声明,从 releases 和 alerts. 希望您喜欢我们的改版 欢迎提交new requests for improvements and bug reports. 请大家保持关注