Open source communication accounting application in the region

Recently, we published an application for accounting for communications in the region under the free Apache 2.0 license. implemented on IONDV. Framework - open source solution based on node.js for rapid development of web applications. Communication in the regions is an important condition for the development of the territory and comfortable life. It will be an example based on the Khabarovsk Territory. And although our territory is comparable with Spain and Portugal combined, it will remain in the whole Baltic region (we won’t joke about bears on the streets of Khabarovsk - you’ll find videos on Youtube yourself), but we still don’t have cellular communications and the Internet in remote populated areas of the region, or their quality leaves much to be desired. The application is applicable anywhere and is available for use without restrictions.

How to analyze the current state of communication? How to quickly understand problem areas? How to plan the subsequent development of communications in the region? Creating a registry-type solution for maintaining industry information, preparing analytical reports on their basis and formulating development plans.

Communication web application

IONDV. Telecom, or as we call it in a team, Communication is a software solution based on IONDV. Framework , implemented for organizing, recording, storing and displaying data on the availability of communication services (Internet, mobile communications, television, mail, etc.) in the populated areas of the region, including the availability of communications at facilities of the Healthcare, Education sectors. The app is publicly available on GitHub . Traditionally, for all repositories on github there is an instruction in the README repository, but we deployed demo systems for review, without registering: .

You can also watch a short video shot just on this demo.

Some technical details

The demo is deployed on the server with 2 CPU cores and 2 GB of memory in the Yandex cloud. And on this virtual machine there are dozens of such demo applications. We tested a similar system on the same resource in another article - “Experience in bringing software implementation of the social project“ Remember everyone ”to open source software - we received up to 400 requests per second. The Communication system has more metadata - up to 3-4 depth levels.
For example, a communication object has 10 related entities (cellular, Internet, mail, television, etc.). Each of which is 3-5 more - for cellular communication it is a standard, type of connection, operator, settlement, etc. And the operator also has nesting.

But even on these resources, it behaves quite responsively, although MongoDb is not very good for fetching related data. We took the metrics - to get 10 objects in the list (in which data were displayed including related data), up to 1000-1500 queries to the database were made. In this case, the standard time for the user in the browser is in the region of 600-700 ms.

About the development of the Communication application on the IONDV platform. Framework

The application is based on IONDV technology . Framework . This is the open source node.js framework for creating high-level metadata-based web applications, which does not require serious programming skills. The core of the framework is an independent data model, kernel APIs, function modules, and presentation templates. MongoDb is used for the DBMS - it stores application settings, metadata and the data itself. The framework runs in Node.js. All together provides a cross-platform framework.

By the way, this application is key for the framework - it started the productive exploitation of the new version on node.js using mongoDB. In total, the development of the framework components for the project (geomodule, refinement of the report module) and application metadata took 2643 hours.

A little bit about the principle of creating an application on the framework. Everything is very simple - framework + modules + metadata = application. Rapid application development approach in development.

The core functionality of most IONDV applications. Framework compiles a data registry - the Register module. This is a key module designed specifically for working with data based on metadata structures.

Essentially, an application framework is those metadata structures that are initiated for the registration module. It is also great for rapid prototyping of an application - the implementation of basic business logic.

At the same time, everything that does not fit into the typical behavior of the system is expanded through HTML templates or writing new modules in JavaScript. At the same time, there is a typical portal module in which it is more convenient to make specialized interfaces using any convenient front-end framework.

Also in this application are used: 

  • analytics module for reporting, 
  • dashboard module for displaying information in the form of widgets, 
  • geodata module for displaying on the map of settlements with data on industries that are manually regulated, 
  • administrative module for managing users and access roles. Admin Control Panel. 

In the application IONDV. The Telecom register module is used to create and work on the key entities of the system - in metadata they are called classes: community, communication, healthcare and education, as well as basic and additional information.

Key Entity Examples

For example, a locality that contains information about the locality and is subsequently used to link all accounting entities - for example, communications or educational facilities. The screenshot shows the screen form. 

And here is a fragment of metadata in JSON format.

"isStruct": false,
"key": [ "okato" ],
"semantic": "name",
"name": "naselenniyPunkt",
"version": "",
"caption": "Населенный пункт",
"ancestor": null,
"container": "",
"creationTracker": "",
"changeTracker": "",
"history": 0,
"journaling": true,
"compositeIndexes": null,
"properties": [
"orderNumber": 10,
"name": "okato",
"caption": "ОКАТО",
"type": 0,
"size": 11,
"decimals": 0,
"allowedFileTypes": null,
"maxFileCount": 0,
"nullable": false,
"readonly": true,
"indexed": true,
"unique": true,
"autoassigned": false,
"hint": null,
"defaultValue": null,
"semantic": null,
"selConditions": [],
"selSorting": [],
"selectionProvider": null,
"indexSearch": false,
"eagerLoading": false,
"formula": null
"orderNumber": 30,
"name": "name",
"caption": "Наименование",
"type": 0,
"size": 128,
"decimals": 0,
"allowedFileTypes": null,
"maxFileCount": 0,
"nullable": true,
"readonly": false,
"indexed": true,
"unique": false,
"autoassigned": false,
"hint": null,
"defaultValue": null,
"semantic": null,
"selConditions": [],
"selSorting": [],
"selectionProvider": null,
"indexSearch": false,
"eagerLoading": false,
"formula": null

By the way, metadata classes can be inherited. For them, views are set separately that differ in the various steps of business processes and much more. The properties property lists the list of attributes. Learn more about metadata. You can also create metadata in the Studio application or by deploying locally from a github - it is also available under the free Apache 2.0 license.

Entity data is easily updated. For example, for an educational institution, after entering data in the basic attributes and creating the object, the “Additional Information” tab appears. In our opinion, the most interesting is the implementation of the attribute of the "Geodata" type. In the screenshot of the object card Education is a map. The address of the object is substituted from the form and the system will automatically determine the coordinates. The data on this attribute is stored in GeoJSON - i.e. could be any object in this format - not only a point, but also a polygon or line.

We will illustrate the operation of the most intuitive module - Geomap or geodata module - it uses the Yandex API to display data. You can test the demo here , and we will tell you what it shows. 

On the left are the map layers, where the “Settlements” layer is selected by default. On the map, you can click on the icon with the village. As a result, a card appears on the right with information about the presence of information and telecommunication in it. 

You can go to the “Communicating by Settlements” layer and the summary data on the regions of the region calculated in the analytical module will be displayed on the right. If you double-click on a district - only the district data will be displayed - the filter will turn on. If you double-click on the area again - the general map will return.

Information about the layers as well as how to obtain data are specified in the form of metadata in JSON. And the display method in the form of an html template.
An example of a fragment about a pop-up window with brief information from metadata for a 2G layer.

"balloonContentLayoutClass" : "

An example of an EJS template with all the mobile data displayed in the right window. In it, access to data is provided by working with the item object and its properties:

let result = {
title: item.get('name')
if (item.get('chislennost')) {
result.title += ' (' +'chislennost').evaluate() + ' чел.)';
let itemSvyaz ='svyaz').evaluate();
if (itemSvyaz) {
  • <%- result.title %>
    <% let coll ='mobile').evaluate(); if (coll && coll.length) { for (let elem of coll) { let collOp = elem.get('mobileOperator'); let collSt ='mobileStandart').evaluate(); if (collOp) { %> <% } } } } %>
  • <%-'mobileOperator').evaluate() %>
  • <% for (let element of collSt) { %> <%- element %> <% } %>

Data from the system can be uploaded for analytics in the BI system. For example, we did integration with QlickView. To simplify the work of analysts, they did not use the REST-API system, but directly connected QlickView to the DBMS through the MongoDB Connector - SQL emulation is quite high-quality for these tasks.

How to get the?

Under Linux, you can install the application in one line, if git, node.js and mongodb are installed locally using the iondv-app installer . The script will install the environment dependencies, clone all the necessary repositories of the framework, modules and applications from GitHub, collect, initiate and launch the application:

bash <(curl -sL -q -i -m localhost:27017 telecom-ru

Where instead of localhost: 27017 you need to specify the address of MongoDb.

You can also launch the docker container:

# Запустите СУБД mongodb: 
docker run --name mongodb -v mongodb_data:/data/db -p 27017:27017 -d mongo
# Запустите IONDV. Telecom 
docker run -d -p 80:8888 --link mongodb iondv/telecom-ru

After starting, open the link http: // localhost: 8888 where the demo data on the geolayer is displayed. And at http: // localhost: 8888 / registry , the back office will be available with the demo account , ion-demo password .

See also the application user guide .

What are the pros?

The main advantage of the IONDV communications registry. Telecom is a visual representation of the state of development of the telecommunications sector in the region, which allows planning improvement of the quality of the communication infrastructure, as well as providing this data in the public domain.

The solution for accounting communications is based on the open source IONDV framework. Framework, and this is open source JavaScript code and an open metadata structure in JSON, which implies complete freedom of refinement. Almost as part of Apache 2.0). You can definitely fix, improve and sell. Despite the fact that the engine is not demanding on resources - it is great for developing reliable business applications of various sizes.

Also popular now: