Build an IoT App With InfluxDB

Rate this content
Bookmark

InfluxDB is an open source time series database that empowers developers to build IoT, analytics and monitoring software. It is purpose-built to handle the massive volumes and countless sources of time-stamped data produced sensors, applications and infrastructure.


This workshop showcases a fully functional sample application called IoT Center that is built on InfluxDB. This application demonstrates the capabilities of the InfluxDB platform to develop a JavaScript-enabled time-series-based application. It collects, stores and displays a set of values that include temperature, humidity, pressure, CO2 concentration, air quality, as well as provide GPS coordinates from a set of IoT devices. With this data stored in InfluxDB, the application can query this data for display as well as write data back into the database.


This hands-on workshop will show students how to install this open source code to learn how to query and write to InfluxDB using the InfluxDB JavaScript client, and gain familiarity with the Flux lang query language which is designed for querying, analyzing, and acting on time series data. And finally, collect and visualize performance data of the Node JS application.

105 min
17 Jun, 2021

Video Summary and Transcription

The Workshop introduces IoT Center, a simple IoT application that integrates with InfluxDB for data capture and visualization. It covers the installation and configuration of InfluxDB and IoT Center, as well as querying and visualizing data. The workshop also explores the use of client libraries for InfluxDB, adding geo-visualization to the dashboard, and monitoring Node.js applications with InfluxDB. Overall, it provides a comprehensive overview of using InfluxDB for IoT applications and data analysis.

1. Introduction to IoT Center and InfluxDB

Short description:

Hello, everybody. I would like to start with a workshop called IoT Center, which is a very simple IoT application that we're going to improve today. We're gonna, we are not going to build the full application from scratch because we have a limited time. In the beginning, I would like to briefly introduce InfluxDB, which is a database that we are using behind the IoT center and the IoT devices. Then, I will introduce briefly the IoT center application itself. Then we all together will install this application from Git. And then we're gonna play with, directly with InfluxDB because we need to know how to get data from this database that are stored by the IoT devices. Then we will look also to JavaScript client library that is used in the IoT center as a client that is accessing the InfluxDB. And then the most challenging workshop item is to add new widget into the IoT center, into a dashboard there that will show also the location of the device, track of the device. And the last chapter and last part is focused on the monitoring of any Node.js application because we implemented into IoT center also a basic monitoring that is also storing data into InfluxDB and you can build your own dashboard that are monitoring the application itself. So this is the agenda for today.

♪♪ Hello, everybody. I would like to start with a workshop called IoT Center, which is a very simple IoT application that we're going to improve today. We're gonna, we are not going to build the full application from scratch because we have a limited time.

So, my name is Miroslav Maleha. I am a product manager at Bonitoo. And today this is the agenda that we're going to go through. In the beginning, I would like to briefly introduce InfluxDB, which is a database that we are using behind the IoT center and the IoT devices. Then, I will introduce briefly the IoT center application itself. Then we all together will install this application from Git. And then we're gonna play with, directly with InfluxDB because we need to know how to get data from this database that are stored by the IoT devices. Then we will look also to JavaScript client library that is used in the IoT center as a client that is accessing the InfluxDB. And then the most challenging workshop item is to add new widget into the IoT center, into a dashboard there that will show also the location of the device, track of the device.

And the last chapter and last part is focused on the monitoring of any Node.js application because we implemented into IoT center also a basic monitoring that is also storing data into InfluxDB and you can build your own dashboard that are monitoring the application itself. So this is the agenda for today. During the whole workshop, if you have any questions, please use Discord, there is a channel called JuneIoT with InfluxDB, so feel free to ask there for help. You can ask for the questions that we will go through at the end of this workshop, as well as feel free to add there your comments. All the decks I have uploaded into this channel as well, so it is very helpful to open these files as well to copy-paste the commands from the deck into your command line or the source code of the IoT Center because the workshop part, the practical part, will require some typing and it is much faster to copy-paste it from the deck itself.

Before I start, let me introduce briefly also Bonitoo, which is a R&D company delivering services, almost all kinds of services around the development beginning with architecture, development ending with also the operation of the systems. We are also focusing to monitoring solutions and we are tightly collaborating with Influxdata company. We develop various types of software assets for this company, including the client libraries that we're gonna use during this workshop. So let's start with introduction of InfluxDB. InfluxDB is a time series platform. It can handle huge amount of data with timestamps. This is the primary purpose of this system or this solution. And you can easily share the data across multiple teams. InfluxDB is able to get the data from many different data sources. Later on, I will show you some examples and it's available as open source. Or there is an open source version that you can freely download and use it as you need. I will say the biggest benefit of InfluxDB, or one of the big benefits is also that you can use it very quickly. In a few minutes, you can install it and use it without any extensive training. And later on, you will see that it's really simple. There is a very strong focus to developers, except the client libraries that I mentioned in the beginning. There are also a lot of templates, of dashboards and data sources that you can download from the repository. There is a very strong open source community. So you can get a lot of information about InfluxDB, as well as to contribute to this community. And it's not just about a database where you can store the time series data, but part of this ecosystem is also Telegraph server, which is able to process data and get data from various type of systems more than 200 and push it into InfluxDB as well as to other data sources.

So what are the key capabilities of InfluxDB platform? The first part is focused on data accumulation or ingestion, how to gather the data from various systems into InfluxDB. In most cases you can use Telegraph, but there are some other approaches as well. Like you can use internal language Flux to get and join data from other databases and then process it inside InfluxDB. You can store the data, you can visualize the data, You can analyze the data inside InfluxDB, as well as you can configure alerts and notifications in case some specific value reached some threshold that is defined. You can run it on your machine locally, as well as there is a cloud version of InfluxDB that you just need to register. From InfluxDB, you can again push the data into various systems. You can use other visualizations and technologies like Grafana as well as, in case of the RL alerts, you can use various technologies to notify the right users, like Slack or page duty and so on. So, this is the whole ecosystem. We're going to use mainly InfluxDB itself in this example, but it can be easily extended. There is another option if you don't want to install it and this is also the approach that we're going to use during this workshop. We can also use a cloud version of InfluxDB. So, we can login into this address and you can register your email or account there, create the account, select the subscription. There is a free subscription, which is time unlimited. There are some limitations from data point of view, but you can still use it as long as you wish.

2. Introduction to IoT Center

Short description:

InfluxDB is an open source database that supports many platforms. IoT Center is a simple application for capturing data from IoT devices, integrating with InfluxDB, and visualizing data. It uses Node.js and React, and includes a virtual device for testing. The architecture consists of the IoT center, InfluxDB, and virtual devices. IoT devices are connected to the center and push data to InfluxDB. The center provides device configuration and generates data for visualization. The IoT devices can measure various parameters. The main functions of the IoT center are device registration, virtual device data generation, and a dashboard for visualization.

And in case you need more, you can also upgrade to some better subscription. As I already mentioned, you can also run it locally. So, the open source version is available. You can download it and use it. It is supporting many different platforms. So, this was the brief introduction of InfluxDB.

And now, let me jump to the next section and next part, which is the introduction of the IoT Center itself. So, what is IoT Center? IoT Center is a very simple application, which is able to capture data from unlimited amount of IoT devices. This application has been developed for education purposes. So, it's not a production application that you can use as it is, but it's very helpful to understand or helpful to quickly understand how you can develop similar applications for your solutions that is able to configure the IoT devices, process data from the IoT devices, as well as visualize data in your application. It is showing how to integrate with InfluxDB. So we can write measurements into InfluxDB and there are many examples inside for this application. In opposite, in order to show data in dashboards you will see also how to query InfluxDB. And because of the management of IoT devices and these devices have separated dedicated access rights per device, it is also automatically creating tokens that these devices are using to push the data directly into InfluxDB. IoT Center is using Node.js, or it's based on Node.js and it's using React framework to visualize the data and part of this solution, we developed also something called virtual device, which is emulating a real IoT device, the main purpose of this is to be able to use and play with the IoT Center, even when you don't have any IoT devices connected into the IoT Center. So even in this case, you can use it and we gonna use it during this workshop as well. Everything is available on Git. Later on, you will get the address. And because we gonna use InfluxDB Cloud, we don't need to install any database behind this, and so the application is going to use your InfluxDB Cloud account. As a part of the source code, we also developed some examples of the IoT devices. So there is a source code for two different technologies that you can connect and use as an IoT device. Later on, I will show you also some details. So let me introduce the architecture which is here. In the middle, there is the IoT center, the green part. And as I already mentioned, it's a Node.js application. It is using React. And part of this application also InfluxDB client, which is responsible for the communication between InfluxDB, which is the blue box. And there is also a virtual device, which is able to emulate the connected IoT devices. So the IoT center is able to generate data into InfluxDB to be able to visualize them and use them for education purposes. IoT center is accessible through the web browser, so anybody can access it from the web. And the last part, the last component in the architecture is unlimited amount of IoT devices, which are typically connected to... or which are communicating with IoT center because of the configuration. So the IoT, the only information that IoT device has built in is the location of the IoT Center. It is connecting once it is started or... powered on. The IoT Center provides the configuration for the IoT device and based on the configuration, which means the location of the InfluxDB credentials and other information like the refresh rate and so on. So once it gets the configuration, according to this configuration, it is pushing data into InfluxDB. The IoT devices for IoT Center can measure various types of measurements. It can measure temperature, which is mandatory and some other optional ones like humidity, GPS coordinates in case that the device is mobile, as well as some other values like pressure or VO2 or CO2 level and so on. It depends on the connected sensors to the IoT device. So this is the structure of the IoT Center. Here is the list of the three main functions that IoT Center is supporting. The first one is the registration of the devices. Then there is a virtual device option to be able to generate the data and we have a dashboard there. So how does it look? The registration of the devices looks like the screenshot on the right side. You can see there the list of devices including some additional options like you can delete the device from the configuration. You can jump to the dashboard which is showing the latest measured values and so on. You can also register the device by pressing register button. It's not necessary typically because the device is automatically registered once it is connected to the IoT center. The second functionality is the virtual device.

3. Introduction to IoT Center Features

Short description:

The IoT Center includes a virtual device option for generating data into InfluxDB without the need for a real IoT device. The data can be generated for the last seven days or a shorter period. The IoT Center also provides a dashboard for visualizing measured values, including current and historical data. The workshop goals include installing the IoT Center, adding a geo-widget to the dashboard to track the IoT device, and installing a dashboard for Node.js Application Monitoring.

Virtual device is an option to be able to generate the data into InfluxDB virtually. You don't need any real IoT device. And the way how to do it is on the right side, the top screen is a button with pencil that if you click it, it will always generate the data for the last seven days or shorter period when you run it periodically. It always reads the latest sample and generates this up to now.

And the last item in IoT center is an example of how you can visualize the data. So this page is showing what values has been measured. The current ones, as well as the historical values. You can have their filters that can select the specific device you want to see as well as you can select the time period that you want to see. So now, let me show, quickly, the real demo. This is the IoT Center running on my laptop. There is a homepage that is just explaining the purpose of this solution. In all cases, you can see on the right side in context help, which is explaining what is done inside the specific page, as well as there is a link into the source code. So you can immediately click it and see in it the source code of the specific page. As well as there is a developer guide that you can, which is linked with this application that you can see some details related to the specific page. So there are three options, you have the IOT sensor itself, then you have the link to the source code as well as there is a developer guide, which is explaining in detail how it is implemented the specific component. So this is the device registration. The second one is the virtual device. I'm going to generate the data. So first of all, we have to wait because currently it is communicating with the InfluxDB in order to get minimum, maximums and some other information. And now if I click to pencil, it will generate the data as you see, it wrote 53 measurements. So you can always generate the data as you need. And the last option is a dashboard where you can see some current values on the top of the screen, as well as some historical values. As you see, these data are generated. These data are not real, but I can switch to different time period so I can see more data, like last three days for example, as well as I can select a different device. So I can select another real device and here I can see some real measured values, hopefully. Okay, so here you can see the real sensor in the real data including some real values, current values. So this is the brief introduction of the IOT centre. Some information regarding the source code, this is the address where you can download the source code, we're gonna do it in the next phase or in the next chapter, we're gonna install it so you will get this address again. And here, let me little bit introduce and explain also the structure of the Git repository. There is a up a directory inside the Git repository that contains the IOT centre itself. There is a server side and UI side, which is running in browser. So it's separated. So there are two sub directories there. And then there is also a client Arduino, which is a source code for the Arduino devices based on ESP chips, as well as there is a very simple client Python or Python client for Raspberry Pi that you can use as a IOT device. So these are the two directories where you can download the code, which is not directly related to IoT Center, but you can download it into your device and then measure the values and push it into IoT Center. Let me briefly summarize what are the goals of this workshop. So we're going to install the IoT Center, and the first big task is to add a geo-widget. So we have the current dashboard and what we're gonna do is to add there a map with the track of the IoT device. So this is the one task. So we're gonna update and improve the existing IoT Center code. And the second goal is to install or define and install a dashboard for Node.js Application Monitoring. So here you will see how easily you can measure CPU usage, memory consumption. You can get also the information about the HTTP request, response time and so on in a few clicks. So these are the two key goals during this workshop. So now let's start with the next part. Number three, which is the installation of the IoT Center. It is, we're going to do the following steps. The first one is to register InfoSDB account. Of course, for those who already have the cloud account, you can skip this part. Then we're going to prepare the environment.

4. Installing InfluxDB and IoT Center

Short description:

To run InfluxDB, install Git command line, Node.js, and Yarn Package Manager. Get the source code from a Git repository, build the IoT Center, and set the configuration using your cloud account credentials. Create an InfluxDB Cloud account at cloud2.influxdata.com. Choose your provider, enter your company name, and select the free tier plan. Generate a new token for authentication by clicking on the 'Data' icon, selecting 'Tokens', and creating an 'All Access' token.

We need free tools to be installed in order to run InfluxDB, such as Git command line, Node.js, and Yarn Package Manager. Once we have these tools, we can get the source code from a Git repository and build the IoT Center. To run the IoT Center, we need to set the configuration using the credentials from your cloud account. So make sure you have created a cloud account for InfluxDB Cloud. After setting up the account, we can proceed with the installation of the IoT Center.

To create an InfluxDB Cloud account, go to cloud2.influxdata.com and choose either your existing Google or Microsoft account for a fast registration. Alternatively, you can fill in your name and email address to create a new account. If you choose this option, you will need to verify your email by clicking on the link sent by Influx Data Cloud. Once registered, you can select your preferred provider (Amazon Web Services, Google Account, or Microsoft Azure) and location. Enter your company name and agree to the service agreement. Choose the free tier plan for the IoT Center, as it is sufficient for our purposes. After completing these steps, you will be redirected to the main page of InfluxDB Cloud.

To authenticate the IoT Center with your InfluxDB instance, we need to create a new token. To do this, click on the 'Data' icon on the left side of the page, then select 'Tokens'. On the 'Tokens' page, click on 'Generate Token' and choose the 'All Access' token option. Name the token (e.g., 'IoT Center') and save it. Now you have a new token that will be used for authentication.

5. Registration and Token Preparation

Short description:

To register for the IoT Center, select a provider (Amazon Web Services, Google Account, or Microsoft Azure), choose a location, enter your company name, and agree to the service agreement. Select the free tier plan. Open the main page of InfluxDB and create a new token for authentication. Go to the 'Data' icon, select 'Tokens', and generate an 'All Access' token. Name the token and save it. Install Node.js and Yarn if needed.

Once you have this, you should be able to continue with the registration. The next step is to select the provider. You have three options. You can either select Amazon Web Services or Google Account or Microsoft Azure as well as you can select the location where the specific instance should be available. Then you need to enter your company name. It can be whatever you want and then agree the service agreement. Once you do all these three steps, you can click to the continue and select the specific plan. In our case for IoT center, the free account, free free plan, a free tier is good enough. So feel free to select it. There is no payment connected with this account. It's completely free. So once you click it, you should open the main page of InfluxDB. It looks like this. And, and my instance looks like this. So it is running on Influx Cloud. And this is the initial screen of InfluxDB. Okay. Once you open this page, the next step is to create a new token. This token is necessary for IoT center, because this is the way how the IoT center will be authenticated with your instance of InfluxDB. So, how to get there? I will do it together with you. So, let me close the presentation, and let me do it together with you. So, the first step is on the left side, there is an icon called the data. So, let's click it. Once we select the data, there is an option called tokens. So, let's click the tokens, and on this page, on the right side, there is a generate token option. If you click it, there is a menu, and we need all access token. The reason why we need all access token is that IoT Center is automatically creating tokens per device. And in order to be able to do this, you need all access token, not just read and write token which is able to just read and write data into or from FlexDB. So once we click all access token, we need to name it. You can name it as you want. I typically call it IoT Center in order to understand what's the purpose of this token. And click to save it. Now a new token has been created. I have to select the right one which is the last one. In your case, it will be empty of course the list. And once I open the token you will see here a long string that we need later on for the configuration of your IoT Center. So in your case, the string will be definitely different because it's a unique pair each token. Okay, so this is the preparation of the token. Let me return back to the presentation and now we will continue with the IoT Center installation. The first one is the Node installation. I hope that all of you already have it. If not, there is an address where you can install it for Mac or iOS. In case of Linux, Node.js is typically a part of the installation or you can use a package called Node.js in your Linux machine. How to test that your Node.js is properly installed? It's very simple, just by typing node. And you should get the version. In case of Linux or Mac, I can also put the version here. So here I have a Linux machine. So again, if I type node, I should get some version. The next application or the tool that we need is Yarn. So again, I'm gonna test it, whether Yarn is installed.

6. Installing IoT Center

Short description:

To install the IoT Center, make sure you have Yarn, Git, and Node.js installed. Clone the repository from GitHub and run 'Yarn install' in the IoT Center directory. If you encounter any issues, reach out to our support team. Once the libraries are installed, configure the IoT Center by editing the 'dev.bat' or 'dev.sh' file and entering the InfluxDB URL and token.

In case you don't have it, there is a package on Linux called Yarn. In case of Windows or iOS, you can download it from the page that you can see in the video. ... or in the deck.

So, again, how to test it... So, let's type YARN. Learn this version. And the same for Linux. And you should get some version. The last tool you need is GIT. I am almost sure that all of you have GIT already installed. If not, for Linux there is a git-all package that you can install. In case of Windows, there is this address where you can download the GIT package. Once you install it, verify whether you have the GIT- explosion the same as you did during the previous version.

These three tools are necessary to be able to install IoT Center. Once we verify that we have all these tools and that we installed them, the next step is to clone the repository from GitHub The command, which you can use, is in the presentation. I'm going to copy and paste it as well. So this is the command, and now I will paste it into the Windows, and I am going to do the same for Linux as well. So now we downloaded the source code of the IoT Center into your machine. Now, in order to be able to run it, first of all, we need to install all the packages. It's done through Yarn, so we need to call Yarn install, but before we will run it, we have to move to the right directory, which is IoT Center, and add, so we have to move to the server side. Now, we can call Yarn install. It will take some time. It depends on your speed of your internet connection. I am going to do the same for Windows. Typically, it takes one minute to install it. For those who have a problem with the installation of the package, feel free to use Discord. There are my colleagues that should be able to help you with the installation. There can be some issues with the version of Node.js if the note is older than version 10. And generate some error during the installation. In this case, you need to upgrade it to a version which is higher than version 10. Once we install the libraries into the IoT Center by the Yarn install, the next step will be the configuration of the IoT Center because we need to connect the InfluxDB with the IoT Center instance. So the Linux part is already done. I am still waiting for Windows. And the next step is we need to configure it, so let's jump to the next part. In order to do this, we need to edit a file called dev.bat, in case of Windows, or dev.sh, in case of Linux. So let me start with Linux part. So let me call vi, dev, sh. Ah. Quite good, this is our Windows. So, Linux is here. Now, I have a file where I need to enter three values. The first one is URL. Feel free to use any editor that you are typically using. Doesn't need to be vi. So, we need to enter there influx URL. So, let's open the page where influx DB is running. And we will copy-paste only the server address of the URL, which is accessible in the address bar of your web browser. So, let me copy the address and paste it into the file, script file. The next one is the token.

7. Configuring and Starting the IoT Center

Short description:

Let's copy and paste the organization, URL, and token into the file. Save the file and start the IoT Center. Wait for the start, which may take some time. Once it is started, you should see the IoT Center up and running on your laptop.

The token is the exact token we just generated. So let me copy the token and let me paste it into the file. The last thing that we need to add is the organization. Organization is typically the email that you use during the registration. It can be changed and if you click to the user on the left side and about you will see here the name of the organization. So let's copy paste the organization. I am going to do it again for Windows. For those that were not able to follow me, I will do it again for Windows as well. Once I enter all these free values, I can save the file. The file can be used for this start of the NituAX IoT Center. Let's do the same for Windows. Let's use Notepad for this. In case of Windows, the name will be DevBot instead of DevSH for Linux. Let's use Notepad only. Now, this is the same file, but for Windows. And again, I need to copy there all three values. The first one will be the organization. So let's copy the organization. The next one is the URL. So let's copy the URL. And the last one is the token, which means that I need to click on data tokens and select the right token. In your case, you will have only one record there. And I've got a token. So once I enter these three values, please do not copy mine values. Yeah, you should use the values from your cloud account. You will save the file. And now we can start the IoT center. In the case of Windows, we will run the path. In the case of Linux, we need to run DevSH. In my case, because I cannot use both systems simultaneously, one machine, I will select only the Windows part, in case of the Linux, the only difference is that you will type it with different commands. So let me start it. In the case of Linux or macOS, you're going to use.slashdev.sh, but I am not going to run it because in this case, I would run two instances on one machine and there would be a cord collision to be able to run both. And now we have to wait. So the Windows part is still starting. It will automatically open a webpage, but we are still waiting for the start. The first start typically takes longer time. We are using this in the development mode because later on we're going to change the files inside IOT center and we want to see immediately the changes in the UI. So that's why we're gonna run it this way. Of course, we can also build it and run it in a production mode. In this case, the start would be much faster, but before we do this, we need to build the IOT center, which is also time consuming. So let's wait. Once it is started, all of you should see the page in your browser. It typically takes again around one minute or a little bit more depends on the computer that you are using. It's absolutely necessary to enter correctly all the values that we entered into the script files. If you do there are some typo, then you will get some error later on. So the same values that you type it into the script files, script files, either the batch file or the SH file should be visible here, except token because the token is sensitive. So there are just stars instead of token. And now we can see what you should see in your case as well. So this is the IoT Center up and running on your laptop. And it is open on the homepage.

8. Writing Missing Data and Troubleshooting

Short description:

To write missing data for the last seven days, click the small pencil button on the top right of the screen. If you encounter errors, check for common issues such as incorrect organization name, URL, or token. Fix these values and run the IoT center again.

The main step that we need to do is to jump into the true device. On the left side of the menu there is a virtual device. I hear some error. And then in your case, you will probably get this table empty because you haven't write any data there yet. And what we need to do is to click the small pencil button on the top right or right top screen. So it's called write missing data for last seven days. So let's click it. It will take some time. In your case, it should write more than a few thousand or around a few thousand points, in my case only 27 because I did it recently. In case you get an error, these are the most typical errors that you can get there. On the top screen, if you cannot load the device data and there will be some error, in case there is a not enough memory which is caused by a lot of data in my instance, you need to just refresh it. But in most cases, you will get one of these errors. The first one, if you get that the organization name is not found, you probably incorrectly write the organization. So you need to fix it in the script file, defbuf or defsh, and correct the organization from the instance of your InfluxDB. In case the URL is incorrect, you get either a unsupported protocol, it typically means that you wrote there only the address without HTTPS, so this is a mandatory part of this, or you will get the issue that the existing address doesn't exist, which typically means a typo in the name of the server. The last issue could be the message is authorized, which is typically caused by incorrect token, so you copy-pasted incorrectly the token into the script file that we recently updated. So please fix these values and then please run the infostd be IoT center again.

9. Validating Data and Support

Short description:

To validate the data, open the dashboard and check for the virtual device. If you have any issues, use the support chat for assistance.

The last step, once we generate the data, is to validate whether we wrote all the data. So let me close this, and let me open the dashboard. By default, you should see the virtual device on the top of the screen. And you should see some values, the actual values as well as historical values. All these values were written by the virtual device directly from the IoT center. So we don't need any IoT device connected. But if we have a connected IoT device, we should see also some other devices in the list. So in my case, there are multiple devices. So you can see some other ones as well. If you have any issue, if you don't know how to fix it, feel free to use the support chat. There are colleagues that should help you with your issue.

10. Introduction to IoT Devices and InfluxDB Data

Short description:

We support Arduino devices and Raspberry Pi for the IoT center. You can run Arduino boards with adjusted values and connected sensors. Raspberry Pi runs Python code to push sensor data to InfluxDB. We also have a mobile application implemented in Flutter. Take a five-minute break if you have issues. The virtual device will be visible in the list of devices. We will use the InfluxDB UI to explore data from the virtual device and build a query for GPS coordinates. Log in to InfluxDB and go to the Data Explorer. Select the IoT center and the environment. Filter the data by selecting the Client ID.

In order to save some time, I will briefly also introduce IoT devices that we currently support by IoT center. We develop education code for Arduino devices. We select the development boards based on ESP chips, ESP8266 and 832. You can open it in Arduino IDE, adjust few values like the name of the Wi-Fi network, password, and the location of your IoT center, and then you will be able to run this Arduino board. Of course, you need to also connect some sensor and define the pin where this sensor is connected. The second options that we prepare for you is a Raspberry Pi, again with some connected sensor, where you can run the Python code that will get the data from the sensor and push it into InfluxDB based on the configuration of the IoT center. There are two devices and there is a solid scope, also as a part of the Git repository. We also developed an example of the application, mobile application implemented in Flutter. In this case, the Git repository addresses is a little bit different but in this case, you can run and access the IoT center from your mobile phone, from both Android as well as iOS devices or Apple devices, iPhones directly see the values there from the IoT center.

Now let me start five minutes break, for those who have issues with the IoT center, you can use this time for the fixing of the issues, and we will start in five minutes. Let me continue with the next part. Hopefully, all of you already have up and running InfluxDB, including the generated data from the virtual device. There was one question that in the list of the devices, you don't see any device. Of course, because you are using your own Cloud account, you don't have any data there yet. Once you run the virtual device, the virtual device should automatically be visible in the list of the devices as well. So in your case, the device registrations, you will see there only one item, called virtual device, which is here. So this is what you should see there in the register devices. And of course, in the dashboard, you will see there only one device, which is the virtual device. The default one, that is automatically selected if you open the dashboard. So this is the IoT center installation.

The next part is focused to how to play with the data in InfluxDB. So we're going to use the InfluxDB UI. We will log in to InfluxDB. All of you probably have it already opened. If not, we will log in there. And we're going to use a data explorer to see some measured data, in our case, the data from the virtual device. And then we're going to also try to build a system that will work with the same environment build a query that will be able to provide also the coordinates, the GPS coordinates that we will use later on for the adjustment of the dashboard page in the IoT Center to be able to show the location or track of the device historical locations of the IoT device in the dashboard. So this is what we're going to do now. So the first step is we need to log in into InfluxDB. In this case, you need to enter, again, select Google, Microsoft, or your email to log in. And all of you, we need to move to this page. So let me do it as well. So, let me close this. And if you click the top icon on the left side, you will see the same screen here, as well. And now we're going to use the Exploration or Data Explorer feature. It's accessible through the left menu or the left icon called Explorer. So let's click to the Explorer. And now, let's look to the data. So we would like to see data from the IoT center. So the first item that we need to select is the IoT center. The next one is the environment. The IoT center is generating different types of measurements. These ones are from the monitoring of the application. And the next one is the environment. Of the application. But we would like to see the environment because this is the measurement where we see the temperature and some other values from the virtual device. Then the next step is to select and filter only the data from virtual device. So let's click to Client ID. So there is a drop down. And let's select the Client ID.

11. Browsing and Querying Data in IoT Center

Short description:

In the IoT Center, select the virtual device and the Temperature field. Click Submit to visualize the data. The wizard generates a Flux command, which is explained in the presentation. The command selects the specific database, filters the data based on the time window, measurement, and client ID, and uses the mean function for aggregation. The script editor displays the measured values as a line chart. You can also view the raw data format, which is useful for developing against the database.

In your case, there will be just one virtual device. In my case, there are two because I have also the real IoT device which is running on my table which is generating some data. So in your case, we will select the virtual device. Then from the next drop down list, we're going to select the Field option and select Temperature. And that's it. So IoT center, Environment, Virtual Device, and the Temperature. Once you have this, on the right side of the screen, there is a blue button called Submit. So let's run it. And you should see something similar like I have on my screen. You can play with the data. So you can, for example, select a different window. Instead of one hour, I can select six hours, and I can see a longer period of the time. This has been generated by the virtual device. So this is the wizard-based way how you can browse the data. But this wizard is generating a code to the query in a Flux language that is accessible if you click to the button next to the submit called script editor. So if you click it, you will see the Flux command that is used to gather data from InfluxDB. Now let me, a little bit deeper, explain the command itself. So I will jump directly back to the presentation. So Data Explorer. Slide number 7. And this is the explanation of the command. So let's start with the front from the top from bucket. IoT center is selecting the specific database. It's something like database. It's called bucket, but in the real database world, it can be considered as a database with the retention policy. So we can define how long you want to keep data there, and it is automatically truncated according to the configuration. The next branch, start, and so on is the standard filter inside the query, which defines from time to specific time even to see the data. There is a vtime, range, start, and stop, which are the variables which are coming from the UI of the InfluxDB. So these values are automatically generated based on the time window that you will select in the drop-down box that we used when we were looking to the data. So this is the filter. The next one defines that the measurement is called environment. This is something like in the real database where something like select the specific database table. So in our case, we cannot select the environment. Then, we would like to see only FieldCodeTemperature. So again, it's something like selection of the specific column inside the table. And then we would like to see only the rows where the client ID is virtual device. So we will filter only the temperature from the virtual device. And then the last item is the aggregation. We are using mean function. Because if we are showing in a visualization just few points, because there is not enough room, it is going to use mean as a function that is aggregating the data into the specific amount of points which is needed by the visualization. So this is the structure of the query. What is also quite important is that if I return back to the UI of the session, so let me login back. The center environment, this virtual device is temperature. So this is the command. And through the script editor, we see the measured values as a line chart. If we want to see what's the format of the data that we can get from the Infox DB, which is extremely useful if you want to develop against the database, there is an option to view raw data. So I can click to view raw data, and then I will see a table. This is the format how you will get it into the application. So if you run this query from your application from no JS application for example, and then you will get this table, you will get CSV that will have these following values. This is very useful because then if you want to process the data here, you can see what data you will get from the specific query.

12. Querying Data and Client Libraries

Short description:

To get the GPS coordinates along with the temperature, we need to add the Latitude and Longitude fields to the query. This can be done using the Data Explorer or the Wizard in the IoT Center application. The FLUX language is used to retrieve data from InfluxDB, and it supports filtering, aggregation, and selection. The result is typically a CSV response. The FLUX language is not limited to querying and can be used for various purposes. Influx Data provides documentation on the FLUX language. Additionally, data can be pushed into InfluxDB using a pure HTTP approach with the line protocol format, which includes the measurement name, device ID, value, and optional timestamp. Client libraries offer more functionality than the line protocol.

So these are the fields, all the values that you will get. Here, and now, there is a task, how we can get also not just temperature but also the GPS coordinates. There are two fields called Lat and Long, Latitude and Longitude, that we need to add into the query in order to get these following items. Let me turn back. So how to do it? Still we're going to use the same measurement called Environment. We're going to use the same device, so this row remains the same as well. But in case of field, which is the selection of the specific columns, we need to add some additional fields. So how to do this? There are two options. One option is to use the Data Explorer so I can click to Query Builder back to the button next to the Submit and see the selected options. And instead of temperature, I will select latitude and longitude, so this is one of the options. I can use the Wizard, and I can run the Submit, and I can see the values. Of course, I can also switch from raw data into the Visualization, but in this case, because the location is not changed as quickly, you will see almost the same value all the time. And now let me jump back to the Script Editor, and let's look what has been changed. And you will see that the only item that is changed is this one. So instead of Temperature, we can see here, Latitude and Longitude. And this is something that we're going to do inside our IoT Center applications once we want to add the visualization of the location of the device. So we need to add this into our application as well. So please remember it because later on, we will use it for the extending of the IoT Center application. OK, so let me return back to the presentation. Just to summarize this, the FLUX language is used to get the data from AFLUXDB. It contains multiple rows, each row is defining typically some filtering or aggregation or selection of the data. And the result is typically a CSV response that you will process inside the application. And there is a Data Explorer that is able to play with the data. So you can see the visualization of the data directly inside the FLUXDB. The FLUX language is not used only for querying, yeah? It's a full language that can be used for almost anything you want. And there is a documentation that is describing the FLUX language on the Influx Data pages. This is the address. So feel free to look at it and play with FLUX language. OK. So this was the Data Explorer. And now there is a theoretical part again, which is the introduction of the client libraries. Before I start with the client libraries, let me mention one thing which is interesting and important. You don't need any library in case you want to push data into InfluxDB. You can use a pure HTTP, or HTTPS, approach. This is the command, and this is one of the options how you can push the data. So it's a standard POST command into HTTP. But you need to enter some basic information like the organization bucket, as well as the token inside the header. And then there is a sentence that is defining the data. The format is called line protocol, and it always contains the measurement, name of the measurement. In this case, it's CPU load short. But in our case, it was, for example, environment. Then there is a set of text which are defining, for example, the device ID and so on. In this case, it's a host and region. And then there is a value, which is the real value that you want to write into the database. And then there is an optional timestamp. So you want to define the exact time? You can either push it. If the timestamp is not there, Infloys InfloysDB automatically writes the record with the time when this record has been written into InfloysDB. So you can use the line protocol in the case of some devices. If you don't have the library, it's one of the options. On the other hand, the client libraries that I am going to introduce are doing much more than just the translation into the line protocol.

13. Using InfluxDB Client Libraries

Short description:

The client libraries for InfluxDB are more powerful than the basic HTTP protocol approach. There are different libraries for different languages, including JavaScript. The JavaScript client library is separated into two packages: InfluxDB Client and InfluxDB Client API. The client library allows you to write data to InfluxDB with just a few lines of code, and it automatically handles buffering and non-blocking writing. You can also query InfluxDB using the client library and manage the configuration of InfluxDB, such as creating and deleting buckets.

They are doing also buffering. If you have many records that are automatically aggregated, as well as it is handling if the connection fails and it needs to be reconnected, and so on. So the client libraries are much more powerful than this basic approach to HTTP protocol. So we developed, or in fact, they have developed many different libraries for different languages.

Here you can see the list of supported languages for InfluxDB 2. So almost for all key technologies, you typically can find the client library that you can use to access the InfluxDB. And there is a documentation where you can open and see the details around all these libraries. But in order to show what these libraries are able to do, please let me describe in deeper detail the JavaScript client library. Other libraries are typically used in the same way, but there are some specific things that are related to JavaScript.

So first of all, JavaScript libraries is separated into two packages. The first one is called InfluxDB Client. InfluxDB Client is used for query and writing data into InfluxDB. And it can be used on both server side as well as in the web browser side, on the web browser side. And there is an InfluxDB Client API as a second package where you can do some more advanced things like management of the data sources, configuration of the authentication, like the definition of tokens, packets, and so on. You can do also health check of the database. There are many examples attached to this library accessible from this webpage. Of course, there is also a documentation that describes in detail the capabilities of this client library.

How you can use it? I purposefully selected a few examples that are showing how simple it is. So, how to write the data, for example. You need just a few lines of this code. The first two rows here, or the first row is responsible for the connection to InfluxDB. And you can also define something called default tags. So, all the rights will always contain the host tag with the host name. So, everything will you write into the database, InfluxDB, it will always contain the whole host name. And then there is a structural point. In this case, it's a temperature, where you can add additional tags related to this, including the value. In this case, the value is generated using a random function. But then there can be, of course, some real values from the sensor. And then you need to write it. So, the right point is the way how you will write it into InfluxDB. Then once everything is written, you can close the API. So, in few lines, you can write very complex data into InfluxDB. The right is non-blocking, which is also important to mention. And it is automatically using the buffering capability. You can define how big should be the buffer and what's the timeout in order to write the data safely into InfluxDB. Another example is in opposite, how to query InfluxDB. In this case, again, you need to be connected into InfluxDB, which is this row. Then you need to define the query. This is the Flux language query from my bucket that starts with a specific time, I'm filtering the specific measurement, and then you're gonna run the queryrose function where you can process by the next part the specific data, which we get from InfluxDB. And we can also handle, of course, the errors as well as process once the list is completed. The last example is a little bit more complicated and it is using the second package, which is able to manage the configuration. In our case, we would like to create a bucket called ExampleBucket. So in this case, we need to be connected, which is this command, definition of the organization structure. So we will get the organization from InfluxDB. We will select the first one. Then we will look whether there are some buckets. If yeah, and the bucket name is the... And if there are some buckets, we will delete the buckets with the same name as the bucket we want to create, and then we will create a new bucket. So there are the options like deletion, creation of the bucket or the list of the specific items. So this is the example of the management.

14. Adding Geo-Visualization to Dashboard

Short description:

There is a documentation on this address where you can see the details of the JavaScript client. We can add additional visualizations into the node.js applications that are getting data from InfoSticky. The goal is to extend the existing dashboard to include a geo-visualization of the location history. To do this, we need to adjust the query to include latitude and longitude. We also have the option to filter the data on the server side using the geo package in InfluxDB. This allows us to display only the subset of data relevant to the current visualization.

As I already mentioned, there is a documentation on this address where you can see the details, what are the capabilities of the in JavaScript client and what you can do with the JavaScript client from the node.js application.

Okay, so this is the introduction of the JavaScript client. And now, let me continue with the, hopefully the most interesting part of this workshop, which is how we can add some additional visualizations into the node.js applications, which is getting data from InfoSticky.

The goal is to extend the existing dashboard because we have the latest values using this visualization. We have the history, historical data, using the line chart and we would like to see also the location history. So we would like to add into the dashboard something like you can see here. So the visualization with the track of the specific device. How to do this? First of all, we need to open the specific file that contains the dashboard. So let me open it. Let's open the Windows part. It will be the same directory for both windows as well as Linux. So let me start another window.

Okay, so here I have the Window so let me move to the directory which is defined here. which should be iotcenter.com app.UI.src.pages. So let's move to this directory. And there is a file called the dashboard.page.tsx that we need to open. So let's open by any editor. I am using a basic notepad in order to simplify it as much as possible. So we need to adjust the configuration of this file. What we're going to do... Oh, well, I will open it in some better editor because this editor is not using syntax highlighting, so let me open it using something else. So this is the file. This file contains the definition of the whole dashboard and now we're going to use the presentation to look at what changes we have to do in order to add a visualization, geo-visualization.

There are several steps. The first one is we need to adjust the query that we use to get the data from InfoXTD. The second step that we're going to do is to add the visualization which means that we need to add additional imports, import additional libraries, then we need to define the visualization component that needs to have data in the right format as well as we need to add this visualization into the dashboard. So these are the steps that we want to do. The first one is to adjust the query. If you look to the function called fetch device measurements, you will see that a part of this is also a definition of the query. So there is a flux command that is getting temperature, TVOC pressure, humidity, and so on. And in order to get also the coordinates, we need to adjust the query to add there the latitude and longitude. So let's copy paste the green part, the highlighted part from the deck. The file is called 06 GeoVisualization. It's on the page five. So let me open the file. Let me scroll down into the part where this flux query is defined. There is only one, and it's in the function called FetchDeviceMeasurements, and I will paste there the additional fields. So currently, we will get also latitude and longitude from InfluxDB, not only the fields which are listed here in the current source code. So this is the first step. I have already mentioned that this application is for educational purposes. So we have only one select command, or one flux command, to visualize the current values, as well as historical values, as well as coordinates, which is not typical for production use because we will get a huge amount of fields and only some of them we're going to use for the visualizations. It also can take a lot of memory. So it's quite typical that each visualization has its own query. And for geo visualization, we also have inside InfluxDB a geo package that is able to filter the data in a more smart way. And this is the set of functions which are available. So I can filter specific data according to specific regions, for example. So if I zoom into the specific map and see only the subset of the specific locations of the device, we can use the filtering based on the current view and see only the few points generated for the viewpoint of the current visualization. So we can use the functions like the ones that you can see on the screen to filter it on the server side and get only some subset of the data. In our case it's not as necessary, we are playing with just a few points or a few thousands of points, but for larger data sets it's definitely necessary.

The next one is we need to add the library.

15. Adding GEO Visualization and Monitoring

Short description:

In our case, we're going to use leaflet to visualize the data. We need to add the imports and the visualization definition. Then, add the GEO visualization to the dashboard. Open the IoT Center and see the visualization of the IoT device track. You can switch between different time periods and see the historical location of the device. If you encounter any issues, refresh the page or run a command to automatically populate the changes. After the break, we will continue with the monitoring of Node.js applications.

In our case, we're going to use leaflet to visualize the data. So we need to add these imports into the leaflet. So again, the highlighted green part, please add it into the TSX file. So let's add it here. So additional imports. So we added their additional imports. So we'll be able to use leaflet library to visualize the data from和塞普斯TV.

Another step is to add the visualization itself. It's the definition that you can copy paste from the deck. And we are going to do it and at it before the render plot function, because there are some definitions that we need to use in the source code. And we need to add it into the right place in order to have all the definition visible page controls are. Render plot. So let's edit here. Just copy paste the. Gio. OK, so Joe is here. What does it contain? It contains the transformation of flat and locate you into the right format that you can process by the flat which should be array. And then there is a definition of the leaflet visualization. So what is the default on what should be the tile server which will be used for the visualization.

The last step is we need to also add the GEO visualization into the dashboard. So if you scroll down to the end, you see the GOIGis there and the plots. And in between, you can create any other vesion of the SEO data. And actually that's all. And in between, we would like to add there also GEO. So let's add the GEO and save the file. So there are three changes. We need to adjust the query, add there the imports, add there the definition of the visualization, and the last thing, which means four changes, also add the GEO into the dashboard. And now, let's open the IoT Center. And as you see, we have the visualization. So it's automatically reloaded, because I did some changes in the code. And you can see the track of the IoT device during the last day. I can switch to, for example, seven days, because we generated data for seven days. And I should see the longer track of the device. So now, I can see the history of the data, of the location of the virtual device. We, of course, generate this data in the virtual device. But in case of the real device that is installed in some track or car, you will see the historical location and the track of the specific device within the specific time. So this is all. As you see, just by adding a few lines of the code, you are able to build a very nice component that is able to show the visualization of the location of the specific device, IoT device. If you don't see it, please refresh the page. Let's have an additional or another five minutes for you to be able to fix the potential issues, in case you still have the issues with the update of the file. You can also move to this directory, where we were editing the file and run this command. If you run this command, all these changes will be automatically populated into the Dashboard page file, and you should see this visualization, even when there were some issues with the entering of the code into the file. So this is the second option, if you don't want to edit all the things that I have just done based on these steps in this presentation. So let's have a five-minute break, and we will continue with the last part, which is the monitoring of Node.js applications.

So what we're going to do is to look how we can monitor any Node.js application. We will start with the process monitoring, so how to measure the CPU and memory consumption of the Node.js processes. Then we will look how we can measure the response time of the HTTP requests. And then we will look how we can quickly create the dashboards using the templates in InfluxDB. And the last step is how you can do and add this monitoring capability to any application, Node.js application.

16. Monitoring Node.js Application with InfluxDB

Short description:

To monitor a Node.js application with InfluxDB, you need to connect to InfluxDB using a command similar to the one used in the IoT Center. Write the measured values from the Node.js process into InfluxDB using the create point function. You can measure response time for HTTP requests and store it in InfluxDB along with additional tags. You can also use this approach for custom events. No schema configuration is needed. To visualize the data, you can use the data explorer or install a predefined template. In the InfoSDB UI, go to settings, then templates, and browse community templates. Select the Node.js monitoring template and copy the URL of the Node.js YAML file. Paste the URL in the template location and click lookup. You can then explore the tools and pages provided by the template.

And the last step is how you can do and add this monitoring capability to any application, Node.js application. Because the code from inside our center is very generic. So how you can monitor the Node.js process. The first step is, we need to connect to InfluxDB. So this is the command. In our case, this is the command from IoT center and very similar you can use in your case as well. And then the next step is to write the measured values from the process from the Node.js into InfluxDB. In this case, we're gonna use functions of Node.js, memory usage, CPU usage, and the resource usage, but the format generated or provided by these functions is not fully compatible. So there is a create point function, which is translating the measurements from these functions into a point that you can write into InfluxDB. So using these following lines, you can write the data into InfluxDB and later on you will see the result. By default, we measure, we write these measurements once at 10 seconds. In case of the monitoring of the HTTP requests that are processed by the Node.js application, you can use this approach. So you will capture or catch the response time and again, create the point. With some specific name, you can add there some additional tags. In this case, path. Also, the use method, as well as the status code. And we measure the response time as a field. So this is the way how you can measure the response time. By the way, the same approach you can use for any measurement. So if you want to, for example, store the information about some custom events inside Node.js application. Very similar approach. The creation will point at the right point you can use for any information. InfoSDB doesn't need to define the schema so you can write there any value you want using this approach without any configuration, previous configuration of InfoSDB. Later on, I will show you some example. In case of the IoT Center, what we did, we created a file called monitor.js, which is a part of IoT Center that you can copy to any project. This monitor.js also contains the link to env.js that contains the information about the location of InfoSDB, or if the location is not defined in this file, it can use environment variables like the ones that we configured when we were installing IoT Center in the script. And then the only thing you need to do is to run during the application, start this function to start the monitoring of your InfoSDB Node.js application.

How can we visualize the data? Of course, we can use the data explorer to play with the data, or we can use also some predefined template. In our case, let me open the UI of InfoSDB, how to install the template. The first step is we will click to settings. Which is the last icon on the left side of your screen in InfoSDB UI. Then there is an option called Templates. In order to find the right template, the first step is that you can click to browse community templates. In this case, it will open a page. It's a, it's a good repository where you can see long list of various templates that the community has created. If you have some interesting template, you can edit here as well. And we will select the Node.js monitoring, which is here. Yeah, so I will click to the Node.js. And now I can see here the list of files. The file I need is this Node.js YAML. So I will copy the link address or I will open the YAML and copy paste the URL from, from the web browser. Yeah, from the address bar. Once you have it, you need to paste it into the location of the template. The URL is some... The URL is some... Once you have it, you can click to lookup the template. When is it? And theencilles are showing the latest version open again. And you can see here there are some tools that are in the window. This is for example a screenshot template. It has a page, it has a...

17. Monitoring Node.js Application

Short description:

The Node.js application dashboard in InfluxDB captures data from the IoT center application, displaying response time, CPU usage, memory usage, I/O, and additional information. The dashboard can be customized and filtered by service or host. User events can be added for application monitoring, providing powerful and quick insights. Advanced solutions like NodeSource can offer more detailed information. Templates in InfluxDB include data source definitions, dashboards, and queries. The templates can be imported by adding the YAML file URL. Similar visualizations can be found in the IoT center template.

Or by the queries used by the dashboard, or some... And there can be also some configurations and so on. And the only thing you need to do is the install template. I'm not going to do this because you probably noticed that the install template that I have in this UI is already the Node.js template. So I cannot do it. But once you click the installation, you will see this link, the list of the install template in the list. So there will be Node.js template. I have additional one which is... I will descend through it, we gonna do later on.

So now let's move to the dashboard. So I will click to the boards. On the left side, there is a icon called boards. And now, after the installation of the template, I will see there a new dashboard called Node.js application on each rink. If I click to this on each rink, I will see the dashboard. And this is the dashboard which is capturing the data from IOD center application. So I can see the response time, I can see the CPU usage, the memory usage, I can see the response time, I can sort it according to the time so I can see the worst or the best responses. Like as you see, longest ones took 1.5 seconds, all of them are 1.6. I can see the I.O., I can see some additional information like response time and histogram. I can see some additional values that are provided by the resources and so on. Of course, you can edit and adjust the dashboard according to your needs. On the top of the screen, I can see also the name of the service or the name of the application, as well as I can see also the host. So if I have multiple IOC T-Centers running on the multiple hosts, I can filter and see the exact ones that I want to analyze. So this is the example of the filters. I can also see on the right side, the filter. So if I want to see some longer, longer period of the time, I can open it and see it as well. So now, you can also see that there was one query that took almost 20 seconds. Yeah, it was the query that was getting the data from Influxtick B. So if you remember the spinning wheel during this workshop, this was the case that we see here. So this is the monitoring of Node.js application. As I already mentioned, you can also add your own user events, yeah? Like this one, which is here, the user registered, that you can define, for example, his name, email, and result, and the response time, or how long it took and so on. So you can create there your own custom events that you can use for the monitoring of the application, even internally at Bonito, we are using this quite massively for the monitoring of our applications. It's very powerful and very quick way how you can capture the information that you need in a few rows of the code inside your application. This is of course some basic monitoring. There are also some much more advanced solutions that are able to monitor Node.js application like the company called NodeSource, which is using a very similar approach. It is using internally also InfluxDB to capture and store all the information about the running applications and you can get the API. You can get much more precise and more detailed information about your applications. For basic monitoring, you can use the approach that I was showing. Let me briefly describe also the templates structure. We downloaded a template that's added there at the dashboard, but the template itself can contain also the definition of data sources. It's not mandatory, but it's optional, the specific dashboards, as well as the queries. There are many dashboards. You can select the interesting ones, including the configuration. Always, the approach is, first of all, you will browse the templates, select a specific template, add there the URL of the YAML file, which defines the specific template and import it. There is a very similar template in this repository for the IoT center. So if I open and import the template for IoT center, you will see something like this. This is a very basic template, but here you can see similar values. I have to define a different filter that are showing similar values like in the IoT center application. So you can see similar visualizations in both the IoT center for all applications as well as in the UI if in case you build your own visualizations.

QnA

Q&A and Recap

Short description:

InfluxDB is a timeseries database, but it can also store configuration data in a specific bucket. The Flux language allows you to combine data from relational databases with timeseries data from InfluxDB. There were some questions about deployments, but let's recap what was covered in this webinar.

That's it from my side for today — are there any questions, Ivan, were there any questions that are interesting to answer to the whole audience? Okay, first of all Mirek, thanks a lot for your presentations with and the demo, with regards to the questions, we have quite a lot of fun in the Discord chat. Well, the questions are whether the InfluxDB is the conceptual one, is a relational database or the database that can be used to store other data Also, there is the timeseriesData that was answered by Vlasta. InfluxDB is a timeseries database only, but of course, it is possible to store also the configuration data into a specific bucket, technical bucket. I think what is worth to mention is that you can also combine the relational database with InfluxDB. In the Flux command, you can get data from the relational database and combine them with the timeseries from InfluxDB. That's true. The Flux language has connectors to relational databases and of course, it is possible to query or write to the relational databases and use the integrated environment with a timeseries as well as the relational database in one pocket. And there were a couple of the questions related to deployments to the exercises. Thanks for them. Well, but I do not see any other questions, so maybe we can recap what was already mentioned or what was already presented in this webinar.

Watch more workshops on topic

Remix Conf Europe 2022Remix Conf Europe 2022
195 min
How to Solve Real-World Problems with Remix
Featured Workshop
- Errors? How to render and log your server and client errorsa - When to return errors vs throwb - Setup logging service like Sentry, LogRocket, and Bugsnag- Forms? How to validate and handle multi-page formsa - Use zod to validate form data in your actionb - Step through multi-page forms without losing data- Stuck? How to patch bugs or missing features in Remix so you can move ona - Use patch-package to quickly fix your Remix installb - Show tool for managing multiple patches and cherry-pick open PRs- Users? How to handle multi-tenant apps with Prismaa - Determine tenant by host or by userb - Multiple database or single database/multiple schemasc - Ensures tenant data always separate from others
GraphQL Galaxy 2020GraphQL Galaxy 2020
106 min
Relational Database Modeling for GraphQL
Top Content
WorkshopFree
In this workshop we'll dig deeper into data modeling. We'll start with a discussion about various database types and how they map to GraphQL. Once that groundwork is laid out, the focus will shift to specific types of databases and how to build data models that work best for GraphQL within various scenarios.
Table of contentsPart 1 - Hour 1      a. Relational Database Data Modeling      b. Comparing Relational and NoSQL Databases      c. GraphQL with the Database in mindPart 2 - Hour 2      a. Designing Relational Data Models      b. Relationship, Building MultijoinsTables      c. GraphQL & Relational Data Modeling Query Complexities
Prerequisites      a. Data modeling tool. The trainer will be using dbdiagram      b. Postgres, albeit no need to install this locally, as I'll be using a Postgres Dicker image, from Docker Hub for all examples      c. Hasura
Node Congress 2023Node Congress 2023
33 min
Scaling up Your Database With ReadySet
WorkshopFree
The database can be one of the hardest parts of a web app to scale. Many projects end up using ad-hoc caching systems that are complex, error-prone, and expensive to build. What if you could drop in a ready-built caching system to enable better throughput and latency with no code changes to your application?
Join developers Aspen Smith and Nick Marino to see how you can change one line of config in your app and use ReadySet to scale up your query performance by orders of magnitude today.
Remix Conf Europe 2022Remix Conf Europe 2022
156 min
Building a Realtime App with Remix and Supabase
Workshop
Supabase and Remix make building fullstack apps easy. In this workshop, we are going to learn how to use Supabase to implement authentication and authorization into a realtime Remix application. Join Jon Meyers as he steps through building this app from scratch and demonstrating how you can harness the power of relational databases!
GraphQL Galaxy 2021GraphQL Galaxy 2021
143 min
Building a GraphQL-native serverless backend with Fauna
WorkshopFree
Welcome to Fauna! This workshop helps GraphQL developers build performant applications with Fauna that scale to any size userbase. You start with the basics, using only the GraphQL playground in the Fauna dashboard, then build a complete full-stack application with Next.js, adding functionality as you go along.

In the first section, Getting started with Fauna, you learn how Fauna automatically creates queries, mutations, and other resources based on your GraphQL schema. You learn how to accomplish common tasks with GraphQL, how to use the Fauna Query Language (FQL) to perform more advanced tasks.

In the second section, Building with Fauna, you learn how Fauna automatically creates queries, mutations, and other resources based on your GraphQL schema. You learn how to accomplish common tasks with GraphQL, how to use the Fauna Query Language (FQL) to perform more advanced tasks.
GraphQL Galaxy 2021GraphQL Galaxy 2021
175 min
Building GraphQL APIs With The Neo4j GraphQL Library
WorkshopFree
This workshop will explore how to build GraphQL APIs backed Neo4j, a native graph database. The Neo4j GraphQL Library allows developers to quickly design and implement fully functional GraphQL APIs without writing any resolvers. This workshop will show how to use the Neo4j GraphQL Library to build a Node.js GraphQL API, including adding custom logic and authorization rules.

Table of contents:
- Overview of GraphQL and building GraphQL APIs
- Building Node.js GraphQL APIs backed a native graph database using the Neo4j GraphQL Library
- Adding custom logic to our GraphQL API using the @cypher schema directive and custom resolvers
- Adding authentication and authorization rules to our GraphQL API

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

TypeScript Congress 2022TypeScript Congress 2022
27 min
TypeScript and the Database: Who Owns the Types?
Top Content
We all love writing types in TypeScript, but we often find ourselves having to write types in another language as well: SQL. This talk will present the choose-your-own-adventure story that you face when combining TypeScript and SQL and will walk you through the tradeoffs between the various options. Combined poorly, TypeScript and SQL can be duplicative and a source of headaches, but done well they can complement one another by addressing each other's weaknesses.
JSNation 2023JSNation 2023
29 min
I Would Never Use an ORM
What's an ORM? An Object-Relational Mapping tool (ORM) is a library to map a SQL table to a Class. In most cases, ORMs force the users to structure their code to have Model objects that include both data access and business logic.
Once upon a time, I did several projects using ORMs as I followed the common belief that they would simplify the development and maintenance of projects. I was wrong. ORMs are often a hurdle to overcome for the most complex part of a project.
As the next stop of my journey, I recommended people use the native languages of their databases, e.g., SQL. This works great for the most part, but it creates quite a struggle: there is a lot of boilerplate code to write that can be pretty tedious. I was wrong, again.
Today I'm presenting you Platformatic DB.
Node Congress 2022Node Congress 2022
31 min
Database Access on the Edge with Cloudflare Workers & Prisma
Edge functions are pushing the limit of serverless computing – but with new tools, come new challenges. Due to their limitations, edge functions don't allow talking to popular databases like PostgreSQL and MySQL. In this talk, you will learn how you can connect and interact with your database from Cloudflare Workers using the Prisma Data Proxy.
You can check the slides for Alex's talk here. 
Remix Conf Europe 2022Remix Conf Europe 2022
41 min
Remix Persistence With DynamoDB
Remix is the best React framework for working with the second most important feature of the web: forms. (Anchors are more important.) But building forms is the fun part: the tricky part is what happens when a web consumer submits a form! Not the client side validation logic but the brass tacks backend logic for creating, reading, updating, destroying, and listing records in a durable database (CRUDL). Databases can be intimidating. Which one to choose? What are the tradeoffs? How do I model data for fast queries? In this talk, we'll learn about the incredibly powerful AWS DynamoDB. Dynamo promises single-digit millisecond latency no matter how much data you have stored, scaling is completely transparent, and it comes with a generous free tier. Dynamo is a different level of database but it does not have to be intimidating.
JSNation 2023JSNation 2023
31 min
Bring AI-Based Search to Your Web App
ChatGPT took the tech world by storm. Everyone talks about it, from your CTO to your hairdresser (at least my barber does). And there are many reasons why we should all be excited about it and many other AI/ML innovations.
But how do you bring them into your tech stack, your website/backend, to work with your data and provide AI-driven search and data augmentation?
There is a new generation of AI Native databases, which use deep learning models to find answers to natural language queries. We are talking about the ability to search through text, images, videos, DNA, or any unstructured data, all with a single query.
The rule of thumb: if there is an ML model, we can search through it.
Join me to learn about the foundation blocks (LLMs and vector embeddings, Vector Databases), how they all play together and most importantly - how you can build something yourself with open-source tech.
And, of course!!! There will be a live-coding demo, where I will take you through the experience of building an AI-based search – with Weaviate, an open-source Vector Database – and adding it to an app. Now the question... should this be done in Angular, React, Vue or just pure JS ;)
#MayTheDemoGodsBeWithUs
JSNation 2022JSNation 2022
22 min
How I've been Using JavaScript to Automate my House
Software Programming is naturally fun but making something physical, to interact with the world that you live in, is like magic. Is even funnier when you can reuse your knowledge and JavaScript to do it. This talk will present real use cases of automating a house using JavaScript, Instead of using C++ as usual, and Espruino as dev tools and Microcontrollers such as Arduino, ESP8266, RaspberryPI, and NodeRed to control lights, doors, lockers, and much more.