Node.js the doppelgängers 🎭
Tags: node, javascript
Published: 2021-08-20 22:34:11

# Imitation falls sincerely flat
Or does it?

Excluding [deno](https://deno.land/), there are a handful of node.js like projects I have encountered in my travels, some are just node with a different engine, eg no WebKit, others are heavily inspired by and feel close to node, but under the hood, they are totally different beasts. 

_Because node.js isn't always perfect for everything (it's true!) there are plenty of reasons to try out these doppelgängers for very focused use cases._

## Language category:
### Java ♨️
- [Graal VM](https://www.graalvm.org/reference-manual/js/#running-nodejs) node.js but cherry flavour
- [Rhino](https://github.com/mozilla/rhino) and [Ringo](https://ringojs.org/) (omg Ringo has docs!)
- Nashorn 🪦 RIP
- [the 30+ or so other node.js on JVM projects](https://www.google.com/search?q=node.js+on+the+jvm&oq=node.js+on+the+jvm&aqs=chrome..69i57j0i22i30l3j69i60.5389j1j4&client=ms-android-oneplus&sourceid=chrome-mobile&ie=UTF-8#sbfbu=1&pi=node.js%20on%20the%20jvm)

I once said that Java wanted to be JavaScript and I cited all the above engines and Mozilla's history to show why that's true. If you are ever unfortunate enough to work in Mozilla's RhinoJS 🦏 but long for node.js like the rest of the world uses, you might find RingoJS a touch more comfortable, built on Rhino, it's not perfect but it does have a node.js like stdlib and some other old friends.

### C 📼
- [IOT.js](https://github.com/jerryscript-project/iotjs/wiki/Developer-Tutorial)
If you want node.js with a super light memory footprint then you have to ditch WebKit. IOT.js is probably the way to go, written in C with the Jerryscript C engine it's able to run on your smart fridge at lightning ⚡ speeds, it has the writing feel of node.js if it where stuck in es5 with some limitations but the stdlib is mostly there.
I was actually writing an OS using IOT.js as the application process per each app communicating to a node.js controlling process, good fun.

### JavaScript 🏚️
- [IO.js](https://github.com/nodejs/iojs.org)
Similar name to the one above, IO.js It's old but this was a fork of node.js when node.js was really behind with it's features, the story goes that IO.js forked because people where frustrated by node.js development speed, and so a group of people added a bunch of features that node.js lacked at the time, then one day they merged together again, I can't remember the details 🤷‍♂️. I wish more stuff would merge together 

### Lua 🌕
I love Lua, I know I shouldn't maybe, but I do, when I found out that Lua had a package manager I wondered if it compared to npm, naturally I looked for node js Lua type projects and found [luvit](https://www.luvit.io/docs.html) which is a node.js inspired project, this project provides the same libuv (the best programming logo of all time) backend for asynchronous I/O for Lua.

``` Lua
local http = require('http')

http.createServer(function (req, res)
  local body = "Hello world\n"
  res:setHeader("Content-Type", "text/plain")
  res:setHeader("Content-Length", #body)
  res:finish(body)
end):listen(1337, '127.0.0.1')

print('Server running at http://127.0.0.1:1337/')
```
Look it's a Lua http server example you might sort of recognise it if you squint?

### Wrapping up 💝
Well the last one I can think of, trident engine was Microsoft edges engine pre WebKit and despite the bad wrap, it's actually a really good, light and perfomant engine, I can't find the project now but there is a node.js on trident floating around on the internet, even though the browser is dead and born again, it's engine actually lives on in that.

Do you know of any pretenders? Let me know in the comments!