Fork me on GitHub
#off-topic
<
2021-01-05
>
solf11:01:29

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)

vemv15:01:55

maybe "modular monolith" will give you some hits on Google anyway, that sounds a lot like https://github.com/polyfy/polylith !

orestis12:01:48

@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 …

borkdude12:01:35

@dromar56 There are Java frameworks which can do this: quarkus is one of them

borkdude12:01:44

they compile with GraalVM native-image

borkdude12:01:07

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.

borkdude12:01:30

Ah, so you want to package multiple services within one artifact with the same main method. Yeah, why not.

solf12:01:07

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

valtteri15:01:05

What are the architectural goals you’re trying to achieve?

valtteri15:01:07

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.

3
polymeris16:01:50

Not sure how JS proposals work, but there is one for immutable data structures 😮 https://github.com/tc39/proposal-record-tuple

souenzzo16:01:03

clojure did defrecord in ~2012 python implemented dataclass these days java 16 will have record Now JS 🙂 The great about clojure is that it's has nothing new.

👍 9