SlideShare a Scribd company logo
Polyglot Architecture:
A Rational Approach to
Software Design
Richard Minerich
Senior Researcher at Bayard Rock
@Rickasaurus
Research and Development Perspective
▪ A focus on long term solutions to
complex problems
▪ A lot of room for experimentation,
but decisions must be justified
▪ Very small teams, and so few
resources for maintenance, and
little time for production issues
▪ Talented people who are generally
excited about learning new things
Why do we use the languages we use?
▪ I always use the same one or two languages.
▪ Pseudo-Technical management picks all of our technologies.
▪ I need to Maximize Synergy by Hadooping the Big Data Analytics.
▪ I am fanatically obsessed with a particular language.
▪ Weighted random sampling fed by the benchmark game.
▪ We came up with a set of criteria and judged several candidates
empirically in context.
Considerations (oh god)
Safety, FindingTalent, CPU Performance,Training, Platform
Limitations, Compiler Support, Community, External Libraries,Tooling,
Debugging, Primary Community Focus, Unique Features, Simplicity,
Development Environments, Familiarity, Cross Platform Support,
Asynchrony, Hype, Industry Standards, Algorithms,Tutorials, Data
Structures, Stability, Memory Usage, Garbage Collection, Syntactic
Flexibility, CompilationTargets, Language/Platform Interop,Taste,
Core Libs, Code Clarity, Licensing, Error Messages, BuildTools,
Testability, Requirements,Type Systems, Embeddability, Scalability,
FaultTolerance, Parallelization, Binary Package Size, Permissions,
Algebraic DataTypes, Obfuscation, Peer Pressure,Technical Debt,
Does it have what plants crave?
Considerations (fixed)
Safety – “In the limit”, cost of unexpected changes, testing
burden, sanity of core libs, dependency handling
Community – Support options, library quantity and quality,
training, hiring, enthusiasm, culture of craftsmanship
Performance – Relative dimensions include cpu, memory and network
Tooling – Debugging, static analysis, linting, test frameworks
And they’re all tradeoffs based on Context.
i.e. Requirements, Platform(s),Team Skills, Available Funds
Case Study: 0install (by Thomas Leonard)
Choosing a Replacement for Python
Language OCaml PythonHaskell Rust ATS C# Go
Speed 4 2 4 3 5 1 3
Dependencies 4 5 3 2 5 1 3
Bin. compatibility 4 5 2 2 4 5 3
Bad stdout 1 1 1 5 1 1 1
Missing env 5 5 5 5 5 3 1
Memory safety 5 5 5 4 3 5 5
Diagnostics 1 5 3 3 2 1 1
Ease of coding 4 5 4 3 1 4 3
Shared libraries 1 5 2 2 5 5 1
Static types 4 1 4 5 5 3 2
Privilege bounds 5 1 5 1 2 5 1
Mutability 4 3 2 5 4 4 4
C interoperability 3 3 4 4 5 4 4
Asynchronous 5 4 5 5 1 5 5
Total 50 50 49 49 48 47 37
http://is.gd/0install_language_shootout
What is Safety? (My favorite topic)
Imagine your goal is perfect bug-free software (in the limit)
▪ Is the compiler your friend?
▪ Is it easy to write correct code?
▪ Will it “fail fast” when
in an unexpected state?
▪ When things fail will it
get up and keep going?
▪ Can you trust external libraries?
Context is everything
▪ Projected lifetime, time to market, burn rate
▪ Explicit requirements, technology interop, customer systems
▪ Current talent, willingness to learn, and training expenditure
▪ Previous purchases and existing platform limitations
▪ Domain problems that are helped greatly certain unique features
It Usually Comes Down To Unique Features
▪ JavaScript – Do we really have any other choice?
▪ C# – Great GUI builders, code generation tooling
▪ F# –Type providers, data modeling and transformation
▪ Matlab – Fast linear algebra, tons of high quality algorithms
▪ C++ (/CLI) – Library selection, managed-unmanaged interop
Currently Under Consideration
▪ R – table structured data analysis and visualization, type provider
▪ Haskell – Unique libraries, fantastically safe
▪ Scala – Beautiful and concise leverage of Spark/Hadoop, quite safe
Isn’t writing your own language
generally a bad idea?
What I found for scripting options on .NET:
IronPython, IronRuby, IronJS, DynamicLinq…
DynamicLinq was almost exactly what I wanted. Almost…
…If it weren’t for the darned manual conversions…
… So after much consideration, I wrote Barb.
Barb?! (github.com/Rickasaurus/Barb)
It’s a simple .net scripting language
Name.Contains "John“ and (Age > 20 orWeight > 200)
Barb in Action: Safe Alert Manager
Slots to fill (Safe Alert Manager)
▪ User Interface
▪ User Behavior Model
▪ Data Access
▪ DataTransform
▪ Algorithms / Data Structures
▪ Ad-Hoc Behaviors
▪ Glue
UI (C#) &
Analysis (C#)
Glue (F# and Barb)
Data &
Config
In
Data
Out
Algorithms (F#)
Key Insight: Reverential Transparency
Matlab C++ Haskell R Python
F# Type Providers
Typed Access to Data and Languages
MAP: Secure Distributed ML
UI (JS),Analysis (JS & SQL)
& Computation (F#)
Glue (F#)
Data
Computation in
F# or viaType
Provider in:
Matlab, R,
Python
Goal:
Experts and users coexist
in the same system with
different tools.
Typed Dataset
Representation
MAP Language Choices
▪ User Interface / Model – Javascript/Type Script
▪ Analysis Data Access – BRSQL in the UI
▪ Analysis DataTransform – Javascript in the UI
▪ Glue – Almost entirely F#
▪ Algorithms / Data Structures – F#,Type Provider, C++/CLI
On the Horizon: Asm.js (with emscripten)
is.gd/cool_asmjs_demos
On the Horizon: Rust
www.rust-lang.org
On the Horizon: Julia
julialang.org
Thanks for Coming!
@Rickasaurus
RichardMinerich.com
Come visit the NYC
Haskell and F# User
Groups!

More Related Content

PDF
Are High Level Programming Languages for Multicore and Safety Critical Conver...
PPTX
Seamless semantics - avoiding semantic discontinuity
PPT
Trends in Programming Technology you might want to keep an eye on af Bent Tho...
PDF
PPTX
Semantic Technologies and Programmatic Access to Semantic Data
PDF
The State of #NLProc
PPTX
Reverse engineering
PDF
Unknown features of PHP
Are High Level Programming Languages for Multicore and Safety Critical Conver...
Seamless semantics - avoiding semantic discontinuity
Trends in Programming Technology you might want to keep an eye on af Bent Tho...
Semantic Technologies and Programmatic Access to Semantic Data
The State of #NLProc
Reverse engineering
Unknown features of PHP

Similar to Polyglot Architecture: A Rational Approach to Software Design (20)

PDF
Haskell Tour (Part 1)
PPT
Java And Community Support
PDF
Python for Science and Engineering: a presentation to A*STAR and the Singapor...
PPT
Cmpe202 01 Research
PDF
PyData Texas 2015 Keynote
PDF
A complete guide to Python app development.pdf
PDF
Building Languages for the JVM - StarTechConf 2011
PDF
Learning to code in 2020
PDF
Explore the Best Programming Languages for AI in 2023
PDF
Programming Language Selection
ODP
Python for Android
PPTX
Introduction-to-Programming-Languages.pptx
PDF
Which programming language should you learn next?
PDF
GoLightly: Building VM-based language runtimes in Go
PDF
Software Security - Static Analysis Tools
PDF
Number of Computer Languages = 3
PPTX
Chosing The Right Language for your project
PPT
Do Languages Matter?
PDF
INTERFACE by apidays 2023 - Nuclear Rust, John Darrington, Idaho National Lab...
PPTX
P1 2018 python
Haskell Tour (Part 1)
Java And Community Support
Python for Science and Engineering: a presentation to A*STAR and the Singapor...
Cmpe202 01 Research
PyData Texas 2015 Keynote
A complete guide to Python app development.pdf
Building Languages for the JVM - StarTechConf 2011
Learning to code in 2020
Explore the Best Programming Languages for AI in 2023
Programming Language Selection
Python for Android
Introduction-to-Programming-Languages.pptx
Which programming language should you learn next?
GoLightly: Building VM-based language runtimes in Go
Software Security - Static Analysis Tools
Number of Computer Languages = 3
Chosing The Right Language for your project
Do Languages Matter?
INTERFACE by apidays 2023 - Nuclear Rust, John Darrington, Idaho National Lab...
P1 2018 python
Ad

Recently uploaded (20)

PPTX
Cloud computing and distributed systems.
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Machine learning based COVID-19 study performance prediction
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
KodekX | Application Modernization Development
PDF
Modernizing your data center with Dell and AMD
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Approach and Philosophy of On baking technology
PDF
Empathic Computing: Creating Shared Understanding
PDF
Electronic commerce courselecture one. Pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
Cloud computing and distributed systems.
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Unlocking AI with Model Context Protocol (MCP)
Digital-Transformation-Roadmap-for-Companies.pptx
Machine learning based COVID-19 study performance prediction
NewMind AI Weekly Chronicles - August'25 Week I
Advanced methodologies resolving dimensionality complications for autism neur...
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Spectral efficient network and resource selection model in 5G networks
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
KodekX | Application Modernization Development
Modernizing your data center with Dell and AMD
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
The AUB Centre for AI in Media Proposal.docx
Approach and Philosophy of On baking technology
Empathic Computing: Creating Shared Understanding
Electronic commerce courselecture one. Pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
Ad

Polyglot Architecture: A Rational Approach to Software Design

  • 1. Polyglot Architecture: A Rational Approach to Software Design Richard Minerich Senior Researcher at Bayard Rock @Rickasaurus
  • 2. Research and Development Perspective ▪ A focus on long term solutions to complex problems ▪ A lot of room for experimentation, but decisions must be justified ▪ Very small teams, and so few resources for maintenance, and little time for production issues ▪ Talented people who are generally excited about learning new things
  • 3. Why do we use the languages we use? ▪ I always use the same one or two languages. ▪ Pseudo-Technical management picks all of our technologies. ▪ I need to Maximize Synergy by Hadooping the Big Data Analytics. ▪ I am fanatically obsessed with a particular language. ▪ Weighted random sampling fed by the benchmark game. ▪ We came up with a set of criteria and judged several candidates empirically in context.
  • 4. Considerations (oh god) Safety, FindingTalent, CPU Performance,Training, Platform Limitations, Compiler Support, Community, External Libraries,Tooling, Debugging, Primary Community Focus, Unique Features, Simplicity, Development Environments, Familiarity, Cross Platform Support, Asynchrony, Hype, Industry Standards, Algorithms,Tutorials, Data Structures, Stability, Memory Usage, Garbage Collection, Syntactic Flexibility, CompilationTargets, Language/Platform Interop,Taste, Core Libs, Code Clarity, Licensing, Error Messages, BuildTools, Testability, Requirements,Type Systems, Embeddability, Scalability, FaultTolerance, Parallelization, Binary Package Size, Permissions, Algebraic DataTypes, Obfuscation, Peer Pressure,Technical Debt, Does it have what plants crave?
  • 5. Considerations (fixed) Safety – “In the limit”, cost of unexpected changes, testing burden, sanity of core libs, dependency handling Community – Support options, library quantity and quality, training, hiring, enthusiasm, culture of craftsmanship Performance – Relative dimensions include cpu, memory and network Tooling – Debugging, static analysis, linting, test frameworks And they’re all tradeoffs based on Context. i.e. Requirements, Platform(s),Team Skills, Available Funds
  • 6. Case Study: 0install (by Thomas Leonard) Choosing a Replacement for Python Language OCaml PythonHaskell Rust ATS C# Go Speed 4 2 4 3 5 1 3 Dependencies 4 5 3 2 5 1 3 Bin. compatibility 4 5 2 2 4 5 3 Bad stdout 1 1 1 5 1 1 1 Missing env 5 5 5 5 5 3 1 Memory safety 5 5 5 4 3 5 5 Diagnostics 1 5 3 3 2 1 1 Ease of coding 4 5 4 3 1 4 3 Shared libraries 1 5 2 2 5 5 1 Static types 4 1 4 5 5 3 2 Privilege bounds 5 1 5 1 2 5 1 Mutability 4 3 2 5 4 4 4 C interoperability 3 3 4 4 5 4 4 Asynchronous 5 4 5 5 1 5 5 Total 50 50 49 49 48 47 37 http://is.gd/0install_language_shootout
  • 7. What is Safety? (My favorite topic) Imagine your goal is perfect bug-free software (in the limit) ▪ Is the compiler your friend? ▪ Is it easy to write correct code? ▪ Will it “fail fast” when in an unexpected state? ▪ When things fail will it get up and keep going? ▪ Can you trust external libraries?
  • 8. Context is everything ▪ Projected lifetime, time to market, burn rate ▪ Explicit requirements, technology interop, customer systems ▪ Current talent, willingness to learn, and training expenditure ▪ Previous purchases and existing platform limitations ▪ Domain problems that are helped greatly certain unique features
  • 9. It Usually Comes Down To Unique Features ▪ JavaScript – Do we really have any other choice? ▪ C# – Great GUI builders, code generation tooling ▪ F# –Type providers, data modeling and transformation ▪ Matlab – Fast linear algebra, tons of high quality algorithms ▪ C++ (/CLI) – Library selection, managed-unmanaged interop Currently Under Consideration ▪ R – table structured data analysis and visualization, type provider ▪ Haskell – Unique libraries, fantastically safe ▪ Scala – Beautiful and concise leverage of Spark/Hadoop, quite safe
  • 10. Isn’t writing your own language generally a bad idea? What I found for scripting options on .NET: IronPython, IronRuby, IronJS, DynamicLinq… DynamicLinq was almost exactly what I wanted. Almost… …If it weren’t for the darned manual conversions… … So after much consideration, I wrote Barb.
  • 11. Barb?! (github.com/Rickasaurus/Barb) It’s a simple .net scripting language Name.Contains "John“ and (Age > 20 orWeight > 200)
  • 12. Barb in Action: Safe Alert Manager
  • 13. Slots to fill (Safe Alert Manager) ▪ User Interface ▪ User Behavior Model ▪ Data Access ▪ DataTransform ▪ Algorithms / Data Structures ▪ Ad-Hoc Behaviors ▪ Glue UI (C#) & Analysis (C#) Glue (F# and Barb) Data & Config In Data Out Algorithms (F#)
  • 14. Key Insight: Reverential Transparency Matlab C++ Haskell R Python
  • 15. F# Type Providers Typed Access to Data and Languages
  • 16. MAP: Secure Distributed ML UI (JS),Analysis (JS & SQL) & Computation (F#) Glue (F#) Data Computation in F# or viaType Provider in: Matlab, R, Python Goal: Experts and users coexist in the same system with different tools. Typed Dataset Representation
  • 17. MAP Language Choices ▪ User Interface / Model – Javascript/Type Script ▪ Analysis Data Access – BRSQL in the UI ▪ Analysis DataTransform – Javascript in the UI ▪ Glue – Almost entirely F# ▪ Algorithms / Data Structures – F#,Type Provider, C++/CLI
  • 18. On the Horizon: Asm.js (with emscripten) is.gd/cool_asmjs_demos
  • 19. On the Horizon: Rust www.rust-lang.org
  • 20. On the Horizon: Julia julialang.org
  • 21. Thanks for Coming! @Rickasaurus RichardMinerich.com Come visit the NYC Haskell and F# User Groups!