Several months ago when I decided to get more involved with the SAFE network project I decided to start learning Rust, not only because I was curious to understand why the whole project was moved to this programming language, but also because I wanted to be able to understand the SAFE network core library’s code. So I started exploring it and I started to think of what project I could use as a driver and excuse to learn about different aspects of the language.

All these shy thoughts and desires about learning the Rust language and the SAFE network Rust libraries led me to think that developing a small application on a Raspberry Pi would be cool and fun to do, so I started digging into how current IoT protocols work, specially what was their communication protocol, since I heard a lot of buzz about it but wasn’t sure what was the big deal with it.

I found out that there are several frameworks and protocols out there (e.g. MQTT and CoAP) but they are all pretty much having similar issues, and their challenge seems to be mainly related to security and NAT (to connect to the devices in different networks). Then I found out that the way they all seem to solve it is by having servers/brokers in the network, which not just adds complexity to the development of the devices’ software, but it also brings in security concerns about who you are sharing the information with when your IoT things need to communicate using these servers, you are forced again to trust third parties.

At this point, it wasn’t so difficult for me to realise that the SAFE network was an excellent fit for it as it solves all these issues without me needing to worry about them, or to learn about them in the first place, I could just focus on developing the logic of my device!. And soon after, I realised that it would be really nice if this could be taken even a step forward: what if I don’t even need to understand much of the SAFE network and be able to integrate my IoT device easily?, and that was when having an IoT framework for the SAFE network was a trivial thing to imagine for me!

So that’s how, since then, I ended up working on this project and I’m really excited about sharing this idea with all of you today.

I’ve been working on the design and implementation of it, and even that the code is still not ready to share and I prefer to wait a bit longer before publishing it (since one of the goals is to be easy to understand), I didn’t want to wait any longer before sharing details of the project with you, as you will see what’s the whole purpose of it and the way I’m personally looking at it.

I therefore put some documentation together to share so I can receive early feedback and thoughts about it from all of you. This documentation explains the technical aspects of it, but more importantly the goals of the project which I really would like to highlight and I will be looking for support for.

github.com bochaco/safe_thing/blob/master/README.md # SAFEthing Framework **S**ecure **A**ccess **F**or **E**very**thing** ### Project Goals - Provide IoT software developers with an easy and straight forward way to integrate their IoT devices to the SAFE network without worrying about network, security and/or authentication & authorisation protocols. - Create a project which can be used as a knowledge base for developers trying to learn and implement software for the SAFE network. - Allow the SAFE network community to participate in a project which creates added value for the SAFE network, and which leads to help promoting it and to achieve mass adoption. - Ultimatly, **have the next-gen IoT framework and communication protocol to be designed and developed by the SAFE network community itself!** ### The Library and API The SAFEthing library is composed of several parts but its core is just a Rust crate with a simple and well defined Rust API. Internally it contains all the mechanisms to communicate with the SAFE network thru the [safe_client_libs](https://github.com/maidsafe/safe_client_libs), abstracting the client application from all of it without the need for the application developer to even understand how the SAFE network works. In an analogous way as to how the SAFE network itself provides different programming languages bindings, there will be a SAFEthing Rust FFI interface which can be used to interact with the API from any programming language, like C/C++, but also a set of different language bindings so people can develop their SAFEthings software even with JavaScript, Python, Lua, etc. A WebService API will also be created on top of the Rust API to allow the communication with the SAFEthings network thru a REST interface. This is mainly intended to support smart home devices, and tools potentially needed to provision them. ![SAFEthing Library Stack](misc/SAFEthing%20Stack.png) This file has been truncated. show original

More to come in the next few weeks, stay tuned!