kartben / lorawan-node-simulator

Simulation infrastructure for a LoRaWAN network (gatways and end devices) that's easy to configure and run from your CLI. Also available as a Docker container.
MIT License
105 stars 14 forks source link

LoRaWAN with NodeJS - why? #2

Closed chainhead closed 3 years ago

chainhead commented 3 years ago

First off, congratulations on building this!! I am sure, many will benefit with this simulator.

Quick question: Did you choose NodeJS because of its event loop and asynchronous programming paradigm? I am curious to know, if the simulator would have benefit with a programming language that did not offer an event loop or asynchronous programming.

kartben commented 3 years ago

Hey, thanks for the kind words!

Regarding NodeJS/TypeScript, there was initially no other reason than being able to piggyback some existing libraries for packet encoding/decoding as well as a packet forwarder that saved me quite some time.

Now, that being said, I found the programming model to be well-aligned with the concepts of a network simulation (e.g simulated devices "emit" fake packets/events), and while I'm sure other programming languages would have allowed to achieve similar results, it may have resulted in a bit more boilerplate code.

kartben commented 3 years ago

I'll be closing this for now. Let me know if you have other questions!