Accusoft Hosts Tampa Node.js Meetup
On Thursday, May 30, 2019, Accusoft hosted the Node.js meetup group at the East Annex Technology Center in Tampa, Florida. The presentation was led by two Accusoft employees: Charlie Davis, Software Engineer III and Shayne Fitzgerald, Software Engineer II.
With a great group of novice to advanced developers in attendance, the meetup started with networking and snacks. â€śItâ€™s a great opportunity for developers to meet other professionals from their area and learn whatâ€™s happening in Tampa dev,â€ť says Eric Gee, Software Development Manager at Accusoft.
The presentation began with a demonstration on how to set up a node project that uses native modules. Building from this foundation, the presenters provided performance comparisons of executing a program as a native module, a child process, or a multi-threaded node program.
Davis covered a variety of topics including Node.js worker threads, child processes, and more. Some high-level takeaways include:
- Node.js is fantastic for i/o related work (e.g. handling http requests, reading/writing files from a file system, etc.) but not so great at handling cpu-intensive tasks (e.g. complex computations, cpu-bound work, etc.)
- Worker threads are a new â€śexperimentalâ€ť addition to Node 12 that are being touted as a way to be able to do cpu-intensive tasks in node with better performance.
- The reality is that worker threads only provide a marginal performance increase over existing Node constructs like forking a child process.
- A developer that cares about performance should really choose to not perform their cpu-intensive computation in Node at all but rather execute a C++ or other native program from a Node context instead.
- They can do this by executing a C++ program in a child process or by building a C++ add-on in Node
â€śTo sum it up, developers need to know what the strengths and weaknesses of their tools are, and then choose the correct tool for the job,â€ť Davis summarizes. â€śYou wouldn’t use a hammer to saw wood. You might be able to duct tape a knife to the back of your hammer, but you should really just use a saw.â€ť
The duo put a smile on everyoneâ€™s face as they presented the content. Everyone left with new information and like-minded professional connections. â€śWe had a great turnout of beginner to intermediate developers from the Node.js Tampa community. Those who attended will hopefully be able to more effectively write performance enhancements for their node applications,â€ť says Davis.
Node.js is an open group dedicated to developers that are interested in learning more about Node.js and related coding techniques. The group is open to anyone thatâ€™s interested with no experience necessary. Keep your eye out for the next Node.js meetup on meetup.com.