D4no0

D4no0

What makes Nerves special?

I see that Nerves is starting to gain some real traction lately which is absolutely great (congrats to core team for their effort!), it made me want to revisit it for a more serious investigation. Thinking about potential projects, I realized that I have no idea where Nerves is used for real-world projects.

It would be great to hear on what kind of fields there are already existing solutions?

It would also be interesting to know what is the most widely used hardware in production, because while Nerves seems to support all RPIs, I have my doubts that a lot of businesses would use their chips in production, as they are not very flexible with their supply costs and quantity.

And at last, the most important question would be where a Nerves solution would be superior from the ones already existent on the market? I have a feeling that ingesting sensor data and transforming it into a server-side protocol like JSON would be very powerful, but it would be nice to see a concrete use-case.

Thanks!

Most Liked

mcarlin

mcarlin

We manufacture communications equipment, satellite and troposcatter modems. The appeal of Nerves/Elixir was the fault tolerance and small footprint (based on buildroot) compared to the Debian/Yocto type embedded Linux distros. We are not webapp people, we design hardware. The Elixir ecosystem lets us spend more time doing the signal processing and hardware dev and less time working on the various UIs (web/REST/SNMP, etc).

For a specific use case, if you ever fly on Southwest airlines, there’s a 99% chance that your in-flight connectivity is provided by a Nerves-powered modem.

Lucassifoni

Lucassifoni

My experience is mostly hobby (not meaning non-involved though) projects (and also the occasionnal freelance gig !), so consider my post with a grain of salt as I don’t experience the scaling and fleet management aspects of Nerves.. yet ?

My experience with creating devices previously meant cobbling together a raspi clone, a few atmegas if precise timing was important, a bunch of python scripts, some C, a system image, and bash scripts to glue everything together.

I guess that you have seen Sasa’s canonical slide with the table, where the right column is all Erlang ?
(https://i.redd.it/tke2stni7l051.jpg)

My experience with Nerves is exactly that. You have an (almost) all-elixir system, access to all of Hex, access to the hardware from Elixir, and the system building part is handled by Buildroot, which makes building your system mostly deterministic. You want to control your hardware from a smartphone ? Sure, just add a Liveview app to your project and configure (in Elixir) the system to create an ad-hoc wifi AP.

The number of moving parts is smashed to an absolute low. It’s a joy working with Nerves, and Nerves also acts as a gateway to learn about building Linux systems, device trees, etc, and go deeper.

I experienced that kind of deep joy when I went all-in on Elixir, and how it reduced the software complexity in my work. But what absolutely blew my hat off was discovering that a similar experience can exist for hardware projects.

I can only encourage every Elixir enthusiast who likes to fiddle to try it — it’s that good.

14
Post #7
LostKobrakai

LostKobrakai

Yes, power(/grid) management: Embedded and cloud Elixir for grid-management at Sparkmeter - The Elixir programming language

There’s also zola electric using nerves in a similar segment: https://www.youtube.com/watch?v=6MDNm7k2OoI

I cannot really apples to apples compare this to other solutions, which I’ve never deployed in practise. But having worked with nerves at sparkmeter there’s a few observations I can share:

Working on both the nerves embedded device as well as the cloud service it communicated with felt less like two independent projects talking to each other and more like one coherent service, which happens to include a lot of inconsistently available members. There’s not just the “same VM” argument, but there’s a library implementing the protocol (once) used by both sides, there’s a library with shared internal data (again not duplicated) – no real context switch needed. We even considered sharing significant parts of business logic to overcome latency constraints at some point. Elixir makes working with binary data a breeze, which is useful when you need to be mindful of how much data you send, but also for a lot of the communication to other hardware locally.

I can also attest do @Lucassifoni’s points. Nerves takes a bunch of the (one-off) decision making out of the equation, which you’d need to have if you create something just of individual pieces you picked out. It has a path of how you setup the linux system beneigh the elixir service, it brings a tool to keep the system alive (erlinit), it brings a build pipeline, it brings a tool to apply (delta-)updates (fwup).

I’d also add that I don’t think the individual pieces of nerves are particularly special. Most parts or subsets of parts you can find elsewhere as well. But nerves brought them all to elixir (and the beam) and made the pieces work as one complete package.

10
Post #8

Where Next?

Popular in Discussions Top

AstonJ
Please see the new poll here: Which code editor or IDE do you use? (Poll) (2022 Edition) It’s been a while since we first asked this, I...
208 31265 143
New
mbenatti
Following https://github.com/tbrand/which_is_the_fastest |> https://raw.githubusercontent.com/tbrand/which_is_the_fastest/master/imgs...
New
AstonJ
I’ve just started the Phoenix part of the utterly brilliant online course by @pragdave. On generating the Phoenix app he uses the --no-ec...
New
New
WildYorkies
It seems that the more I read, the more I find Elixir users speaking about all the ways that Elixir is not good for x, y, and z use cases...
New
tmbb
This is a post to discuss the new Phoenix LiveView functionality. From Chris’s talk, it appears that they generate all HTML on the serve...
342 18243 126
New
opsb
We’re considering our architecture from a viewpoint of scaling our traffic heavily over the next 6 months. Our current deployment is runn...
New
pillaiindu
I want to convert a Phoenix LiveView CRUD website to a CRUD mobile app. What do you think is the easiest way to do so?
New
arpan
Hello everyone :wave: Today I am very excited to announce a project that I have been working on for almost 3 months now. The project is...
New
shishini
I think this twitter post and youtube video didn’t get as much attention as I hoped I am still new to Elixir, so can’t really judge ...
New

Other popular topics Top

rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list. ...
New
electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
jaysoifer
Is there a way to rollback a specific migration and only that one (“skipping” all the other ones)? Would mix ecto.rollback -v 200809061...
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set? Thanks.
New
chrismccord
As promised, the first release candidate of Phoenix 1.3.0 is out! This release focuses on code generators with improved project structure...
New
Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
Lily
In templates/appointment/index.html.eex: <%= for appointment <- @appointments do %> <tr> <td><%= appoi...
New
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New

Latest on Elixir Forum

We're in Beta

About us Mission Statement