Note that there are some explanatory texts on larger screens.

plurals
  1. POUsing node.js in a fleet management application
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. COWhy is your application querying the db every 6 seconds? Is that necessary? I think the technology you are eluding to is a socket connection, which is not specific to node at all, and can be done with many languages including java. node also has nothing to do with java, but is a library for server side javascript. java is in no way related to javascript.
      singulars
    2. CO@dqhendricks Thanks for comment. We query it every 6 seconds because we want to provide our clients with current vehicle status as fast as possible, because most of our clients purchase our system because of this feature. So our thinking was that if it would be possible to push the data to the browser as the information became available, instead of just the client browser doing a recurring query every 6 seconds. This solution has worked fine, but as the number of trackers increases our system is becoming incredibly slow.
      singulars
    3. COWell then, you are on the right track with socket.io for the client side of your web application, but node may not make sense to be using if the rest of your server side application is written in Java. You could write the socket server on the server side using Java just as well. The real advantage to using node.js is that it is event driven with non-blocking network calls (MySQL). This means it doesn't have to create a new thread each time a connection is made, exhausting your systems memory very quickly, and it doesn't have to stop everything it is doing when waiting for a response from mysql
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload