Sunday, August 19, 2018

Microsoft AI for Earth

AI for Earth with Jennifer Marsman @ .NET Rocks! vNext

VR/AR Art  MediSwarm  AI for Earth  FarmBeats  AI for Accessibility  Project Premonition Land Cover Mapping  Project Premonition  FarmBeats  WildMe  iNaturalist

Microsoft AI for Earth | Using AI to advance sustainability

Microsoft AI for Earth - Projects


System Design Primer

GitHub - donnemartin/system-design-primer: Learn how to design large-scale systems. Prep for the system design interview. Includes Anki flashcards.

Wasm: GoLang vs. .Net

Could "Wasm" become a universal VM for many programming languages,
the promise of Java and .NET that was never quite realized?
This very informative podcast interview suggest that it could,
both in web browsers, as well as on web servers running on NodeJS.

WebAssembly Future with Steve Klabnik - Software Engineering Daily

WebAssembly Engineering with Ben Smith and Thomas Nattestad - Software Engineering Daily


WebAssembly (wasm) is getting ready for its prime time
since all major browsers now have support for it.

Essentially, wasm provides universal "virtual machine"
with small subset of JavaScript commands, that can be provided either as a binary "bytecode" or as a script.
The performance is close to code compiled directly to machine language (i.e. factor of 2).

The security model is same as for JavaScript, meaning as good as it gets for web.
For web browsers that don't natively support wasm, there are "shims" that interpret commands in standard JavaScript, obviously with performance penalty, (i.e. factor of 5).
Wasm is already fast enough even for many action games, that used to be possible only with native apps. And since wasm apps are pure web apps, the distribution is quite optimal.

Except for C and C++ programs (usually games), it is in theory possible to convert programs in any strongly typed  language to wasm, and there are already good examples.

A typical use-case for using languages as Go and C# in web browser
is re-using server based business logic in client side web apps and even SPAs (single page web apps)

Google is actively working on making GoLang run with wasm, and
Microsoft is working on making .NET work on wasm also.
But those two approaches are quite different, and it is interesting to compare.

Latest GoLang compiler (SDK) has option to produce wasm as an "target CPU architecture" with JavaScript as an "OS", all in one step. The resulting code has not dependencies,
but it is relatively large, since not all optimizations are implemented yet.

.NET Blazor project has quite different approach. It takes Mono (.NET) VM compiled in native output (C/C++ like) and converts that to wasm using typical C/C++ toolset (LLVM).
That is obviously relatively large, but it does not change over type. Then, any standard .NET DLL that does not try to directly access OS or HW can run on top of that VM (.NET) on VM (wasm) or VM (JavaScript) setup. The effort now is to enhance integration with web browser (DOM, JS).

Both solutions are "work in progress" and it is too early for conclusions.
Here are a few more details...

For running GoLang in web browsers, there was  already a tool GopherJS for converting Go source code to JavaScript. That does not require or use wasm, and runs Go based code in web browser.
GitHub - gopherjs/gopherjs: A compiler from Go to JavaScript for running Go code in a browser
GopherJS Playground


GopherJS vs WebAssembly for Go - DEV Community 

"The latest Go version 1.11 supports WebAssembly port by Richard Musiol, the same author of GopherJS. Now Go 1.11 is on the way releasing, but you can test WebAssembly APIs with the latest Go by compiling yourself. Your compiled program for WebAssembly is available both on browsers and Node.js. You can use full features of Go including goroutines. You can call any JavaScript functions from Go, and you can pass Go function as a JavaScript callback. The API is defined at syscall/js package. The environment variables for WebAssembly are GOOS=js and GOARCH=wasm"
WebAssembly excursion with Go – Boris Djurdjevic – Medium

BxJS - Compiling Golang to WebAssembly - YouTube


Welcome to the Blazor preview docs website!

GitHub - aspnet/Blazor: Blazor is an experimental .NET web framework using C#/Razor and HTML that runs in the browser with WebAssembly

Online Demo:
https://blazor-demo.github.io


AWS IOT Device Defender Service

IoT Security | IoT Device Security Management | AWS IoT Device Defender

"AWS IoT Device Defender is a fully managed service that helps you secure your fleet of IoT devices. AWS IoT Device Defender continuously audits your IoT configurations to make sure that they aren’t deviating from security best practices. A configuration is a set of technical controls you set to help keep information secure when devices are communicating with each other and the cloud. AWS IoT Device Defender makes it easy to maintain and enforce IoT configurations, such as ensuring device identity, authenticating and authorizing devices, and encrypting device data. AWS IoT Device Defender continuously audits the IoT configurations on your devices against a set of predefined security best practices. AWS IoT Device Defender sends an alert if there are any gaps in your IoT configuration that might create a security risk, such as identity certificates being shared across multiple devices or a device with a revoked identity certificate trying to connect to AWS IoT Core."
Keeping Connected Device Secure - YouTube

vs.

Azure Internet of Things (IoT) Security | Microsoft

Secure your Internet of Things deployment | Microsoft Docs