Leveraging the edge network by using FogLAMP

Pepi Parask
4 min readMar 15, 2021
The edge computing is the present and the future

Last month I was thinking how important and challenging is to transmit the intelligence within the edge network and to enable the decisions taken by the “things”. This big data era dictates the necessity to process a billion tones of data that are exponentially generated from various sources within or near them. Slightly … a question has been created in my mind; Yes, please feel free to design agile ideas to transmit the intelligence into the things and edge servers, but wait…. do we need a suitable middleware to support the functionality ? to identify and organize the heterogeneous resources? to manage the entire edge-network constraint environment? to interact with various protocols such as COAP and ZigBee? to easily filter the valuable data proper for the constructed smart services? After all these concurrent questions that have blown my mind…I thought… yes! we need some kind of a lightweight data management platform to make the edge-network era easier dealing with the “things and individuals”.

So I have started searching which middleware is a lightweight solution for a simulation edge network (let's say a Rpi network infrastructure), and I found EdgeX from Linux Foundation[1], it's a very good option, it follows the microservice architecture, very innovative, portable with some kind of complex stacks, Northbound, Southbound services, and components, the Core services and explicitly well-designed additional services that propose a flexible solution to interact as a user/developer with the edge-fog-cloud continuum. The architecture is cited below:

Reference: https://www.edgexfoundry.org/

Nevertheless, I also found the open-source project named FogLAMP, for the Internet of Things and an essential component in Edge and Fog Computing. It has drawn my attention because it consumes a small amount of memory and it can be installed and executed on inexpensive Edge devices (such as my case!! Rpi). It uses similarly with EdgeX, a modular microservices architecture including sensor data collection, storage, processing, and forwarding to historians, Enterprise systems, and Cloud-based services. FogLAMP can run in highly available, stand-alone, unattended environments that assume unreliable network connectivity [2], it includes:

  • The Core service: responsible for the management of the other services, the external REST APIs, scheduling, and monitoring of activities,
  • Data transformation, and alerting services,
  • South services: for collecting data from sensors and other FogLAMP systems,
  • North services: for transmitting the data to historians and other systems
Ref: https://foglamp.readthedocs.io/en/nightly/foglamp_architecture.html

Installation and configuration of FogLAMP

Now I will provide you step-by-step the installation path that I have followed in order to install the platform in my host machine. First of all, I have to cite the specs of my machine:

  • Ubuntu 16.04.6 LTS amd64
  • 4GB RAM

FogLAMP is currently based on C/C++ and Python code and it was mandatory to install some prerequisites packages as you can see below according to the documentation: https://foglamp.readthedocs.io/en/1.3/01_introduction.html#foglamp-features

$ sudo apt-get update
$sudo apt-get install avahi-daemon curl git cmake g++ make build-essential autoconf automake
$ sudo apt-get install sqlite3 libsqlite3-dev
$ sudo apt-get install libtool libboost-dev libboost-system-dev libboost-thread-dev libssl-dev libpq-dev uuid-dev
$ sudo apt-get install python3-dev python3-pip python3-dbus python3-setuptools
$ sudo apt-get install postgresql

After the above fundamental installation steps, let’s proceed with the core installation:

FogLAMP is available on GitHub. The link to the repository is https://github.com/foglamp/FogLAMP. In order to clone the code in the repository, type:

$ git clone https://github.com/foglamp/FogLAMP.git
Cloning into 'FogLAMP'...
remote: Counting objects: 15639, done.
remote: Compressing objects: 100% (88/88), done.
remote: Total 15639 (delta 32), reused 58 (delta 14), pack-reused 15531
Receiving objects: 100% (15639/15639), 9.71 MiB | 2.11 MiB/s, done.
Resolving deltas: 100% (10486/10486), done.
Checking connectivity... done.

Because I wanted to use the latest released, stable version, by using use the git checkout command I have selected the master branch:

$ git checkout master
Branch master set up to track remote branch master from origin.
Switched to a new branch 'master'

Building FogLAMP

After the appropriate commands, I have moved to the FogLAMP project directory, and I have typed the magic word…. make !!.

$ cd FogLAMP
$ make
mkdir -p cmake_build
cd cmake_build ; cmake /home/ubuntu/FogLAMP/
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
...
pip3 install -Ir python/requirements.txt --user --no-cache-dir
...
Installing collected packages: multidict, idna, yarl, async-timeout, chardet, aiohttp, typing, aiohttp-cors, cchardet, pyjwt, six, pyjq
Successfully installed aiohttp-2.3.8 aiohttp-cors-0.5.3 async-timeout-3.0.0 cchardet-2.1.1 chardet-3.

Since, the installation revealed a problem, concerning the Makefile 284 line (python user requirements …not found), I have composed the below commands:

$export LC_ALL="en_US.UTF-8"$export LC_CTYPE="en_US.UTF-8"$sudo dpkg-reconfigure locales

Then select the option with .UTF-8 and run again the make command.

And the problem has been solved!!!!

Now feel free to experiment with the platform in order to create smart and innovative services with the support of FogLAMP!

Please feel free to share your experience!

REFERENCES:

[1] Introduction — EdgeX Foundry documentation https://docs.edgexfoundry.org/1.3/

[2] FogLAMP Documentation: https://foglamp.readthedocs.io/en/1.3/03_getting_started.html

--

--

Pepi Parask

Ph.D student — Researcher at Data and Cloud Research Group / Digital Systems — University of Piraeus