polylith

https://polylith.gitbook.io/ and https://github.com/polyfy/polylith
2020-12-02T16:50:34.070300Z

Hi guys, First of all thanks a lot for introducing Polylith It sounds absolutely great and our team is very excited to adopt it. Yet we have a couple of concerns, If you'd be so kind to help us address them (and perhaps correct us if we got something wrong). • We make heavy use of stuartserra's component library to glue components together. Does it go against Polylith or can we keep using it even if we migrate to Polylith ? • The other concern that may not be directly related to Polylith is regarding the new https://github.com/polyfy/polylith tool that states that the support for Leiningen has been discontinued in favor of tools.deps . Since our projects are polyglots that use Clojure code in Java and vice versa would we miss anything if we migrate to tools.deps (like https://github.com/ztellman/virgil that we use to hotload java code in repl) ? • How does it fit in our CI/CD pipeline? We need multiple docker images to be build for standalone services. Thanks a lot

furkan3ayraktar 2020-12-02T17:22:14.070800Z

1. Polylith has no state management itself, and you are free to use component, mount, or any other library in combination with Polylith. I myself use a forked version of mount for state management and it works like a charm. So, you should be able to continue using Stuart Sierra’s component library. 2. Polylith has no impact on your usage of it. However, since you are moving to tools.deps, you might need to implement some tooling to mimic what virgil does in tools.deps. I implemented a similar thing for lein-ring here (https://github.com/furkan3ayraktar/polylith-clj-deps-ring) for the realworld example (https://github.com/furkan3ayraktar/clojure-polylith-realworld-example-app). 3. In Polylith you decide how to deploy, when you need to deploy. You can create multiple projects that generate artifacts for your docker images. You can make use of Polylith’s Clojure library to incrementally deploy only changed projects. You can see an example of that in the Polylith’s repository. We have a CI/CD setup (explained here: https://github.com/polyfy/polylith/blob/master/doc/ci-and-deployment.md) and this component (https://github.com/polyfy/polylith/blob/master/components/deployer/src/polylith/clj/core/deployer/core.clj) handles the deployments. You can write your own component to achieve what you need. It is awesome that you are considering to use Polylith with your project. If you feel that you need more support, you can direct message me or keep reaching out to the whole team here in this channel.

2020-12-02T18:15:12.071100Z

Thanks a lot @furkan3ayraktar for your thorough answer. We will definitely check them out. We are planning to move one of our libraries first and then try to move the whole system

furkan3ayraktar 2020-12-02T20:40:31.071300Z

Great! You are probably seen this but I wanted to paste the link in case you missed. We have a section in the gitbook where we explain how to move to Polylith. Here it is: https://polylith.gitbook.io/polylith/conclusion/should-you-convert-your-system

furkan3ayraktar 2020-12-02T20:42:06.071600Z

Let me know if you have any further questions or if we can help you in any way. Cheers!