All Projects → sitemule → ILEastic

sitemule / ILEastic

Licence: Apache-2.0 License
Embedded application server for ILE on IBM i

Programming Languages

c
50402 projects - #5 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to ILEastic

ILEditor
IBM i development environment (IDE)
Stars: ✭ 83 (+167.74%)
Mutual labels:  ile, ibmi, ibmioss
IBMi-Book
"Learning IBM i as a Web Developer", my subpar eBook for learning the basics of IBM i, RPGLE, Control Language, and more from the eyes of a web developer.
Stars: ✭ 31 (+0%)
Mutual labels:  rpg, ibmi, ibmioss
vscode-ibmi-languages
Syntax highlighting for IBM i languages such as RPG, CL, DDS, MI, and RPGLE fixed/free.
Stars: ✭ 28 (-9.68%)
Mutual labels:  rpg, ibmi, ile-rpg
Notepad-RPG
RPG Free-Format & CL syntax for Nodepad++
Stars: ✭ 28 (-9.68%)
Mutual labels:  ile, ibmi
QshOni
The QShell on IBM i library contains useful CL wrapper commands to allow QShell and PASE apps to be called and consumed from regular IBM i jobs via CL, RPG or COBOL programs.
Stars: ✭ 34 (+9.68%)
Mutual labels:  rpg, ibmi
IBMiCmd
x86 Notepad++ plugin for IBM i development
Stars: ✭ 15 (-51.61%)
Mutual labels:  ile, ibmi
ublu
Ublu Midrange and Mainframe Life Cycle Extension Language
Stars: ✭ 13 (-58.06%)
Mutual labels:  ibmi, ibmioss
nodejs-idb-pconnector
Promise-based DB2 Connector for IBM i
Stars: ✭ 22 (-29.03%)
Mutual labels:  ibmi, ibmioss
laracom
laracom driven by go micro services
Stars: ✭ 37 (+19.35%)
Mutual labels:  microservice
node-carotte-amqp
An amqplib wrapper for microservices
Stars: ✭ 27 (-12.9%)
Mutual labels:  microservice
core
Microservice abstract class
Stars: ✭ 37 (+19.35%)
Mutual labels:  microservice
spring-cloud-sidecar-polygot
This project contains samples demonstrating the usage of side car polygot
Stars: ✭ 30 (-3.23%)
Mutual labels:  microservice
game 01
Scalable MMORPG game server based on entity control
Stars: ✭ 19 (-38.71%)
Mutual labels:  microservice
comrade-dev
Comrade is a job scheduler&manager service.
Stars: ✭ 69 (+122.58%)
Mutual labels:  microservice
microservice-bootstrap
Get started with Microservices using dotnet core
Stars: ✭ 18 (-41.94%)
Mutual labels:  microservice
cryptletter
Self-hosted micro-service for encrypted self-destructing messages
Stars: ✭ 21 (-32.26%)
Mutual labels:  microservice
cdk-microservices-labs
Hugo Style Documents
Stars: ✭ 12 (-61.29%)
Mutual labels:  microservice
mu-cl-resources
High-level abstractions for generating generic jsonapi compliant resources configured in Common Lisp.
Stars: ✭ 14 (-54.84%)
Mutual labels:  microservice
zauberlehrling
Collection of tools and ideas for splitting up big monolithic PHP applications in smaller parts.
Stars: ✭ 28 (-9.68%)
Mutual labels:  microservice
micro-rpg-catalog
A bunch of resources for micro-mini RPG systems
Stars: ✭ 98 (+216.13%)
Mutual labels:  rpg

Open in Visual Studio Code

ILEastic

It is a self contained web application server for the ILE environment on IBM i to run microservices.

ILEastic is a service program that provides a simple, blazing fast programmable HTTP server for your application. You can easily plug your RPG code into a services infrastructure and make simple web applications without the need of any third party webserver products.

Basically it is a HTTP application server you can bind into your own ILE RPG projects, to give you a easy deploy mechanism, that fits into DevOps and microservices alike environments.

The self contained web application server makes it so much easier to develop web applications.

Simply compile and submit. No - You don't need GCI, Apache, nginx or IceBreak - simply compile and submit.

The design paradigm is the same as found in Node.JS - the project was initially called node.RPG but the name was subject to some discussion, so ILEastic it is. Where Node.JS uses JavaScript, ILEastic aims for any ILE language where RPG are the most popular.

Except for initialization, It only requires two lines of code:

 il_listen ( config : pServletCallback); 
 il_responseWrite ( pResponse);

The il_listen is listening on the TCP/IP port and interface you define in the config structure. For each http request it will call your "servlet" which is a callback procedure that takes a request and a response parameter

The idea is that you deploy your (open source of course) RPG packages at NPM so the RPG community can benefit from each others work. The NPM ecosystem is the same for Node.JS and ILEastic.

Example:

**FREE

// -----------------------------------------------------------------------------
// This example runs a simple servlet using ILEastic
// Note: It requires your RPG code to be reentrant and compiled
// for multithreading. Each client request is handled by a seperate thread.
// Start it:
// SBMJOB CMD(CALL PGM(DEMO01)) JOB(ILEASTIC) JOBQ(QSYSNOMAX) ALWMLTTHD(*YES)        
// -----------------------------------------------------------------------------     
ctl-opt copyright('Sitemule.com  (C), 2018');
ctl-opt decEdit('0,') datEdit(*YMD.) main(main);
ctl-opt debug(*yes) bndDir('ILEASTIC');
ctl-opt thread(*CONCURRENT);
/include include/ileastic.rpgle
// -----------------------------------------------------------------------------
// Main
// -----------------------------------------------------------------------------     
dcl-proc main;

    dcl-ds config likeds(IL_CONFIG);

    config.port = 44001;
    config.host = '*ANY';

    il_listen (config : %paddr(myservlet));

end-proc;
// -----------------------------------------------------------------------------
// Servlet call back implementation
// -----------------------------------------------------------------------------     
dcl-proc myservlet;

    dcl-pi *n;
        request  likeds(IL_REQUEST);
        response likeds(IL_RESPONSE);
    end-pi;
  
    il_responseWrite(response:'Hello world');

end-proc;

Your IBM i

In this project there is lots of references to my_ibm_i both in code, development tool and test. This is of cause the name of your IBM i. You can do yourself a favor to add the name my_ibm_i to your hosts file and let it point to the IP address of your IBM i - and all the code, development tool and test will work out of the box.

Edit host file

Installation

What you need before you start:

  • IBM i 7.2 TR9 (or higher)
  • YUM installed from ACS (to install: git and make-gnu (gmake))
  • ILE C
  • ILE RPG compiler

From a IBM i menu prompt start the SSH deamon:===> STRTCPSVR *SSHD And start ssh from win/mac/linux

first install the opensource tools:

ssh my_ibm_i
yum install git
yum install make-gnu

Now you are ready to clone the ILEastic git repo:

mkdir /prj
cd /prj 
git -c http.sslVerify=false clone --recurse-submodules https://github.com/sitemule/ILEastic.git
cd ILEastic
gmake  

Now you have library ILEastic on your IBM i - and you are good to go. You can simply copy the serivce programs to you own projects libraries along with the binding directory and header files. ( you can skip the *MODULE objects)

If you like to try the examples then you need to build them as well- as simple as:

cd examples 
make

Test it:

Log on to your IBM i. from a IBM i menu prompt

CALL QCMD
ADDLIBLE ILEASTIC
SBMJOB CMD(CALL PGM(helloworld)) ALWMLTTHD(*YES) JOB(helloworld) JOBQ(QSYSNOMAX) 
SBMJOB CMD(CALL PGM(staticfile)) ALWMLTTHD(*YES) JOB(staticfile) JOBQ(QSYSNOMAX) 

Look for the complete list in the examples folder - and observe which port they are "listening" at.

Now test it in a browser:

  • http://my_ibm_i:44000 Hello world
  • http://my_ibm_i:44001 Simple website demo

Please note that the job requires ALWMLTTHD(*YES)

Develop

You compile the project with gmake, and I have also included a setup folder for vsCode so you can compile any changes with Ctrl-Shift-B You need however to add the name my_ibm_i to your host file since the .vsCode/tast.json file referes to this name. The compile feature also requires that you have SSH started: STRTCPSVR *SSHD

Unit Tests

For executing the unit tests located in the folder unittests you need to previously install either iRPGUnit or RPGUnit.

Moving on

So far we have implemented the basic features like il_listen , il_responseWrite and il_addRoute - look at the prototypes in ILEastic.rpgle header file for the complete list of features. There is still much work to do, however - all the plumbing around with git / compile / deploy is working. We at Sitemule.com are striving to move the core of the IceBreak server into the ILEastic project over the next couple of months. So stay tuned.

Note

This project was initially call Node.RPG, however people could not find the node.js code :) so obvously it was a bad name. Thanks for the feedback pointing me into a better direction.

Happy ILEastic coding

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].