Nueva publicación

Encontrar

Artículo
· 19 hr atrás Lectura de 2 min

改进 CCR 应用,实现最佳实践

在过去的一年中,CCR 开发团队优先考虑对 CCR 应用程序进行更改,以更好地展示和鼓励使用 CCR 的最佳实践。本文将重点介绍我们关注的一些领域:

  • 组织控制面板
  • 系统警报
  • 分支机构卫生

在上述每个领域,我们都提高了潜在 CCR 使用问题的可见性,并为用户提供了主动解决这些问题的工具。

组织控制面板

我们继续在 "组织 "详细信息页面上添加可用信息

概览(OverView)是全面了解组织 CCR 使用情况的好地方。现在,它包含了更多的关键绩效指标,突出显示了各种问题,并链接到 CCR 应用程序中您可以解决这些问题的页面。

系统选项卡包括有关所有环境中客户端工具状态的详细信息以及系统架构师信息。这里的警报会突出显示丢失的信息、不活动和过时的客户端工具,并链接到相应的系统。

组织详细信息页面上的其他选项卡也增加了更多详细信息,使组织的 CCR 使用情况一目了然。

系统警报

系统详情页是另一个提高可见性的区域,我们现在为许多 CCR 使用问题提供了警报。

新增了未设置 URL、不安全 URLS 和检测到的客户端工具问题的环境警报。悬停时会显示详细信息:

当 CCR 检测到系统的客户端工具已过期时,会出现提示,鼓励使用更新按钮。

6 个月内没有活动的系统现在会显示一个警告,如果不再使用该系统,可将其废弃,或点击此处的 "打盹 "按钮,将其视为下一年的活动系统。这适用于某些很少需要接收更新的系统。

系统分支卫生

系统分支卫生是了解系统的 Perforce 分支中现有问题的强大工具。它可在每个 1 级或 2 级系统的 "系统详细信息 "页面上使用。

该工具的核心功能已使用了一段时间,但最近的改进提高了对一些边缘情况的检测能力。

在成熟的系统上运行此检查,可以很好地识别将来可能会导致问题的任何项目。

结论

在这些领域以及整个 CCR 应用程序中,今年发生了许多变化,目的是促进 CCR 的最佳使用。未来的改进将侧重于进一步公开信息和开发工具,以帮助 CCR 用户更好地了解其系统并主动解决问题。

如果您对 CCR 应用程序鼓励最佳实践的方式有任何问题或建议,请在下面发表评论。

Comentarios (0)1
Inicie sesión o regístrese para continuar
Anuncio
· 19 hr atrás

线上启动会:InterSystems 2026 全栈竞赛

Hi开发者们,

我们很高兴邀请大家参加即将举行的 InterSystems 全栈竞赛线上启动会

在此次线上研讨会上,您将发现本次竞赛中等待开发人员的激动人心的挑战和机遇。我们还将讨论希望参赛者涉及的主题,并向您展示如何使用 InterSystems IRIS 数据平台开发、构建和部署应用程序。

日期和时间:美国东部时间 2 月 2 日星期一下午 12:00 | 欧洲中部时间下午 6:00

演讲者
🗣 @Derek Gervais,开发人员关系布道师
🗣 @Evgeny Shvarov,开发人员和初创企业项目高级经理
🗣 @Raj Singh,开发人员体验产品经理

今天就注册参加启动仪式

Comentarios (0)1
Inicie sesión o regístrese para continuar
Artículo
· 19 hr atrás Lectura de 6 min

pyprod: Pure Python IRIS Interoperability

Intersystems IRIS Productions provide a powerful framework for connecting disparate systems across various protocols and message formats in a reliable, observable, and scalable manner. intersystems_pyprod, short for InterSystems Python Productions, is a Python library that enables developers to build these interoperability components entirely in Python. Designed for flexibility, it supports a hybrid approach: you can seamlessly mix new Python-based components with existing ObjectScript-based ones, leveraging your established IRIS infrastructure. Once defined, these Python components are managed just like any other; they can be added, configured, and connected using the IRIS Production Configuration page. 


A Quick Primer on InterSystems IRIS Productions

Key Elements of a Production

Image from Learning Services training material

An IRIS Production generally receives data from external interfaces, processes it through coordinated steps, and routes it to its destination. As messages move through the system, they are automatically persisted, making the entire flow fully traceable through IRIS’s visual trace and logging tools. The architecture relies on certain key elements:

  1. Business Hosts: These are the core building blocks—Services, Processes, and Operations—that pass persistable messages between one another.
  2. Adapters: Inbound and outbound adapters manage the interaction with the external world, handling the specific protocols needed to receive and send data.
  3. Callbacks: The engine uses specific callback methods to pass messages between hosts, either synchronously or asynchronously. These callbacks follow strict signatures and return a Status object to ensure execution integrity.
  4. Configuration Helpers: Objects such as Properties and Parameters expose settings to the Production Configuration UI, allowing users to easily instantiate, configure, and save the state of these components.

Workflow using pyprod

This is essentially a 3 step process.

  1. Write your production components in a regular Python script. In that script, you import the required base classes from intersystems_pyprod and define your own components by subclassing them, just as you would with any other Python library.
  2. Load them into InterSystems IRIS by running the intersystems_pyprod (same name as the library) command from the terminal and passing it the path to your Python script. This step links the Python classes with IRIS so that they appear as production components and can be configured and wired together using the standard Production Configuration UI. 
  3. Create the production using the Production Configuration page and start the Production

NOTE: If you create all your components with all their Properties hardcoded within the python script, you only need to add them to the production and start the Production. 

You can connect pyprod to your IRIS instance by doing a one time setup


Simple Example

In this example, we demonstrate a synchronous message flow where a request originates from a Service, moves through a Process, and is forwarded to an Operation. The resulting response then travels the same path in reverse, passing from the Operation back through the Process to the Service. Additionally, we showcase how to utilize the IRISLog utility to write custom log entries.

Step 1

Create your Production components using pyprod in the file HelloWorld.py

Here are some key parts of the code

  • Package Naming: We define iris_package_name, which prefixes all classes as they appear on the Production Configuration page (If omitted, the script name is used as the default prefix).
  • Persistable Messages: We define MyRequest and MyResponse. These are the essential data structures for communication, as only persistable objects can be passed between Services, Processes, and Operations.
  • The Inbound Adapter: Our adapter passes a string to the Service using the business_host_process_input method.
  • The Business Service: Implemented with the help of OnProcessInput callback.
    • MyService receives data from the adapter and converts it into a MyRequest message
    • We use the ADAPTER IRISParameter to link the Inbound Adapter to the Service. Note that this attribute must be named ADAPTER in all caps to align with IRIS conventions.
    • We define a target IRISProperty, which allows users to select the destination component directly via the Configuration UI.
  • The Business Process: Implemented with the help of OnRequest callback.
  • The Business Operation: Implemented with the help of OnMessage callback. (You can also define a MessageMap)
  • Logic & Callbacks: Finally, the hosts implement their core logic within standard callbacks like OnProcessInput and OnRequest, routing messages using the SendRequestSync method.

You can read more about each of these parts on the pyprod API Reference page and also using the Quick Start Guide.

import time

from intersystems_pyprod import (
    InboundAdapter,BusinessService, BusinessProcess, 
    BusinessOperation, OutboundAdapter, JsonSerialize, 
    IRISProperty, IRISParameter, IRISLog, Status)

iris_package_name = "helloworld"

class MyRequest(JsonSerialize):
    content: str

class MyResponse(JsonSerialize):
    content: str

class MyInAdapter(InboundAdapter):
    def OnTask(self):
        time.sleep(0.5)
        self.business_host_process_input("request message")
        return Status.OK()

class MyService(BusinessService):
    ADAPTER = IRISParameter("helloworld.MyInAdapter")
    target = IRISProperty(settings="Target")
    def OnProcessInput(self, input):
        persistent_message = MyRequest(input)
        status, response = self.SendRequestSync(self.target, persistent_message)
        IRISLog.Info(response.content)
        return status

class MyProcess(BusinessProcess):
    target = IRISProperty(settings="Target")
    def on_request(self, input):
        status, response = self.SendRequestSync(self.target,input)
        return status, response


class MyOperation(BusinessOperation):
    ADAPTER = IRISParameter("helloworld.MyOutAdapter")
    def OnMessage(self, input):
        status = self.ADAPTER.custom_method(input)
        response = MyResponse("response message")
        return status, response


class MyOutAdapter(OutboundAdapter):
    def custom_method(self, input):
        IRISLog.Info(input.content)
        return Status.OK()

 

Step 2

Once your code is ready, load the components to IRIS.

$ intersystems_pyprod /full/path/to/HelloWorld.py

    Loading MyRequest to IRIS...
    ...
    Load finished successfully.
    
    Loading MyResponse to IRIS...
    ...
    Load finished successfully.
    ...
    

Step 3

Add each host to the Production using the Production Configuration page.

The image below shows MyService and its target property being configured through the UI. Follow the same process to add MyProcess and MyOperation. Once the setup is complete, simply start the production to see your messages in motion.


Final Thoughts

By combining the flexibility of the Python ecosystem with the industrial-grade reliability of InterSystems IRIS, pyprod offers a modern path for building interoperability solutions. Whether you are developing entirely new "Pure Python" productions or enhancing existing ObjectScript infrastructures with specialized Python libraries, pyprod ensures your components remain fully integrated, observable, and easy to configure. We look forward to seeing what you build!


Quick Links

GitHub repository  

PyPi Package

Support the Project: If you find this library useful, please consider giving us a ⭐ on GitHub and suggesting enhancements. It helps the project grow and makes it easier for other developers in the InterSystems community to discover it!
Comentarios (0)1
Inicie sesión o regístrese para continuar
Artículo
· 20 hr atrás Lectura de 2 min

临时文件与单例:自我清理

我曾多次遇到一种模式,即我需要使用临时文件/文件夹,并在稍后的某个时候将其清理掉。

在这种情况下,自然是遵循"Robust Error Handling and Cleanup in ObjectScript "中的模式,使用 try/catch/pseudo-finally 或注册对象来管理析构函数中的清理工作。%Stream.File*也有一个 "RemoveOnClose "属性,您可以对其进行设置,但要小心使用,因为您可能会不小心删除一个重要文件,而且这个标志会在调用%Save()时被重置,因此您需要在重置后将其设回 1。

不过,有一个棘手的情况——假设你需要临时文件在外部堆栈级别中继续存在。例如:

ClassMethod MethodA()
{
    Do ..MethodB(.filename)
    // Do something else with the filename
}

ClassMethod MethodB(Output filename)
{
    // Create a temp file and set filename to the file's name
    Set filename = ##class(%Library.File).TempFilename()
    
    //... and probably do some other stuff
}

你总是可以传递 RemoveOnClose 设置为 1 的 %Stream.File* 对象,但我们在这里讨论的其实只是临时文件。

这就是 "单例(Singleton)"概念的由来。我们在IPM %IPM.General.Singleton 中有一个基本实现,你可以扩展它以满足不同的使用情况。一般行为和使用模式如下

  • 在较高的堆栈层中,调用该类的 %Get(),可以获得一个实例,在较低的堆栈层中调用 %Get() 也可以获得该实例。
  • 当对象在使用它的最高堆栈层中退出作用域时,将运行清理代码。

这比 % 变量更好一些,因为你不需要去检查它是否被定义,而且它还能通过一些深层对象技巧,在较低的堆栈层级上存活下来。

关于临时文件,IPM 也有一个临时文件管理器单例。解决这个问题的方法是:

ClassMethod MethodA()
{
    Set tempFileManager = ##class(%IPM.Utils.TempFileManager).%Get()
    Do ..MethodB(.filename)
    // Do something else with the filename
    // The temp file is cleaned up automatically when tempFileManager goes out of scope
}

ClassMethod MethodB(Output filename)
{
    Set tempFileManager = ##class(%IPM.Utils.TempFileManager).%Get()
    // Create a temp file and set filename to the file's name
    Set filename = tempFileManager.GetTempFileName(".md")
    
    //... and probably do some other stuff
}
Comentarios (0)1
Inicie sesión o regístrese para continuar
Pregunta
· 22 hr atrás

Plumbing Services in Dubai – Professional & Reliable Plumbing Solutions

Our Plumbing Services in Dubai provide expert, fast, and affordable solutions for residential and commercial plumbing needs. Whether you are dealing with a leaking pipe, blocked drain, faulty water heater, or require complete plumbing installation, our skilled plumbers deliver efficient and long-lasting results.

We use advanced tools, high-quality materials, and industry-approved techniques to diagnose and resolve plumbing issues safely and effectively. Each service begins with a detailed inspection to identify the root cause and prevent future problems.

Our plumbing services in Dubai include leak detection and repair, blocked drain cleaning, pipe repair and replacement, tap and mixer installation, toilet repair, water heater installation and maintenance, bathroom and kitchen plumbing, and emergency plumbing services.

Comentarios (0)1
Inicie sesión o regístrese para continuar