Live data from Hacker News

Mongoose OS – An Open Source Operating System for the Internet of Things

mongoose-os.com

81–90 of 102 posts

Re: Mongoose OS – An Open Source Operating System for the Internet of Things

#81
Okay, so lots of comments on here and most of them are just plain wrong, FUD or stem from simple misunderstanding. Also, lots of people not groking the value proposition. Let me take a crack at clarifying some key points.

So first off, the project is GPLv2 whether you use it for commercial or non-commercial use. The team's first language is not English, they are actually Russian and based out of Ireland, so there is bound to be some confusion. What they were basically trying to say with that, is if you need the extra features and the backend, etc. Those are not GPLv2 but the project itself is--no matter how you use it--is. I mentioned it to them team and they already corrected the site.

Second, the value proposition behind this is tremendous. Remember the days before Unix and DOS/Windows ran on every machine in the world? Every machine had its own design, its own arch/cpu, its own OS, and its own interfaces. Computing was cool, but each machine was really an island. If you wanted to run your code on another machine then you had to port it over. Then Unix and CP/M-80/DOS came along and you could write something on one machine and it ran (almost) on anything with the same OS. Thats the name of the game here. This is groundbreaking for embedded/IOT development.

Real embedded development is hard enough as it is. If you're doing a one off project for something in your home, then its pretty straightforward. Now try and take that to a mass production-scale product and the level of complexity is increased 50x.

Imagine trying to bring a product to market, you need to pick a hardware platform/MCU to build with. Now imagine your suppliers hit a chip shortage and you can't use that chip, what do you? Sit back and wait for 6 months? What Mongoose OS allows you to do is write your code once and run it on multiple embedded platforms, you would just select another MCU, maybe make some minor modification to the pinouts, flash the firmware and BAM, you are back in business. Not to mention the fact that you have standard interfaces across all devices, MCUs, etc. It just makes development so much simpler.

Not only that, but you now have to manage potentially hundreds of thousands of devices (or millions if your product is really successful). What do you? How do you handle firmware updates? How do you track status of all those devices? How do you do customer support without a debug interface, well the enterprise offering (or something like AWS IOT) will help you manage that process and make your life a whole lot easier.

Now on the topic of why mJS vs. Python and a mix of C. You have to understand that embedded development is often EXTREMELY resource constrained. mJS fits into ~25K of flash space and less than 1K of RAM. This is awesome. It affords you the smallest possible functionality with the greatest possible flexibility. Write your logic in js and then call C for anything more critical/performance.

I asked one of the team members and basically what he said was (I paraphrase) that mixing C with a scripting language is a pretty production ready solution. Obviously its preferable to write the critical pieces in C and then the higher level logic in the higher level language. It would be ideal if you could have type safety and compile-time checks in the high-level language. The ideal language to write logic in would be Go, and Go 2 promises to have a smaller runtime/footprint so hopefully one day that will be a possibility.

In terms of everyone else talking about how the project is positioning itself, well let's just say that marketing is a work in progress ;)

Re: Mongoose OS – An Open Source Operating System for the Internet of Things

#82
post #74

It's sad that security isn't one of the homepage sell points of this OS. It feels like IoT is severly in need of serious "security by design". OS level would be a good start.

Security is actually one of the most important pieces of this puzzle and the team is one of the team's top priorities. Agreed it would be good to talk more about that on the homepage and everything that is being done in that respect. Mongoose is actually one of the first embedded platforms that support AWS IOT and X509 across multiple architectures

Re: Mongoose OS – An Open Source Operating System for the Internet of Things

#83

Does the world need another open source operating system for the internet of things? I wonder if creating a new one was really necessary or if they could have built on top of one that already exists. While I can't say I know intimately all the problems that need to be solved for IoT to responsibly reach mass consumption, but I'm pretty sure having an operating system wasn't the problem. Maybe this is just an enterpri…

It's definitely not a cash grab as the project is open source. There are many problems in this space that cannot be served using current solution, especially in environments that are super resource constrained. For example, this is made to run on a very small footprint of RAM, even smaller than what an embedded Linux distro would use.

Re: Mongoose OS – An Open Source Operating System for the Internet of Things

#84

Earlier quoted context omitted.

I haven't checked what Mongoose does, but it's fairly common for embedded OS's to link the application and kernel together. IOW, using the GPL may force you to give the source code to your customers if they ask for it.

So I'm a little confused on how licensing works in these types of situations. 'GPL may force you to give the source code', which source code? Presumably whatever code lives on the device that uses Mongoose is just one piece of a much larger puzzle. So does this imply you only need to give the code that lives on the device running Mongoose? Or any of your code that interacts with it?

In reality nobody knows, it's very a very complex question that has been barely explored in court.

In practice everybody acts under the assumption that the GPL affects all code that is statically linked together, but nothing else. Some people extend the interpretation to dynamic linking, but consensus is that the GPL does not affect code interoperating over other interfaces like web APIs.

Re: Mongoose OS – An Open Source Operating System for the Internet of Things

#85
post #41
post #15

> Prototyping and Scripting Engine > Micropython Moving to production (C/C++) or factoring out critical pieces to C/C++ is not trivial VS. > mJS - JavaScript engine for prototyping and C/C++ for production I don't know much about it, but from the surface it seems that the problem is exactly the same? What is the benefit of prototyping in JS instead of Python? In the end, either you refactor everything purely in C, or…

Speaking from experience, using MicroPython is trivial and often "good enough", as are implementing modules for MicroPython in C should they be needed (C isn't my first language by a long shot, but I managed to write a module for MicroPython with little problem). Also, MicroPython has pretty much all the features of core Python whereas mJS appears to have pretty much all the useful features of JS removed. Why not jus…

> Why not just use C instead of mJS?

Perhaps mjs has a repl? Don't really know, but that would be the only real advantage imo.

Re: Mongoose OS – An Open Source Operating System for the Internet of Things

#86
A recent tweet that I found funny - "Every time a conf organizer accepts a talk about #IoT using JavaScript ... somewhere in the world an IoT/embedded developer ... dies !"[1].

On a serious note though - Does anyone know a mass manufactured product (based on a uController) that actually uses anything other than C/C++?

Rust is a strong contender too, surprised to not see it mentioned here. See an older discussion about Rust on ARM Cortex M[2]

1. https://twitter.com/ppatierno/status/894575063562936321 2. https://news.ycombinator.com/item?id=14071282

Re: Mongoose OS – An Open Source Operating System for the Internet of Things

#88

Okay, so lots of comments on here and most of them are just plain wrong, FUD or stem from simple misunderstanding. Also, lots of people not groking the value proposition. Let me take a crack at clarifying some key points. So first off, the project is GPLv2 whether you use it for commercial or non-commercial use. The team's first language is not English, they are actually Russian and based out of Ireland, so there is…

look, it is shocking how you run covering the holes forgetting about security, who needs automatic device update if it can be hacked by a child??? In most cases, like the door bell, a RTOS is not only unnecessary but also risky less reliable and unefficient!!! Use an unhackable ATmega without the neeed of any OS instead

Re: Mongoose OS – An Open Source Operating System for the Internet of Things

#89

Okay, so lots of comments on here and most of them are just plain wrong, FUD or stem from simple misunderstanding. Also, lots of people not groking the value proposition. Let me take a crack at clarifying some key points. So first off, the project is GPLv2 whether you use it for commercial or non-commercial use. The team's first language is not English, they are actually Russian and based out of Ireland, so there is…

> mJS fits into ~25K of flash space and less than 1K of RAM. This is awesome. It affords you the smallest possible functionality with the greatest possible flexibility.

I agree, but having said that, I have been trying to use Mongoose on the CC3200 and it is very difficult with Mongoose and mJS. Mongoose with mJS occupies upwards of 225K of flash, and the CC3200 only has 256KB of RAM (and the program must be loaded into RAM to execute). Plus I believe you lose another 16K to the Mongoose bootloader.

But this is more of a problem with the CC3200, admittedly; 256KB of RAM isn't great for an internet-connected device.

Re: Mongoose OS – An Open Source Operating System for the Internet of Things

#90
post #88

Okay, so lots of comments on here and most of them are just plain wrong, FUD or stem from simple misunderstanding. Also, lots of people not groking the value proposition. Let me take a crack at clarifying some key points. So first off, the project is GPLv2 whether you use it for commercial or non-commercial use. The team's first language is not English, they are actually Russian and based out of Ireland, so there is…

look, it is shocking how you run covering the holes forgetting about security, who needs automatic device update if it can be hacked by a child??? In most cases, like the door bell, a RTOS is not only unnecessary but also risky less reliable and unefficient!!! Use an unhackable ATmega without the neeed of any OS instead

I hadn't covered security because at the time, it wasn't a major point of comment in the discussions. However, now that several people brought it up, it's useful to discuss.

I'll refer you to this page on the site, https://mongoose-os.com/docs/overview/security.html. It'll give you a pretty good overview of where the teams head is at. Mongoose is using ARM mbedTLS with a few patches to optimize for small memory constraints. Theres support for quite a few of the most common crypto chips which are used. All the supported cloud platforms (AWS, GCP and Adafruit I/O) as well as the mqtt support and local http/ws support all have the options to turn enable tls. The greatest think, imho is that its possible to fully encrypt the flash on the espressif chips. For those who don't know, those chips are pretty prolific in IoT and AFAIK mongoose is the only platform (aside from the Espressif SDK itself) which can do that. So pretty keen on security.

Your point about automatic device update being hacked is just FUD. There are can be multiple attack vectors on any given device, and thats why great security doesn't just happen, it has to be a pervasive part of the underlying philosophy of the platform. All the sound bases are kind of covered here, encryption on almost every level, from the application level to the transport level to the flash itself.

Post reply on HN