RTErealCLIfrom SopherApps
Details
  • Name RTErealCLI
  • Summary A commandline app that gets realtime data from RTE (France) REST API, processes it and avails it to other apps in realtime via Server-side events
  • Price (Monthly) 5,000,000 UGX
  • Free Trial 7 days
  • Category ETL
  • Tags etl rest RTE extract
  • Download
Description

What RTErealCLI is:

RTErealCLI is a commandline application built with love by SopherApps, by the grace of God. Its main purpose is to process in real time the data RTE, a French Electricity Grid Agency provides in near-realtime via its Open REST API as documented at https://data.rte-france.com/ .

RTErealCLI then makes the processed data available to any other applications, as well as simultaneously saving it to a postgreSQL database chosen by the user.

Applications that need to connect to a running instance of RTErealCLI just need to connect via an HTTP URL with a unique subscriberId passed in as a query parameter.

As soon as any of those applications connect, processed data is pushed to them by that RTErealCLI as soon as it comes.

Even when those applications disconnect, they have a time frame chosen by the user in which they can connect again to RTErealCLI and receive any data they would have missed. RTErealCLI immediately recognises them by the subscriberId they passed.

These subscribing applications need not be server apps. Even a browser can receive that data. In fact, it is the browser that was used intensively for testing the app. The subscribing applications can be written in any language. They can be hosted on any server including the very server where RTErealCLI is running.

RTErealCLI can even run on your local PC (Personal Computer) as long as it has any of Linux, Windows or MacOS operating systems.

RTErealCLI comes with its own set of commands including a 'help' section and even an ability to update itself when a new version is released.

What RTE is:

Just for those of us who may not know; France has a decentralized way of balancing their electricity grid. That mechanism allows a number of players to buy and sell electricity, even when they don't have physical generation plants. RTE provides the data that helps such players make the best buying or selling decisions they can make.

This decentralized way of balancing the electricity grid is normal in Europe.

You can get more information about RTE from their official website.

Features
  • CLI: A fully-fledged CLI app with a help section
  • PostgreSQL persistent: RTErealCLI saves the realtime data to a PostgreSQL database as soon as it is received.
  • Pub/Sub Ability: RTErealCLI Disperses processed data to an unlimited number of other subscriber apps via Server-side events and a simple HTTP URL. These can go on and do extra processing.
  • Automatic Updates: At start up, it checks for new updated versions automatically and advises the user to download if there are new versions. It continues to do these checks even when running and alerts the user when new versions are released.
  • Pub/Sub persistence: Even when a subscribing app goes off for a time lower than the 'ttl' flag setting (default 1.5 days), on reconnection, all data it missed would be passed to it.
  • Configurable: Almost everything about RTErealCLI can be reconfigured. However, it comes with sensible defaults to get you running quickly.
  • Available for Major OS: Binaries for Linux, Windows and MacOS (Darwin) have been provided.
Quick Start

The application has been built for particular operating systems and architecture. The operating systems include: Linux, Windows or MacOs. The most common architecture is amd64. Start with that. If it fails then try other architecture.

  • Download the executable file. To download, go to the downloads section below and choose the version, the operating system and the architecture you want. In this section, we are assuming a UNIX system. For windows the file will be 'rterealcli.exe'.
  • Open your terminal (command line) and change your directory to the place where you downloaded the app. For example for Ubuntu, it might be:

cd ~/Downloads

  • In case you just wish to run the application on local PC, you can skip the next three steps.
  • To push the executable file to your Linux debian/ubuntu server if you wish to run the app on a server, you can use the scp command. For example for a server with user 'soppy' and IP address '134.6.4.5' with a folder 'apps', you can do:

scp rterealcli soppy@134.6.4.5:/apps

  • Log into your Linux debian/ubuntu server's terminal

ssh soppy@134.6.4.5

  • Enter your the directory where you pushed the file. For our example, it was 'apps'

cd apps

  • Ensure you have already registered with RTE and you have an RTE Base64 encoded token for accessing the RTE APIs. You also need to subscribe to every single API provided by RTE. To register, subscribe and obtain a Base64 token, follow this guide. RTE's Data Service FAQ can also be found here.
  • Run the application using the run command. For example if my Base64 scripting key is 'sopherflous' and my postgreSQL db is hosted on a server of IP address '12.4.6.7.7' running on port '5432' and the database name is 'elly_db' and the db user is 'posty' and I want to expose the CLI to port 3030 then

./rterealcli run --key sopherflous --dbhost 12.4.6.7.7 --dbport 5432 --dbname elly_db --dbuser posty --serverport 3030

  • Don't worry about having to remember all these flags. They can all be seen by running the help command.

./rterealcli help

  • That command will also show you that you can use abbreviated flags. For example for the command we ran earlier, it could have easily been run as:

./rterealcli run -k sopherflous -H 12.4.6.7.7 -P 5432 -N elly_db -U posty -s 3030

  • You can even go further and reduce the command to only have your BASE64 token and the database name if your database is on the same machine (localhost) and the database user 'postgres' still exists and has enough privileges. By default the cli will be exposed at port 8080. The command we had earlier thus becomes:

./rterealcli run -k sopherflous -N elly_db

  • When the above command runs, you will be asked to feed in the password of the database user you have opted to use and then the processing will start. The terminal will print a short description of every RTE service name received.
  • For a quick connection to the running RTErealCLI, you can visit the link http://IP_ADDRESS>:8080?subscriberId=hottestSuperFly . For our example, it would be http://134.6.4.5:8080?subscriberId=hottestSuperFly while for a local PC, it would be http://localhost:8080?subscriberId=hottestSuperFly. This is assuming you have left the --serverport flag undefined
  • Other applications can connect to it using their HTTP packages or modules that allow connecting to servers with Server-side events enabled.
  • You can stop it by hitting 'Ctrl-C'
  • When your trial license expires, your application will stop and ask you to pay for the license. Please do pay for the license so that we can keep improving RTErealCLI (and SopherApps itself).

Downloads