As part of our goal to serve up more helpful content, we have created a Q&A interview series with our experts. The intention is to help answer some common and unique questions surrounding data pipelines, consulting, and today Node.js.
In this interview, we are excited to introduce all of you to Brad King, a software engineer at Mosaic. Brad has 20+ years of experience in software development and builds some cool, real-time web and geospatial applications for our clients. Word on the street is that Brad can build anything!
Q: What are some tips/tricks that everyone should know about Node.js?
Q: What are some of the biggest mistakes that people make when working with Node.js?
Q: How is Node.js relevant to data?
A: That’s an interesting question. Node can certainly be used to interface with classic relational databases and GIS databases. We use PostGIS a lot here, and can easily do whatever we need with the Node Postgres client. It gets more interesting when you look at platforms like graph databases, NoSQL databases, or API’s as data which utilize GraphQL or JSON. Node is not only supported for those architectures but is usually one of the preferred application implementations. JSON being part of the language, saves a ton of time over what legacy data formats require, such as XML parsing and data transformation. If you can store your data in JSON, you’re already a step ahead, working with data in Node.
Q: What do you think the future will be for Node.js?
A: I think it will become more prevalent in enterprise-level services and integrations as the benefits become more well known. I have a node server consuming extensive gzipped messages from an Enterprise Messaging System using AMQP for one project, extracting that payload, parsing it, and sending out optimized messages on web sockets to client applications. It barely moves the needle on CPU usage, and the code is a couple of hundred lines! Typically, this is where a larger development investment would have been made to create a Java application. Less code not only reduces development investment, but significantly reduces costs related to bugs and maintenance as well. Those savings are significant! The momentum of the Open Source community is with Node. I think NPM now has over 1 million Node.js libraries available, which is astounding.