my recent reads..

Atomic Accidents: A History of Nuclear Meltdowns and Disasters; From the Ozark Mountains to Fukushima
Power Sources and Supplies: World Class Designs
Red Storm Rising
Locked On
Analog Circuits Cookbook
The Teeth Of The Tiger
Sharpe's Gold
Without Remorse
Practical Oscillator Handbook
Red Rabbit

Monday, May 02, 2016

LittleCodingKata: Hardware Excuse Generator with gRPC

gRPC is a very interesting lightweight middleware framework for language-neutral, cross-platform RPC.

When I heard about Natalie Silvanovich's Hardware Excuse Generator on Embedded.fm, I immediately recognised a better "Hello World" for testing out gRPC.

Introducing "The Explainer": my programming exercise to learn basic cross-language request/reply with gRPC.

I haven't completed the whole matrix of client-server possibilities yet, but here's a sampling...

Start up a server (e.g ruby version)
$ ./explainer.rb 
ShiFu is waiting to explain all of your problems...

And then ask it questions. Pick a language!
# Ruby client
$ ./explain.rb "Your phone is crashing because of REASON" 
Your phone is crashing because of the 
PCB not being manufactured to specification

# C# client
$ mono bin/Release/explain.exe "Your phone is crashing because of REASON"
Your phone is probably crashing because of stray harmonics

# C++ client
$ ./explain "Your phone is crashing because of REASON"
Your phone is crashing because of impedance in the coil

# node.js client
$ node ./explain.js "Your phone is crashing because of REASON"
Your phone is crashing because of a lack of shielding against 
alpha radiation (cosmic rays) in antenna

# Python client
$ python explain.py "Your phone is crashing because of REASON"
Your phone is crashing because of residual capacitance 
caused by the USB connector

All my notes and code are available in the LittleCodingKata GitHub repository.

No comments: