ConnorRigby

ConnorRigby

Nerves Core Team

Prototype to Production Nerves Screencasts

Overview

I’ve been loosely planning a series of screencasts for a Nerves based project for about a year and a half now. I believe i finally have enough content and time to start it.
This is going to be a full stack, open source “Internet of Things” project. Here is an overview of all the parts:

A wireless sensor system

This will be the main feature we build out. Many sensors and actuators will be able to report back
a central “hub” device (our Nerves application). Plans so far include:

  • Temperature
  • Humidity
  • Light level
  • Remote relays

With the capability of more being added easily. Each sensor device will be able to receive remote
firmware upgrades, but otherwise be fairly “dumb”. These devices will not themselves be Nerves
devices, instead they will be Arduino based devices to keep costs down and encourage battery life.

A central “hub” or “gateway”

This will be the Nerves application. The sensors and actuators will report their data and receive commands
to and from this “hub” device. Initially, we will target the Raspberry Pi 0 W, again to keep costs down. Eventually we may introduce support for other supported devices.

The device will be developed “offline first”. This means it will be “connected”, but will
still work when disconnected. The fleet of devices will also be managed by NervesHub. This will be how we manage pushing updates to the deployed devices. (IE devices that would have been purchased)

A cloud web application

This will be a Phoenix based web app. I personally am not a web or JS developer, so it will likely not look
the greatest at first. The backend services will be the main focus of the series. Things the web app should
be in charge of:

  • User registration/auth
  • Device registration/auth
  • Serving/receiving RESTful assets
  • Serving a frontend of some sort
  • Handling many simultaneous device connections via Phoenix channels
  • Handling many simultaneous user/frontend connections via Phoenix channels
  • ???

Initially the app will likely be deployed on DigitalOcean or Vultr. We won’t use Heroku or Gigalixir because
they terminate SSL connections before they reach the application layer. We will need SSL to validate devices against NervesHub. This will greatly simplify the logic required by the web app to validate devices.

Target Audience

No Nerves knowledge should be required, but I will likely make some assumptions when getting started with the streams. I’ll assume a basic knowledge of Elixir at a basic level. We won’t be doing anything “advanced” in either main applications, but a basic knowledge of Elixir syntax and how to work within Mix and ExUnit will be expected. I’ll also assume a basic knowledge of Phoenix or at least how an MVC framework works. I myself am certainly not an expert in Web Apps or Phoenix, so this is definitely not required.

Name

I haven’t started anything on this yet. This includes a name, domain, etc. I plan on doing all the bootstraping live. That said i could use some help picking a name for this project.

Timeline

There will probably be more casts at first to get the app bootstraped and to handle “devops” things like setting up the domains, Droplets, etc. These first few streams will likely be a little dense. Once up and running, I will likely do one or two screencasts a week, focusing on one or two small features at a time. This is mostly to prevent any burnout, and depending on how i feel, we may do more or less than this.

I will be streaming live on Twitch as I’ve used it before (I’m open to other streaming sites if someone makes a good argument). I will also publish recorded casts to YouTube as I don’t believe Twitch stores any streams once offline. I haven’t decided when the first stream will be, but I’m hoping to get started some time this week, or next. I’m thinking i will stream around 6PM Pacific time, but am open to suggestions for what time works best for the majority of users.

Licensing and other Copyright stuff

I plan on releasing all code as either MIT or APACHE-2. A final decision will be made upon first stream.

First Post!

AstonJ

AstonJ

Sounds great Connor! I love screencasts/videos :lol:

Most Liked

kip

kip

ex_cldr Core Team

Thats a fantastic idea - and exactly the project I want to tackle as a nerves newbie. Looking forward to the series!

pdgonzalez872

pdgonzalez872

Agree with everyone here, this is fantastic. Streaming in general adds a ton of value and I love that the top Elixir guys (you included) are very open to doing this now.

Sometimes it is hard to gauge the value add. Please don’t be discouraged if you don’t get many views. I believe this is important to note, since all in all that market for someone looking at Nerves stuff is not that big. With that said, the impact you can have on just one person is a better metric in my opinion.

That impact may also not come from what you expect. Value could come from something small, completely unrelated to what you are trying to relay at the time. Maybe you are trying to talk about GenServers and you create a .iex.exs file with some code to speed up an iex session instead of copying/pasting or writing stuff again. You blow someone’s mind without knowing about it. This is the true value of streaming I think, to capture the things you don’t know people don’t know.

Thanks for doing this. I just don’t want folks to be discouraged when streaming and love the fact that you are stepping up and giving back to the community. Other folks thinking about streaming, just do it please!

Rock on @ConnorRigby!

ConnorRigby

ConnorRigby

Nerves Core Team

Thanks for the support guys.
I plan on doing doing a test stream on Friday afternoon i think. This will be mostly setup of the screencap to and camera and whatnot. If i have time i will also maybe setup domains, github repos, and other things as such.
I still need to choose a name, so hopefully something comes up by Friday.. :slightly_smiling_face:

Last Post!

ConnorRigby

ConnorRigby

Nerves Core Team

Yes i have plans to continue. I plan on getting back to it in the next week or so!

Where Next?

Popular in Discussions Top

CharlesO
Erlang :list.nth simple, but 1 - based nth(1, [H|_]) -> H; nth(N, [_|T]) when N > 1 -> nth(N - 1, T). Elixir Enum.at … coo...
New
mbenatti
Following https://github.com/tbrand/which_is_the_fastest |> https://raw.githubusercontent.com/tbrand/which_is_the_fastest/master/imgs...
New
PragTob
Hey everyone, this has been brewing in my head some time and it came up again while reading Adopting Elixir. GenServers, supervisors et...
New
Nvim
Anybody knows a comprehensive comparison of Django and Phoenix, thanks for the help. Where are they similar? Where do they differ the m...
New
lucaong
Hello Elixir and Nerves community, I have been working for a while on an open-source embedded key-value database for Elixir, that I call...
230 14403 124
New
tomekowal
Hey guys! I want to create a toy project that shows a chart of temperature over time and updates every 5 seconds. I feel LiveView is per...
New
AngeloChecked
What learn first? Rust or Elixir Hi Elixir community! I’m here because i want learn a new language. I’m a junior developer and mainly i ...
New

Other popular topics Top

minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 54260 488
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
axelson
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!) This post collects co...
239 49266 226
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New

We're in Beta

About us Mission Statement