Posts

Showing posts with the label backend

Microservices basics

Image
Microservices development is about is making the architecture at a component level work the way good development practices and well modularization the code. In simple definitions, microservices have the following characteristics. In this article, we are focusing to see these in a more practical way. Smaller scoped units of work Scale independently among other components without affecting them Focus on data and business or function domains Before going to the design patterns lets define basics for the microservices These terms can be explained via a simple example. Think about a pizza delivery system. 1. Data Service will be a product, customer in this pizza delivery system.  2. Business service is defined by data services from a business perspective. Business services can be built on a single data domain or multiple data domains. As an example order domain, we can say as business services which uses product data and customer data and also you will

Node.js how to work with Serial ports and display data on a beautiful frontend using Highcharts API Part 2

Image
Now you have some basic idea of the technologies we are using here. So let's get our hands dirty. First, we have to set up the Node js libraries correctly to handle the serial data and open a WebSocket. So simple what we here going to do is getting data from USB and put them into a GUI to visualize our data nicely. So for this tutorial, I'm going to use Arduino as my data source. Piratically this will be your sensor or devices which you are using. Here http://www.highcharts.com/  Highcharts makes it easy for developers to set up interactive charts in their web pages. This has good community support and this is best for our works. 1. First step clone this repository https://github.com/akilawickey/nodejs-serial-frontend/tree/master Here is the Arduino sketch sample.ino which I'm using to emulate data which you can find inside the repository 1: /* 2: * This code will emulate USB data 3: * 4: * 5: */ 6: // the setup function run