Nouvelle publication

Rechercher

Question
· 6 hr il y a

Stop HTTP Response content

Hi Guys,

below is a running a URL in a browser to connect and get live advertising packets data from Cassia AC server which keeps the connect live and keep going and population data. 

 

So now I'm doing the same in the below code but the issue I'm not getting anything and it gets stuck at Get(HttpURL) line because it hanging on that live connection I guess and not outputting, so how can I get the HTTP request to exit and get me only a snapshot of that data, maybe something like 20 sec worth of data?  

 BleMac="DC:0D:30:9E:3A:EC",GatewayMac="CC:1B:E0:E2:56:18"
Token=##class(SX3.Task.TemperatureCollection).GetAuth()
Set Httprequest=##class(%Net.HttpRequest).%New()
Set Httprequest.SSLConfiguration="RTLS"
Set Httprequest.Server="MyURL"
Set Httprequest.Timeout=30
Set Httprequest.Https=1
//S Httprequest.WriteTimeout=10
set Httprequest.ContentType="application/json"
Do Httprequest.SetHeader("Accept","application/json")
Do Httprequest.SetHeader("Accept-Language","en_US")
Do Httprequest.SetHeader("Authorization","Bearer "_Token)
Set HttpURL="/api/gap/nodes?filter_mac="_BleMac_"&filter_rssi=-75&mac="_GatewayMac_"&active=1&event=1&chip=1&access_token="_Token
^check("1222")=HttpURL_"|"_Token
Set tSc=Httprequest.Get(HttpURL)
^check("122")=1
^data=Httprequest.HttpResponse.Data.Read(Httprequest.HttpResponse.Data.Size)
//W !,Httprequest.HttpResponse.Data.ReadLine()
//S obj=##class(%ZEN.Auxiliary.jsonProvider).%ConvertJSONToObject(Httprequest.HttpResponse.Data.Read(Httprequest.HttpResponse.Data.Size),,.list)

 

Thanks

1 nouveau commentaire
Discussion (2)1
Connectez-vous ou inscrivez-vous pour continuer
Question
· 8 hr il y a

Custom Description Popup Text for Interoperability Production Business Hosts

I seem to remember making this work before, but I'm not having any luck digging up examples.

I've defined some custom properties for a business operation that could definitely benefit from having popup descriptions available in the Production Configuration. I have triple-slash comments before each property that do just that in the source. I thought those provided the text for the popup descriptions when clicking on the property name, but apparently not.

Any thoughts?

2 nouveaux commentaires
Discussion (3)1
Connectez-vous ou inscrivez-vous pour continuer
Article
· 15 hr il y a 2m de lecture

Options for Python Devs + Poll!

I am writing this post primarily to gather an informal consensus on how developers are using Python in conjunction with IRIS, so please respond to the poll at the end of this article! In the body of the article, I'll give some background on each choice provided, as well as the advantages for each, but feel free to skim over it and just respond to the poll.

 

As most of you are probably aware, Python is currently the most popular programming language among developers around the world - and for good reason. Python is intuitive, easy to read, has an expanse of libraries and packages, and offers a number of resources for solving almost any problem. For these reasons and more, Python is a natural first choice for developers. 

So, when a developer first starts working with InterSystems IRIS, a common question might come up: "Can I use Python while still getting the most out of IRIS?" The answer? "Yes!" This article will introduce a few of the most common ways Python can be used in conjunction with InterSystems IRIS.

Options for Using Python with IRIS:

1. Embedded Python:
Introduced in 2021, Embedded Python allows for writing and executing Python code directly within ObjectScript. This allows for side-by-side use of Python and ObjectScript, allowing developers  to integrate Python and IRIS. This is a great choice for those who want to use Python while never leaving the IRIS environment.

2. ODBC Connectivity, via pyODBC:
You can also connect external Python apps to IRIS using ODBC, just like in a traditional client-server architectures. This is probably the most widely-used integration method, since it uses familiar SQL-based workflows for Python developers. The pyODBC package supports the DB API 2.0 specification, and lets you execute SQL queries on IRIS databases.

3.InterSYstems Native API and ELS:
These two options give you more flexible integration between Python and IRIS:
    a. Native API for Python: this gives direct access to core IRIS features like persistent classes and global structures. It's best for when you want to work with IRIS-specific consturcts programmatically from Python.
    b. External Language Server: This lets IRIS to call out to Python code running in a separate process, or even on a separate server. It's super useful when the Python code is resource-intensive (high CPU oor memory usage) or when you might want isolation from the IRIS kernel for stability/scalability.

In Summary:
Python and InterSystems IRIS complement each other well. Whether you're a developer with limited ObjectScript experience, someone who's looking to take advantage of Python's ecosystem, or simply prefer writing code in Python, there are several integration paths available to you. Each option has different benefits based on your architecture and use case. 

Thank you for reading this brief overview of the ways you can use Python with InterSystems IRIS!

1 nouveau commentaire
Discussion (1)2
Connectez-vous ou inscrivez-vous pour continuer
Question
· 15 hr il y a

SSL/TLS unsupported protocol error

I'm using a %Net.HttpRequest which had been successful in the past, but started failing at some point with a SSL/TLS protocol error.

ERROR #6085: Unable to write to socket with SSL/TLS configuration 'groundca', error reported 'SSL/TLS error in SSL_connect(), SSL_ERROR_SSL: protocol error, error:14077102:SSL routines:SSL23_GET_SERVER_HELLO:unsupported protocol'

The SSL/TLS configuration:

The request's SSLConfig is set to the "groundca" config when making the request.

A request using the same URL, API key, and CA file through Curl receives the desired response from the API at "https://osrd.atlassian.net/rest/api/2/issue/<issue-name>", so I believe the issue isn't with the OS, networking, or API server. It shows that Curl is using TLSv1.3.

This thread makes me think perhaps an older version of SSL is being used in the Caché request instead of TLS even though the SSL/TLS config is set to use TLS, since the post also shows "SSL23" in the error, and suggests it comes from the OP's config being set to use 'SSL23' rather than 'tls12': https://github.com/lefcha/imapfilter/issues/140#issuecomment-259671735

Another IS thread shows a similar issue that was worked around. They believed a lack of SNI was the issue, though this was a handshake error rather than a protocol error: https://community.intersystems.com/post/how-do-not-use-sslv3-force-tls-variant-httprequest-aws-api-gateway

2 nouveaux commentaires
Discussion (2)2
Connectez-vous ou inscrivez-vous pour continuer
Annonce
· 17 hr il y a

[Video] Chaining LLMs for Better Results using Agentic AI

Hey Community!

We're happy to share the next video in the "Code to Care" series on our InterSystems Developers YouTube:

⏯  Chaining LLMs for Better Results using Agentic AI

In this video, you will see a practical example of Agentic AI using a compound workflow of multiple large language models (LLMs) to improve the quality of output. The scenario involves generating a marketing plan for a new product: one LLM drafts the plan, another critiques it, and a third produces a final, improved version based on the critique. The video also walks through the process in code, demonstrating how chaining LLMs can enhance results for complex tasks. It also discusses the trade-offs - higher cost and longer execution time - for more accurate, policy-aligned, and refined outputs.

🗣 Presenter: @Don Woodlock, Head of Global Healthcare Solutions, InterSystems

Enjoy watching, and subscribe for more videos! 👍

Discussion (0)1
Connectez-vous ou inscrivez-vous pour continuer