This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-01-05
Channels
- # announcements (14)
- # babashka (51)
- # beginners (154)
- # calva (24)
- # cider (4)
- # clj-kondo (24)
- # cljfx (11)
- # cljs-dev (3)
- # clojure (259)
- # clojure-europe (14)
- # clojure-nl (2)
- # clojure-seattle (8)
- # clojure-spec (6)
- # clojure-taiwan (1)
- # clojure-uk (52)
- # clojurescript (123)
- # conjure (43)
- # core-async (15)
- # datomic (14)
- # events (1)
- # fulcro (90)
- # helix (7)
- # jobs (6)
- # meander (10)
- # nrepl (1)
- # off-topic (13)
- # pathom (1)
- # portal (8)
- # re-frame (7)
- # reveal (11)
- # shadow-cljs (99)
- # spacemacs (11)
- # testing (11)
- # vim (63)
Is there a name I can google for this architectural choice: micro-services from a single binary. I see no reason to split the codebase for a few services that share 90% of code, even abstracting that to a library seems overkill. Instead I have a single binary started with different options (`./binary --action A|B|C` for services A, B or C)
maybe "modular monolith" will give you some hits on Google anyway, that sounds a lot like https://github.com/polyfy/polylith !
@dromar56 I don’t know of a name, but I’ve had the same idea (well, for Clojure) — just provide different entry points, and potentially with deps.edn different dependencies. So we have a monorepo with two entry points, the main app and the support-backchannel-app …
but of course you can also build one using Clojure. I don't know if there is a name for this. Golang projects do this by default, since golang compiles to binary - also Rust.
Ah, so you want to package multiple services within one artifact with the same main method. Yeah, why not.
Actually I do have multiple mains, and my actual call line looks more like clj -m A|B|C
, but I consider that implementation details. I'm more interested in pro/cons from an architectural point of view. It seems like the common monolith vs micro-services debate, but it's a monolith that is deployed as micro-services
Clean separation of modules, responsibilities etc can be achieved using both. It requires more discipline with monolith though. Fine grained scalability is easy to achieve with microservices, if that’s a a goal.
Not sure how JS proposals work, but there is one for immutable data structures 😮 https://github.com/tc39/proposal-record-tuple