Fork me on GitHub
#polylith
<
2022-11-21
>
David Vujic12:11:35

Hi there! I’ve away from clojure and am in 🐍 land at the moment. Hopefully will back to the wonderful immutable land of parenthesis soon! Meantime, I’ve spent some time bringing some good stuff from Clojure into the Python community: Polylith 😄 Here’s what I’ve been working on and it has reached version 1 (the “good enough” release). The repo, with docs and videos (links in the readme). I’d love to hear your feedback about this (or from your Python-fellows out there): https://github.com/DavidVujic/python-polylith I also plan to write a blog post about this later this week too.

❤️ 2
polylith 5
Thomas Moerman12:11:47

Cool! We use clojure+polylith and 🐍 , so definitely exciting!

😍 1
David Vujic19:11:00

I have to admit I was a little bit skeptical about it too, but got hooked quickly. Working in the same team as the father of polylith probably helped :star-struck:

😂 2
Gabriel Kovacs23:11:52

I assume polylith is not a silver bullet 🙂 . I would be curious to know where the inflection point is. At what point does is make sense to use polylith? And does it makes sense to start with polylith from the beginning or migrate after the project is rather stable? The discussion seems to resemble the microservice one. I never heard the port and adapter discussion in an FP context until now. Would like to see some examples of the mentioned strategies protocols and higher-order functions. -- End Brain Dump

seancorfield23:11:45

My feeling is that Polylith makes sense as soon as you have multiple deployable artifacts being built from a single monorepo.

Gabriel Kovacs23:11:04

So don't start with a polylith project 🙂. I need more "good practices" on how to keep all nice and tidy until the critical mass has been reached. I just need to figure out how to do all the Coupling and Cohesion stuff in FP and presto I have a modular monolith. I probably read to many blogs 🙂.

seancorfield23:11:32

If I knew I was going to be creating multiple artifacts when I was starting a new monorepo, I'd "start with a polylith project" 🙂

🙃 1
😄 2
👍 1
furkan3ayraktar07:11:48

I’ve used Polylith since it was in the idea phase in several production systems. I chose it when I started my own company, even though it was initially a small single artifact workspace. Our workspace got larger and larger over time, and we added more artifacts as needed. Adding artifacts and changing how we deploy became easy tasks since we had Polylith. Polylith even saved us from a production disaster when we first launched; we were able to split our deployment artifacts to isolate a part in the API causing memory leaks while we were working on a solution. This split took less than 30 minutes. I understand that if you have a small project and are unfamiliar with Polylith, it could be too much of an investment to read through the book-long documentation. I did start with Polylith at my company since I had a bias toward it; I was a part of the Polylith team. However, I can assure you that learning and understanding Polylith will add good tools to your developer's toolbox. And, if you are already familiar with Polylith, it won’t hurt to start with it, even for small projects.

👍 2
1
💯 1
Nikolas Pafitis17:11:22

I'm not sceptic, I would even go as far as saying polylith is definitely a silver bullet when it comes to orgs with multiple services/apps. What I wish it did and for this reason I don't currently use it is support cljs

seancorfield23:11:33

Polylith to the rescue! We've recently switched from the default Jetty (9) Ring adapter to the sunng Jetty 11 adapter (despite it being called ring-jetty9-adapter) for security reasons -- Jetty 9 is out of community support and has had a few CVEs recently. Unfortunately, one of our web apps also uses Cognitect's AWS API which still depends on the Jetty 9 client and that does not work with the Jetty 11 http/util libs, and Cognitect's code doesn't work with the Jetty 11 client. So we applied the "swappable implementations" trick: copied our web-server component to web-server-9, swapped out the deps.edn reference to the sunng adapter for the old Ring adapter, and updated the require to point back to the old Ring adapter ns. Updated the main deps.edn: move poly/web-server from :dev to :+default (and tweaked our other profiles). Updated the one app's deps.edn under projects to change poly/web-server to ../../components/web-server-9 And that was it!

polylith 7
❤️ 7
🆒 6