Date post: | 19-Jul-2015 |
Category: |
Technology |
Upload: | shashank-teotia |
View: | 48 times |
Download: | 1 times |
Polyglot Programming and
Agile Development
Shashank Teotia Pramod Sadalage ThoughtWorks
Problem Statement
“To create multi-platform gaming hardware configuration software with crowd sourcing and backup abilities with an awesome GUI which looks the same on all supported platforms.”
- Client
“Adding a new platform / device should be trivial.”
“Of course, don’t forget that the software should have minimal CPU & memory footprint. !
Gamers hate bloatware!”
“And yes, I have a small team, distributed across 3 continents. They should be busy delivering features, not get caught up in the operational challenges.”
:)
OK, this is not a special situation!
How do you architect?
Lets look at the world for inspiration
Some time back we could write a
system with COBOL
The world by nature is polyglot
Have done it earlier Bash/Shell
AWK Perl SED etc…
Neal Ford coined the term in 2006
bit.do/neal4d
Many new languages on the JVM started
the trend
Java, Jruby, Jython, Clojure, Scala, Groovy,
Rhino
Lets talk of our experience
Observation & Awareness
“Lets break down the domain!” - Biz people
“Divide & Integrate!” - informally dressed devs
Observation
Think Bounded Context - Eric Evans in Domain Driven Design
“To create multi-platform gaming hardware configuration software with crowd sourcing and backup abilities with an awesome GUI which looks the same on all supported platforms. And yes, adding a new platform or device should be trivial. Of course, don’t forget that the software should have minimal CPU and memory footprint.” !“And yes, I have a small team, distributed across 3 continents. They should be busy delivering features, not get caught up in the operational challenges.”
GUI
Core
Device Library
Cloudcrowd sourcing
backup
distributed
operational challenges.small team available
multi-region
PaaSreplication
Device Driver
cross-platform
multi-platform
hardware configuration
looks the sameawesomelightweight
trivial to add a new platform
lightweight
gaming
multi-threadedbuild easy
C interface
trivial to add a new device
generic HID USB interface
long running
short-lived
device communication
Awareness
In your search for the right language, you should underrate your current skills.
Repeat it.
Choosing the right language is a competitive edge!
Case Study
Cloudcrowd sourcing
backup
distributed
operational challenges.small team available
multi-region
PaaSreplication
GUIcross-platform
looks the sameawesomelightweight
gaming
short-lived
Coremulti-platform
hardware configurationtrivial to add a new platform
lightweightmulti-threaded
build easyC interface
long running
Device Librarytrivial to add a new device
generic HID USB interface Device Driverdevice communication
GUIcross-platform
looks the sameawesomelightweight
gaming
short-lived
Coremulti-platform
hardware configurationtrivial to add a new platform
lightweightmulti-threaded
build easyC interface
long running
Device Librarytrivial to add a new device
generic HID USB interface Device Driverdevice communication
Chef Infrastructure as a Service
(scaling is easy)
Sinatra modular RACK app
(API dev is blazing fast)
RIAK distributed, CAP tunable DB
(backups never fail)Cloud
Coremulti-platform
hardware configurationtrivial to add a new platform
lightweightmulti-threaded
build easyC interface
long running
Device Librarytrivial to add a new device
generic HID USB interface Device Driverdevice communication
Chef Infrastructure as a Service
(scaling is easy)
Sinatra modular RACK app
(API dev is blazing fast)
RIAK distributed, CAP tunable DB
(backups never fail)Cloud
node-webkit Native Apps in HTML5
(write once, run anywhere)Knockout
lightweight JS MVVM (complex UI modeling made easy)
GUI
Cocoa Mac UI Controls
Device Librarytrivial to add a new device
generic HID USB interface Device Driverdevice communication
Chef Infrastructure as a Service
(scaling is easy)
Sinatra modular RACK app
(API dev is blazing fast)
RIAK distributed, CAP tunable DB
(backups never fail)Cloud
node-webkit Native Apps in HTML5
(write once, run anywhere)Knockout
lightweight JS MVVM (complex UI modeling made easy)
GUI
Cocoa Mac UI Controls
Google GoCore
Interfaces & Build constraints (easy multi platform dev)
Simple and unambiguous (focus on the domain)
CGO (call C code)
built-in concurrency primitives (no multi-threading hell)
cross platform libraries (just specify the build env)
Device Driverdevice communication
Chef Infrastructure as a Service
(scaling is easy)
Sinatra modular RACK app
(API dev is blazing fast)
RIAK distributed, CAP tunable DB
(backups never fail)Cloud
node-webkit Native Apps in HTML5
(write once, run anywhere)Knockout
lightweight JS MVVM (complex UI modeling made easy)
GUI
Cocoa Mac UI Controls
Device LibraryLisp
data is code (add new device)
good old C
Google GoCore
Interfaces & Build constraints (easy multi platform dev)
Simple and unambiguous (focus on the domain)
CGO (call C code)
built-in concurrency primitives (no multi-threading hell)
cross platform libraries (just specify the build env)
Chef Infrastructure as a Service
(scaling is easy)
Sinatra modular RACK app
(API dev is blazing fast)
RIAK distributed, CAP tunable DB
(backups never fail)Cloud
node-webkit Native Apps in HTML5
(write once, run anywhere)Knockout
lightweight JS MVVM (complex UI modeling made easy)
GUI
Cocoa Mac UI Controls
Device LibraryLisp
data is code (add new device)
good old C Device Drivergood old C
Google GoCore
Interfaces & Build constraints (easy multi platform dev)
Simple and unambiguous (focus on the domain)
CGO (call C code)
built-in concurrency primitives (no multi-threading hell)
cross platform libraries (just specify the build env)
A 10 member team manages it all
The Secret Sauce
Feed the Build Pipeline
Build Pipeline
Core
Func Tests
tarball
report
FrontEndpackage.nwgit
git
git
Promote Build
DeviceLib Driverslib
Promoted Build artifacts
Installerpkg
Go exe tarball package.nwlib
Deploy package artifact
A good choice!
Working with an embedded Chromium browser helped!
A simple RESTful SOA
tested using Cukes!
Keeping a tight control
over test code quality helped!
#failfast
Speed & simplicity of building Go meant a tighter turn around!
Skype channel for communication
Challenges!
Paradigms are hard to master
Debugging can be tricky
Don’t succumb to the Highlander
Fallacybit.do/highlander_fallacy
"Always code as if the g u y w h o e n d s u p maintaining your code w i l l b e a v i o l e n t psychopath who knows where you live."
Ultimately what matters...
... is a happy Client
And remember superheroes!
bit.do/superpowers
Thank you!