akera.io server is a full blown application server for Progress OpenEdge specifically designed for web/mobile applications.
Because of the efficient non-blocking I/O provided by node.js together with the myriad of modules available in npm ecosystem writing an application server to easily expose business services (REST) for web/mobile applications in node.js makes a lot of sense.
The result is a modular and very lightweight solution that is both easy to start with and can also scale as needed.
4GL Development product is not required as 4GL components are delivered in xcode format, the optional ‘Development Studio’ component does require the option to compile code and therefore will have limited functionality without it.
akera.io is built on node.js therefore the first thing that need to be done is to install node.js on your system if not available already.
Head over to the node.js download page and select the installer for your platform.
Because of the Progress runtime dependency any platform supported by Progress can be used, for the rest the only option is to run it in a Docker environment (Linux).
Since the de-facto package manager for node.js is npm all akera.io components are built as packages – the public ones available directly on npmjs.com while for the rest we have our own private repository.
This would take some time – about 30 seconds (depending on the internet speed) and make sure the system have enough space left before starting the installation as it does require nothing less than 9 MB to be available (if need be, please be prepared to drop 2-3 of your favourite mp3 songs to make room for it).
Test the installation by running the control script in a terminal.
- there is no single ‘unified’ broker configuration file, akera.io uses one configuration file per broker
- configuration file uses a simple JSON format
- is recommended to use a ‘configuration folder’ to group them in one central place
- unless specified otherwise the control script will use the user’s configuration folder as default – $HOME/.akera
The easiest way to create a new application server configuration file – sports – is to use the control script with the new command:
$ akera-server -h /opt/apps/akera new sports
? Progress installation directory /usr/dlc
? Port that the server will listen on 8900
? Initial number of agents 5
? Minimum number of agents 2
? Maximum number of agents 10
? Agent PROPATH (comma separated). /opt/apps/sports
? Agent accessible path (PROPATH relative entries, comma separated) web,rest
? Agent working folder /tmp
? Agent session temporary folder /tmp
? Agent start-up parameter file
? Procedure to run at startup
? Enable development studio (not in production). No
? Expose database content as REST No
? Expose WEBPATH file-system content as REST No
? Keep persistent procedures between requests Yes
? Messages language en
? Log File akera-server.log
? Maximum log file size(kb) 50000
? Maximum log files 3
? Log level info
? Execution timeout 3000
? Require SSL connection from clients No
? Administrator password
? Message packet size 64
Most of those are pretty much self explanatory and somehow familiar to those experienced with Progress Application Server.
The only one thing that might look odd is the ‘accessible path‘ – although it’s possible to run any business logic procedure available on PROPATH we think it’s safer to just limit client access to only those ‘services’ that were meant to be exposed instead of just everything available in PROPATH. In this example we only allow execution of procedures from ‘web‘ and ‘rest‘ sub-folders – in any of the PROPATH entries.
Database connection(s) can be specified in the start-up parameter file (.pf) if so desired just we like more to have them set in a separate configuration section – the control script will ask for this at the end, you can add as many database connections as needed (shared memory or network connection).
When you’re done adding all database connections select ‘Done’ and you’ll be prompted to save the configuration.
To update the configuration later on you can either do that directly on the JSON file if you are a vi freak or start the control script with the ‘config‘ option and follow the same flow just with the current configuration values used as presets – if you don’t want to update a property just hit enter and previous value will be kept.
There is also an ‘interactive’ (-i) option for the start command, this will keep the process in the foreground and also display log messages on the console – can be used if you want to deploy it in a docker environment (more about this later on).
This can be used for debug purposes – setting a different log level for the console can be done right after the ‘-i’ switch.
Running for : 14:01:42
Load : 0%
Free : 5
Busy : 0
Requests : 8247
Completed : 8247
Memory : 78289408
Trim agents for broker: sports…
Trim agents successfully.
Shutting down broker: sports…
Broker shutdown successfully.
Share this Post