Polylith + Component = The Grand Design
The core philosophy of Clojure and its ecosystem is Simplicity. But when we need to build large scale system of decent amount of complexity and components, we need to ponder over many best practices like maintainability, code deduplication, unit testing, integration testing, separation of concern, third-party integration etc.
In this session we are going to discuss in-and-out about relatively new software architectural paradigm called Polylith and also bringing stuartsierra’s component system within it; how these two (old and new) can live together happily to make your system design more clean and elegant. Although Polylith is not only applicable for Clojure but this goes well with Clojure’s philosophy. Stuartsierra’s component system is being used successfully by Clojure developers and designer for years now to manage your system states declaratively.
This talk is not only theoretical but also sharing how-to/gotchas/lesson learned etc. with production code; we are using these two concepts together in our production system for last several months happily.
Target audience: Intermediate to Seasoned Clojurists
Takeaways: large scale system design concepts.
Please note that there are several terms/concepts common to both but they are not same; will be explained clearly during presentation.
My assumption is that Stuartsierra’s component is very well known ; the talk will be shorten/elaborate on this particular topic depending on audiences.
What is Polylith?
- The metaphor - LEGO
- The building blocks - Functions, Component, Service, Base, System, environments
- Good separation of concern
- Code deduplication
- Module level testing
- compares with microservice etc.
How Polylith works?
- The secret sauce - symbolic link
- Public interfaces
What is Stuartsierra’s component?
- Simple Clojure map
- managed lifecycles
- helper functions
What problems SS component solves?
- application state management
- Dependency Injection/management
The Grand Unification
- Related and overlapping concepts
- Design layout of the entire system
- SS component + Polylith component
- Migration of existing system
Experience with Production system
- The good part - many
- The bad part - few
Gotchas and lesson learned
- Where is my DDD?
- AOT vs JIT
- Abstraction - Where is my multimethod?
- Other best practices
Clojure and basic system design concept.
I’m currently working in Brainsfeed as Senior Software Engineer, We are building a new kind of on-demand research platform and Clojure(Script) is the tool for us; from backend to front-end.
Having over a decade of software development/programming experience, started career with Java, but written code in many languages and finally shifted completely to Clojure-the most beautiful programming language. A life long math lover who want to write code each and everyday till the end of the world.