You are currently viewing Real-Time Data Update for Custom Fibre Cable Configuration using Node.JS
vteams- blog

Real-Time Data Update for Custom Fibre Cable Configuration using Node.JS

  • Post published:February 5, 2016

Client of vteam #167 was using NetSuite accounting system to manage his business accounts. For this, a quoting tool Configurator (a web based application which has the ability to generate products of MTP/MPO and conventional Fiber optic cables) was developed which allowed him to manage item pricing based on price levels. Each item pricing was calculated from this tool (Configurator). These items were pushed into NetSuite through web services. Orders were also built using this application and synchronized in NetSuite as Estimates.

Problem:

When administrative layer updates anything about products at its side, user wasn’t able to see updates without a hard refresh. This information was needed to be reflected immediately to users so that they would get to know the right information about product during configuration. For this, real-time data update without hard refresh was required while configuration of a fiber cable is updated at admin level.

Solution:

With Laravel 5.1, vteams engineer Basit Munir used Node.JS and Socket Programming to receive the updated information at user side. Laravel’s event utility was used to trigger events while update process is completed at admin section. At any event, updated information along with event nature is transmitted to user side with the help of sockets to all connected users. The received information, event’s nature and broadcast for connected users as per event’s nature was evaluated at client side.

In between the triggering of event at server side and receiving event information at client side, “Redis Server” was used as a bridge. With the help of Redis server, temporary information was stored while sending server side (Laravel) events and information to client side (Node JS).

Conclusion:

After applying the above mentioned solution, vteam #167 was able to reflect the updates from administrative layer to user layer without refreshing a page. All the information was being updated immediately on user screen.