IBM i Global

 View Only
Expand all | Collapse all

Node.js on IBM i

  • 1.  Node.js on IBM i

    Posted Fri October 30, 2020 01:26 PM
    Thought I'd try and start some discussion.

    Who is using Node.js on IBM i? And what are you doing with it?

    For me, I am constant user of it. Connecting to Db2 for i, calling RPGLE programs, generating documents.. all regular stuff. Also working on a pure JavaScript database driver, but that is taking some time.

    How about you?


  • 2.  RE: Node.js on IBM i

    IBM Champion
    Posted Mon November 02, 2020 02:40 AM
    so, none. I am not a developer after all haha... BUT, I read this article this morning and wonder how big deal it is with the open source market that moves around so quickly. https://powerwire.eu/bye-bye-nodever do you have any concerns that the code you write today might not work in x years?

    ------------------------------
    Torbjörn Appehl
    ------------------------------



  • 3.  RE: Node.js on IBM i

    IBM Champion
    Posted Wed November 04, 2020 07:49 AM
    TL;DR. I am no less worried about the future of products using opensource on IBM i than I am on any other system, I might actually be more scared of closed proprietary solutions.

    Liam, you first... We use everything that makes sense, nodejs included. However we don't use node to serve anything to end-users in production; Developers use it in build systems on their PC's and we use it in devops on the server :)

    Torbjörn:

    About your question...

    Some time ago, I was able to talk to some IBM people about opensource on i, (mainly Mark Irish and Steve Will), where I posed the question of long term support and maintenance of OSS on IBM i? - Their comment was a bit vague, but basically my take from their answer was that things they deem important, they will support, like nodejs... I note that as I see it, other platforms handle this by actually being opensource (ideologically) at least as far as software that is GPL'd or similar is concerned.

    By releasing their modified source, I can help bug fix, fork the code and maintain it myself if needed, and based on that fact, I can choose to use it or not. While IBM i is "porting" a lot of these tools that I am used to, to the platform, I couldn't really find a place, where I can download this ported source and fork my own copy, so from an IBM i users perspective, it might as well have been closed-sourced, I don't know if this has changed today, I seem to remember having seen some OSS projects get merge requests with ppc64 code, but legal issues aside; This fact is what makes opensource valuable (and safe) to me. I am grateful, but not dependant, on IBM or some else supporting it, and need not fear if they deem it unworthy in 10 years time.

    More fodder for discussion...

    I had never heard of nodever until installing nodejs on IBM i, so detaching nodejs from nodever doesn't scare me in the slightest, infact, I've always wondered why that odd dependency existed in the first place. Switching to something like update-alternatives makes sense in this ecosystem, and getting rid of that weird dependency, that doesn't exists on any other systems running node is fine by me. The more IBM i streamlines their opensource offerings to behave like the rest of the world (#MakeThisPlatformNormal) the better.

    I've actually been holding lightning talks during the breaks at conferences ( well, not so much this year :) ), on the topic of opensource on IBM i and the relevance. Having used Unix/Linux for almost as long as OS/400 (in years, I have (a lot) more man hours in Linux today), and being an avid user of Linux on Power (and everywhere else), I still prefer some things to run on a separate partition using freely available cores, as it frees up the resources for things that can only run on my i. That said, I am immensely happy with what is going on with the platform these last years, and something as simply as having tmux, vim, curl, grep etc. "officially" available, is a huge win for me, and all the youngster we hire to work for us.

    Closed and proprietary solutions are deprecated or have breaking changes as well. In those cases, I feel left with few options but "to obey".

    - Jens Churchill.

    ------------------------------
    Jens Churchill
    ------------------------------



  • 4.  RE: Node.js on IBM i

    IBM Champion
    Posted Thu November 05, 2020 10:08 AM
    Hi Liam

    We use Node on IBM i to talk with HMRC to do all VAT stuff.  yes we could have used RPG/CL to do it, but it wouldn't have been easy and Node was just the right tool for the job.

    We will continue to go down the Open Source avenue if it gives us benefit,  It certainly has given us more options to decide what programming languages best fit the project.

    I'm glad my PowerWire article on NodeVer has started the discussions. :-) 

    Stay safe.

    ------------------------------
    Andy Youens
    ------------------------------



  • 5.  RE: Node.js on IBM i

    Posted Wed November 25, 2020 11:53 AM
    Hi Liam
    Soon a year since we met at you now.
    We are building our next cusomer portal using vue on the frontend and rest api backend (nginx/nodejs) talking with the database as well as rpgle programs.
    (using a wrapper program filling a sql resultset so that we directly can call the programs from sql, thanks for that tips by the way)
    Our plan is to take it into production early next year.



    ------------------------------
    Lars Andersson
    ------------------------------



  • 6.  RE: Node.js on IBM i

    Posted Thu November 26, 2020 02:56 AM
    I'm a System Administrator ... and I try to understand devs .. in this moment I'm helping devs to send IBM i MQ Messages to Kafka Server ... (my tasks are give support about IBM i environment ...)


    ------------------------------
    Fernando Plaza Vidaurre
    ------------------------------



  • 7.  RE: Node.js on IBM i

    Posted Mon February 21, 2022 04:09 PM
    Ive only just been introduced to it - Im not a developer.
    Has anyone ever set up Node.JS to use a secure connection and got any process documents to share. IBM removed them last week when I asked for support :(

    ------------------------------
    Wayne Canning
    ------------------------------



  • 8.  RE: Node.js on IBM i

    IBM Champion
    Posted Mon February 21, 2022 04:41 PM
    I'm not sure that I understand the question.   Use Node.js to use a secure connection for what, exactly?

    If you mean the HTTP support in Node itself, there's info on setting up TLS here: https://nodejs.org/docs/latest-v14.x/api/tls.html

    If that doesn't help, try Google -- just about anything related to Node.js is easy to find if you search for it.

    ------------------------------
    Scott Klement
    Director
    Profound Logic Software
    Oak Creek WI
    ------------------------------



  • 9.  RE: Node.js on IBM i

    Posted Mon February 21, 2022 08:13 PM
    Hi Scott

    Sorry, I should have been clear - yes, I did mean the use of HTTP in Node.

    i will check that out.
    Is it possible at all to do this through DCM?

    Cheers
    Wayne

    ------------------------------
    Wayne Canning
    ------------------------------



  • 10.  RE: Node.js on IBM i

    IBM Champion
    Posted Mon February 21, 2022 09:41 PM

    I don't know of any way to do it through DCM (unless this is something IBM has added at some point?).  

    We sell products based on Node.js, and our customers often have their certificates already set up in DCM, but want to use the same certificates in Node.  When that happens, I export the certificate and private key from the DCM, which it puts in PKCS12 format, then I use the openssl command-line tool to convert it to PEM to use it with Node.js

    IBM has a write-up on that here: https://www.ibm.com/support/pages/how-extract-ssltls-certificates-digital-certificate-manager-dcm-and-use-them-openssl-ibm-i-os



    ------------------------------
    Scott Klement
    Director
    Profound Logic Software
    Oak Creek WI
    ------------------------------



  • 11.  RE: Node.js on IBM i

    IBM Champion
    Posted Tue February 22, 2022 07:52 AM
    Hi Wayne,
    NodeJS itself isn't particularly suited for performing the work of encrypting connections, so the industry standard both on and off of the IBM i for what you're trying to do is to use a TLS reverse proxy server like NginX. Basically, you set up NginX to handle the encryption, everyone talks to that server, and it forwards unencrypted communication to Node. Since they both run locally on the ibm i, you never have insecure communications moving across your network.

    A few google-able terms: "nginx reverse proxy", "tls offloading", "ssl termination".

    From there, you can configure NginX to use a certificate you already have or quickly generate a new one using the openssl commands in PASE.

    I've done that setup a few hundred times now.

    Full disclosure - I do secure Node setups on IBM i professionally, but I'm happy to send a few pointers your way if you send me questions. aaron@eradani.com


    ------------------------------
    Aaron Magid
    ------------------------------



  • 12.  RE: Node.js on IBM i

    Posted Thu July 27, 2023 03:27 PM
    Hi, good afternoon, I'm Luis Zapata, I develop in rpg full free... and I'm looking at how I can integrate
    NodeJS to my developments... and I would like to know if from node you can make calls to programs in RPG and CL and also know if you can call the Store Procedure of the DB2 database


    ------------------------------
    Luis Alberto Zapata Arango
    ------------------------------



  • 13.  RE: Node.js on IBM i

    IBM Champion
    Posted Thu July 27, 2023 03:53 PM

    Yes, there's ODBC for Db2 access and Node.js iToolkit for program access.



    ------------------------------
    Jack Woehr
    IBM Champion 2021 - 2023
    IBM Qiskit Advocate
    ------------------------------



  • 14.  RE: Node.js on IBM i

    IBM Champion
    Posted Thu July 27, 2023 08:53 PM
    Edited by Satid Singkorapoom Thu July 27, 2023 08:56 PM

    Dear Luis

    Do a Google search on "ibm i node.js call rpg" and you will find more information such as these :

    https://www.linkedin.com/pulse/nodejs-nods-rpg-db2-aaron-bartell/

    https://www.fieldexit.com/forum/display?threadid=351

    https://www.fieldexit.com/forum/display?threadid=284

    https://www.scottklement.com/presentations/World%20of%20NodeJS%20on%20IBM%20i.pdf



    ------------------------------
    Education is not the learning of facts but the training of the mind to think. -- Albert Einstein.
    ------------------------------
    Satid S.
    ------------------------------