WSockClientMicroSV

Downloads30
Subscribe
0
Bookmark
14
This application is not supported by InterSystems Corporation. Please be notified that you use it at your own responsibility.
Details
Releases
Reviews
Screenshots
Rewards
Issues

What's new in this version

  • add Quality
  • add Demo Server

Version 2 added

Updated according OEX templates
Removed hand crafted containers in favor of standard distibutions
New instructions added

Inspiration

Using the IRIS native API for Node.JS was the oportunity to present a MicroService operating in a Docker container.
A demo video is now also available to watch the demo in operation.

What it does

This WebSocketClient Service runs in an own container checking for messages to be submitted using IRIS native API for Node.JS.
The service operates with 3 Globals (Run/Stop WSserver, Input, Output)
Data are fetched from IRIS and sent to an external WebSocket Echo Service and reply is written back to IRIS.
All information is provided from IRIS.
To visiualize operation the containr should run interactive.
Control / Input / Output is all managed from a interactive utility in IRIS.

Challenges I ran into

  • run a vanilla IRIS distribution out of the box without docker-compose
  • transform interface from Caché into new IRIS native API.

Accomplishments that I'm proud of

  • No need for ZPM or docker-compose.
  • A single docker container does it all.
  • Run the same image on native Docker (Linux) and Docker Desktop for Windows, (had no acces to MAC)
  • Build an All-in-1 image with Sevice and IRIS in a common container.

What I learned

  • Handling and running more than 1 Docker container in cooperation.
  • Working with Docker volumes.
  • Limits of Docker Desktop for Windows

Built with

  • IRIS Community Edition in Docker
  • IRIS native API
  • Node.JS
  • Docker utility functions

Prerequisites

Make sure you have git and Docker desktop installed.

Version 1

Pull and init the demo:

  • docker pull store/intersystems/iris-community:2020.2.0.204.0
  • docker pull rcemper/rcc:demoJS
  • docker run --name ini1 --init -it --rm --privileged -v vol1:/external rcemper/rcc:demoJS bash /rcc/init.sh
    Detailed description
How to Work With Version 1

Run first a Docker exec session for the Control / In-Out utility in IRIS
docker run --name iris1 --init --rm -d -p 52773:52773 -p 51773:51773 -v vol1:/external store/intersystems/iris-community:2020.2.0.204.0 -b /external/pre.copy
Next start the Service process
docker run --name rcc1 --init -it --rm rcemper/rcc:demoJS /usr/bin/node /rcc/nodejs/WSockIris.js 172.17.0.2 And start the control program for IRIS in a new command / terminal session
docker exec -it iris1 iris session iris ZSocket

Version 2

download the repo to local directory and run

  • docker-compose up -d

How to Work With Version 2

Start the IRIS session

  • docker-compose exec iris iris session iris ZSocket

Open a new terminal window and start the Service container

  • docker-compose exec nodejs node WSockIris.js

Detailed descriptions:
Read more
Readme Windows
Article in DC

DemoService SMP
DemoService Terminal

Code Quality

Rating
0 (0)
Category
Technology Example
Works with
InterSystems IRIS
Tags
Info
Version
2.0.1
Last updated
2022-04-19
Repository
Open
Documentation
Open
License
Link