Replies

This is a basic test script I'm using to test basic connectivity from Node.js v8.x, the iris.node module version included is meant for an IRIS x64 instance on Windows with Node.js v8.x x64 installed.

It contains everything you need, you can immediately run it - you should see the same results. The test script assumes IRIS is installed in C:\InterSystems\IRIS and the _SYSTEM user contains the default password. If not, you need to change this in the example script iristest.js in the db.open() parameters.

iris_node_connector_test.zip

IRIS Node.js connector test script

Btw, if you're developing a React Native app and you need a back-end server for IRIS, you can try the react-qewd module for Node.js for use with the QEWD.js back-end server for IRIS.

A few more things to check: 

  • when you installed Node.js version 10.x, you need iris1000.node (for version 8.x, you need iris800.node)
  • you can ask for the most recent build via WRC
  • the IRIS architecture version (x86 or x64) must match the iris.node architecture version

If the module still refuses tot load, I'll upload an example test.js file I use myself to test basic functionality.

The instructions in the docs are different from the usual place a node.js module like iris.node should be put.

Usually, you create a test.js file in a directory of your choice, e.g. in C:\Test and inside this directory, you create a C:\Test\node_modules directory where iris.node should be placed.

When you do:

var iris = require('iris')

Your test.js file will look for it inside node_modules.

FYI, the ImageMagick library can be natively integrated as a Node.js/Express (REST) endpoint using the magick-cli module in the same way as suggested in my previous answer for highest performance.

Hi Scott,

I assume you discovered a useful Node.js module for image manipulation in the NPM registry.

As Bernd Mueller describes in an article about callouts, I think the most efficient way is to host your Node.js module in an Node.js/Express server endpoint and make a REST call from within ObjectScript to do this. As Bernd describes, you can do this quite easily using this technique because REST calls are much more efficient than starting external (Node.js) process instances with $ZF() for each callout.

However, there's also a much more powerful variant of Node.js/Express server where you have access in JavaScript to your Caché/IRIS data too using the latest QEWD-Up server. To just manipulate an image externally this will probably look as an overkill, but for other external JavaScript modules where you need to have access to your data too, this multiprocess Node.js/Express server is a perfect fit for applications needing external functionality.

I'm using this for my applications too to use external JavaScript modules, giving you access to pretty much everything you can imagine and the NPM registry has an out-of-the-box module available for.

HTH,

Ward

Hi Evgeny, yes I have problems uploading a file (pdf) in my post - I updated the link in my answer to point to my own server for the Caché User Group website. 

Hi,

I'm using the popular JasperReports reporting library with Caché/IRIS for several years.  See my presentation on this topic from the Caché User Group how to do this: CUG - reporting with JasperReports

You have several options: using the IRIS JDBC connector is the most obvious one, but I'm also using HTTP endpoints returning XML data source to JasperReports. Works very well.

A big advantage is that you can design your reports pixel-precise using JasperSoft Studio.

FYI, you can simply use the JasperReports server community edition: https://community.jaspersoft.com/

You'll need to install JasperReports Server and JasperSoft Studio to work with the IRIS JDBC connector.

HTH,

Ward

Hi Evgeny, I'm using this technique for sending e-mails (using a template engine like handlebars) in my own applications, but I don't have an easy example stripped-down to the bare essentials right at hand. But I'll write an example post how to do this as soon as I have some spare time and I'll add a link to it in this post too.