IoT Programming Languages
Now that our platform’s set up, it’s time to start writing code for our infrastructure and applications. All languages have their own strengths and weaknesses, so we choose the right tool for the job depending on whether we’re building a mobile app, a web browser, or an edge device backend.
One unique language that’s essential to our work is Elixir. Very uses this dynamic, functional language as the basis for much of our embedded software, but, as you’ll see, it’s also the foundation for key pieces in our backend stack. Elixir is fault-tolerant, concise, and practical, making it ideal for IoT.
We also make frequent use of popular languages like Java. As one of the most popular backend languages, Java offers portability and simplicity in addition to functional advantages like multithreading for CPU maximization and automatic garbage collection for RAM optimization.
Another common language that we use is Python. This high-level, interpreted language is ideal for data-intensive use cases like data science, so you’re likely to find it on top services like Redshift's data archives or SageMaker's ML engine.
Our programmers also use Google’s open-source Go language for backend development. Designed for highly scalable, distributed systems, Go emphasizes expressiveness, cleanliness, and concurrency. Dubbed the C for the twenty-first century, Go is mostly used for system programming that requires robustness and safety.
Lastly, we want to give a shoutout to Rust, which consistently ranks as one of the most beloved languages among programmers. This statically-typed code excels at speed, memory usage, and fine-tuned control. It’s commonly found in frameworks like Rocket, which we use for web app development.
We’ve got our cloud services, we’ve picked our languages, and now we’re ready for software development. The backend software stack starts with server infrastructure, systems that hold everything together by managing data, running analytics, facilitating communication between the cloud, devices, and user interfaces, and much more.
Again, depending on the use case, we’ll pick the right solution. For hosting mobile or web applications, we’ll use standard services like Apache or NGINX that are familiar to many IT professionals. We won’t dwell on these platforms for too long because we want to get right to the good stuff, the stuff that makes us unique: the IoT device backend!
The device backend starts with Phoenix, a real-time communication channel that’s built in Elixir. Phoenix harnesses Elixir’s advantages for fast, concurrent Pub/Sub messaging that sends data back and forth from our devices via the AWS IoT Core service. Another main benefit of Phoenix is its thoughtful logging capabilities.
Phoenix, in turn, forms the backbone for our next (and arguably most important) backend service: NervesHub. Co-authored by Very’s Justin Schneck, this server enables us to push out over-the-air firmware updates securely and efficiently.
Finally, we arrive at the top of the stack, the applications running on top of our servers. These span a wide gamut: data processing, predictive maintenance monitoring, user interfaces, internal storage protocols, and much, much more.
As we conclude our tour of Very’s AWS IoT cloud, there’s one takeaway that really stands out: our cloud-end stack is entirely software-defined. While there’s certainly hardware at the cloud’s foundation, and Amazon maintains the firmware for interfacing with that hardware, we don’t directly interact with it. Despite the fact that our cloud stack basically sits on top of another full tech stack, it’s still a towering creation with deep dependencies.
This demonstrates just how much weight software pulls, even in the IoT realm where we’re usually concerned with physical devices. By layering code in the cloud, we realize IoT’s greatest objectives: interconnectivity and bringing the digital world to bear on real life.
The cloud backend is just one small piece of the puzzle that our developers solve when bringing IoT connected devices to life.
Want to learn more about how we put it all together? Check out our Guide to IoT Development Frameworks and Best Practices.