<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	
	xmlns:georss="http://www.georss.org/georss"
	xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
	>

<channel>
	<title>javascript &#8211; Squix &#8211; TechBlog</title>
	<atom:link href="https://blog.squix.org/tag/javascript/feed" rel="self" type="application/rss+xml" />
	<link>https://blog.squix.org</link>
	<description></description>
	<lastBuildDate>Sat, 02 Sep 2017 06:29:02 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.5.8</generator>
<site xmlns="com-wordpress:feed-additions:1">121913304</site>	<item>
		<title>ESP8266 and ESP32: Interview with Sergey Lyubka from Mongoose OS</title>
		<link>https://blog.squix.org/2017/09/esp8266-and-esp32-interview-with-sergey-lyubka-from-mongoose-os.html</link>
					<comments>https://blog.squix.org/2017/09/esp8266-and-esp32-interview-with-sergey-lyubka-from-mongoose-os.html#comments</comments>
		
		<dc:creator><![CDATA[Daniel Eichhorn]]></dc:creator>
		<pubDate>Sat, 02 Sep 2017 06:29:02 +0000</pubDate>
				<category><![CDATA[Common]]></category>
		<category><![CDATA[ESP8266 tools]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[IoT Products]]></category>
		<category><![CDATA[ESP32]]></category>
		<category><![CDATA[ESP8266]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[mongoose os]]></category>
		<guid isPermaLink="false">https://blog.squix.org/?p=3012</guid>

					<description><![CDATA[Hi Sergey, thank you so much much for agreeing to this interview! Can you tell us a bit about your role at Mongoose OS? I am a technical cofounder and CTO of a company behind Mongoose OS, and set the  overall technical direction for the ... <p><a class="read-more btn btn-secondary" href="https://blog.squix.org/2017/09/esp8266-and-esp32-interview-with-sergey-lyubka-from-mongoose-os.html">Read More</a></p>]]></description>
										<content:encoded><![CDATA[<p><em><b>Hi Sergey, thank you so much much for agreeing to this interview! Can you tell us a bit about your role at Mongoose OS?</b></em></p>
<p><span style="font-weight: 400;">I am a technical cofounder and CTO of a company behind </span><a href="https://mongoose-os.com/"><span style="font-weight: 400;">Mongoose OS</span></a><span style="font-weight: 400;">, and set the  overall technical direction for the project.</span></p>
<p>&nbsp;</p>
<p><em><b>For my readers who don’t know Mongoose OS, could you please explain in one or two sentences what it is?</b></em></p>
<p><span style="font-weight: 400;">Mongoose OS was born from our commercial integration experience. We specialise in building firmware for commercial products, and we found out that firmware development, generally speaking, consists of 10% of product-specific functionality, and 90% of generic infrastructure functionality. That generic functionality includes product configuration, remote management, OTA firmware updates, cloud backend integration, security/encryption, etc. It takes huge amount of time to get it right. And most product companies reinvent the wheel, developing that infrastructure part from scratch, often compromising on things like security.</span></p>
<p><span style="font-weight: 400;">Consider a simple product &#8211; a smart plug. It is, in essence, a WiFi enabled microcontroller, with a relay to switch things on and off, and an LED for status indication. You can prototype with something like Raspberry or Arduino in half an hour.</span></p>
<p><span style="font-weight: 400;">But if you need a production firmware, with factory reset, configurable via mobile, with secure backend integration, with mutual cloud authentication, remote management, OTA &#8211; it’ll take you 6-18 months to get it right and much more time and resources to maintain and support it.</span></p>
<p><span style="font-weight: 400;">With Mongoose OS, you still can do it in a half an hour. Mongoose OS is a cross-platform IoT operating system, providing a generic infrastructure layer for smart products, targeting production environment. We have taken care of all the intricacies, constantly update and maintain it and provide an ongoing support to enterprises utilising Mongoose OS in their products. All this significantly reduces a time to market and cost of launching and maintaining the product for them. </span></p>
<p>&nbsp;</p>
<p><b><i>Who is your main target group, do you see the Mongoose OS ecosystem as an alternative to the Arduino IDE or are you focusing more on the professional embedded market?</i></b></p>
<p><span style="font-weight: 400;">Mongoose OS’s primary target are professional firmware developers and companies bringing connected products to the market.</span></p>
<p><span style="font-weight: 400;">That said, Mongoose OS is quite appealing for the maker community, because it has JavaScript engine for rapid prototyping, hassle-free build toolchain, libraries and example apps that can be reused, and more. We believe that Mongoose OS is even easier to start with than Arduino IDE, because of the JavaScript.</span></p>
<p>&nbsp;</p>
<p><b><i>Where does Mongoose OS shine compared to other ESP8266 firmwares/ platforms like ESP8266/Arduino (C/C++) or NodeMCU (Lua)? What are Mongoose’s strongest features?</i></b></p>
<p><span style="font-weight: 400;">I would emphasise several features:</span></p>
<ul>
<li style="font-weight: 400;"><a href="https://mongoose-os.com/docs/overview/rpc.html"><span style="font-weight: 400;">Remote Procedure Calls</span></a><span style="font-weight: 400;"> &#8211; you can write your function in C or JavaScript, and call it remotely via Serial, Bluetooth, HTTP, Websocket, MQTT. It’s magical, and it is the cornerstone of the Mongoose OS remote management.</span></li>
<li style="font-weight: 400;"><a href="https://mongoose-os.com/docs/libraries/remote_management/rpc-service-ota.html"><span style="font-weight: 400;">OTA firmware update</span></a><span style="font-weight: 400;"> with rollback on failure.</span></li>
<li style="font-weight: 400;"><a href="https://mongoose-os.com/docs/quickstart/using-javascript.html"><span style="font-weight: 400;">JavaScript engine</span></a><span style="font-weight: 400;"> for rapid prototyping.</span></li>
<li style="font-weight: 400;"><span style="font-weight: 400;">Many cloud integrations, like </span><a href="https://mongoose-os.com/docs/libraries/cloud_integrations/aws.html"><span style="font-weight: 400;">AWS IoT</span></a><span style="font-weight: 400;">, </span><a href="https://mongoose-os.com/docs/libraries/cloud_integrations/azure.html"><span style="font-weight: 400;">Azure IoT</span></a><span style="font-weight: 400;">, </span><a href="https://mongoose-os.com/docs/libraries/cloud_integrations/gcp.html"><span style="font-weight: 400;">Google IoT Core</span></a><span style="font-weight: 400;">, and other.</span></li>
<li style="font-weight: 400;"><span style="font-weight: 400;">Strong emphasis on production deployment. That drove many design decisions, like </span><a href="https://mongoose-os.com/docs/overview/configuration.html"><span style="font-weight: 400;">layered configuration with factory reset support</span></a><span style="font-weight: 400;">, which are not so vital for makers projects, but a must-have for production.</span></li>
</ul>
<p>&nbsp;</p>
<p><b><i>There is a lot of peripheral hardware out there which is often using interfaces like SPI or I2C. How hard is it to get new hardware (e.g. sensors/ displays) to work on Mongoose OS?</i></b></p>
<p><span style="font-weight: 400;">In most cases, it is trivial. Mongoose OS provides cross-platform I2C and SPI interfaces, so if you made your device working on one architecture, it’ll work on all </span><a href="https://mongoose-os.com/features.html"><span style="font-weight: 400;">other supported architectures</span></a><span style="font-weight: 400;">. Also, Mongoose OS has an </span><a href="https://mongoose-os.com/libs.html"><span style="font-weight: 400;">Arduino compatibility library</span></a><span style="font-weight: 400;"> which has Arduino’s SPI, I2C and GPIO API implementation &#8211; that means, if there is an existing Arduino driver for your device, it might work as-is on Mongoose OS.</span></p>
<p>&nbsp;</p>
<p><b><i>A JavaScript engine is running on the microcontroller but developers can also choose to write code in C/C++. Usually interpreters bring a certain amount of overhead in memory consumption and CPU performance compared to firmwares compiled to machine code. Do you see JavaScript code also running in production with thousands of deployed devices or is this rather for fast prototyping during development time?</i></b></p>
<p><span style="font-weight: 400;">Both use cases are possible. Our </span><a href="https://github.com/cesanta/mjs"><span style="font-weight: 400;">mJS JavaScript engine</span></a><span style="font-weight: 400;">, which we designed and developed specifically for Mongoose OS, has footprint and runtime cost indeed. We anticipate two major use cases:</span></p>
<ol>
<li style="font-weight: 400;"><span style="font-weight: 400;">Rapid prototyping during development.</span></li>
<li style="font-weight: 400;"><span style="font-weight: 400;">Not performance-critical logic in production that is changing often.</span></li>
</ol>
<p><span style="font-weight: 400;">Imagine that your device has a logic that is not performance critical, but you’d like to modify it easily in production. One of the ways to do it is to script it. If you take some sensor measurements every hour, do some simple calculations with varying parameters and report the result &#8211; JS can do it perfectly, and that justifies using JS in production. If you need to stream video data from your OV7670 camera module, it is C/C++ full stop, don’t even think about JS.</span></p>
<p>&nbsp;</p>
<p><b><i>The Particle devices can be programmed through a Cloud IDE. While your IDE also runs in the browser it’s connecting to a local server started by the command line tool. Are there any plans to offer a similar cloud based IDE? A interpreted language like JavaScript would be ideal for such a case&#8230;</i></b></p>
<p><span style="font-weight: 400;">Yes we have considered that already. There are many other opportunities &#8211; like integrating with Cloud9 or other cloud-based IDEs. Or, making plugins for Eclipse, VSCode, etc.</span></p>
<p><span style="font-weight: 400;">Currently we’re concentrating on the core functionality. Some community members are already working on extending our IDE support, so we expect news on that front soon.</span></p>
<p>&nbsp;</p>
<p><b><i>Your Mongoose OS has a dual license system. It is either licensed under GNU GPL 2.0 or a user can also pay for a commercial license. I find licensing always a bit confusing. Does the viral feature of the GPL mean that my code written in JavaScript or driver extensions in C/C++ are also under the GPL and therefore must be open sourced? Of course unless I opt-in for the commercial license…</i></b></p>
<p><span style="font-weight: 400;">Mongoose OS drivers, and other reusable pieces of functionality, are implemented as libraries. They are also hosted on GitHub, just like Mongoose OS &#8211; each library in its own repo, consolidated under </span><a href="https://github.com/mongoose-os-libs"><span style="font-weight: 400;">https://github.com/mongoose-os-libs</span></a><span style="font-weight: 400;"> organisation. All libraries are also listed at </span><a href="https://mongoose-os.com/libs.html"><span style="font-weight: 400;">https://mongoose-os.com/libs.html</span></a><span style="font-weight: 400;">. We deliberately require all contributors to release libraries under Apache 2.0 license.</span></p>
<p><span style="font-weight: 400;">Therefore, driver code is Apache and it is not infected. Anyone who uses Mongoose OS libraries, does not need to ask a permission from the library’s authors to use the code, or buy any separate license for a library. However, if the final product is commercial and uses Mongoose OS core, then a commercial Mongoose OS license should be purchased, unless the end product’s source is open to public under GPLv2 as well.</span></p>
<p>&nbsp;</p>
<p><b><i>Now I’d like to ask some more general questions about Internet-of-Things. When I design a new IoT project I am often faced with the decision how much logic I write for the embedded device and how much on the server side. In business application world we had and have a similar dilemma: running more logic in the web browser or more on the server. Recently this shifted heavily towards the client/ browser. Where are we going here with IoT devices?</i></b></p>
<p><span style="font-weight: 400;">As with many other decisions in this world, the answer to this is driven by money. In case of IoT, there is a cost associated with:</span></p>
<ol>
<li style="font-weight: 400;"><span style="font-weight: 400;">Hardware.</span></li>
<li style="font-weight: 400;"><span style="font-weight: 400;">Firmware development &amp; support.</span></li>
<li style="font-weight: 400;"><span style="font-weight: 400;">Traffic.</span></li>
<li style="font-weight: 400;"><span style="font-weight: 400;">Cloud backend development &amp; support.</span></li>
</ol>
<p><span style="font-weight: 400;">If the traffic price goes down a lot, I could stream more raw data cheaply to the server and do data processing on the cloud, and hire less expensive backend developers, rather than expensive and hard-to-find embedded developers, who can program and support local data processing. Here, shift goes towards cloud.</span></p>
<p><span style="font-weight: 400;">If the hardware price goes down, like with the Espressif chips, we have more power on the device side, and now it is feasible to have more processing locally &#8211; the shift goes towards the edge.</span></p>
<p><span style="font-weight: 400;">IoT is a large niche. Home automation use cases have their own balance for these 4 factors, other verticals, e.g. Healthcare use cases, their own. Which factors are going to win overall, is very hard to predict.</span></p>
<p><span style="font-weight: 400;">IoT itself happened because of factor (1) and (3): 20 years ago, both the hardware and traffic were already available to make smart products, but yet too expensive to make it feasible for widespread adoption. Following the Moore’s law, hardware and traffic costs dropped immensely, and now it is feasible to incorporate microcontrollers into less and less expensive products. Mongoose OS is targeting factor (2), dropping the price for firmware development down.</span></p>
<p>&nbsp;</p>
<p><b><i>Do you know the Gardner Hype Cycle with IoT today? Where will IoT have a first breakthrough in your opinion? Industry 4.0, Home Automation, Smart Cities?</i></b></p>
<p><span style="font-weight: 400;">Again, that will be driven by money.</span></p>
<p><span style="font-weight: 400;"><strong>Industry 4.0</strong>, in my opinion, will use enterprise money to optimise production costs.</span></p>
<p><span style="font-weight: 400;"><strong>Smart Cities</strong> &#8211; government money to optimise infrastructure costs.</span></p>
<p><span style="font-weight: 400;"><strong>Home Automation</strong> &#8211; enterprise money to create extra services and upsell. This is a consumer market, and IoT brings something very new. Before, vendors were selling their products, and they were loosing the connection with their customer after the purchase. If I bought a washing machine, a washing machine vendor did not have a clue about my experience, usage patterns, used functionality, etc. Now, a vendor can have a direct and continuous connection with the customers during the product life time. I believe that brands will pump significant resources money into securing and expanding their customer base using IoT technology. Also, consumer market is more agile in comparison with regulated Industry or other markets. Thus my bet would be on the consumer market, consumer-oriented niches, which includes Home Automation, Wearables, etc.</span></p>
<p>&nbsp;</p>
<p><b>Sergey, thank you so much for this very interesting interview!</b></p>
<p><span style="font-weight: 400;">It is my pleasure, thank you for taking your time!</span></p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.squix.org/2017/09/esp8266-and-esp32-interview-with-sergey-lyubka-from-mongoose-os.html/feed</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3012</post-id>	</item>
	</channel>
</rss>
