practicalli

https://practicalli.github.io/ http://yt.vu/+practicalli (youtube)
onetom 2020-07-29T17:36:21.255Z

Very interesting conversations... Keep it going! 🙂 I agree that AWS is a significant complexity tax, but in exchange it enables creating an auditable infrastructure, which pays off when you would want to offer your application to be integrated into someone else's existing infrastructure, so they can host it for themselves. For that kind of situations, AWS (or GCP and Azure) is a great platform, where both small and big companies can meet. This however only makes sense, when your application has already proven itself and start to handle hundreds of user and your database is accreting upwards of hundreds of megabytes of data daily. If you don't start with AWS early, then your migration will cost more. Agility at the beginning of the lifecycle of a software project is more important than the incurred migration cost later...

onetom 2020-07-29T17:38:31.257300Z

This made me curious how hard is it to integrate Heroku with existing AWS solutions... maybe with the smaller, in-house projects we can target Heroku first and migrate them to AWS later. Apps on Heroku would need to access data on AWS from the get-go though... How secure, performant and costly would that be?

onetom 2020-07-29T17:45:03.259800Z

https://devcenter.heroku.com/search?utf8=✓&q=clojure+deps.edn yields no result 😞 but as i see heroku has some support for tools.deps project: https://www.gertgoet.com/2019/02/06/deploying-a-tools-deps-clojure-project-to-heroku.html i really don't want to go back to leiningen... 😕 i came to tools.deps from boot and it feels like going back to lein makes no sense...

practicalli-john 2020-07-29T18:38:35.263300Z

@onetom Heroku uses Leiningen by default (its arguably the most used build tool for Clojure). However, you can just provide an empty project.clj file and a custom build script called bin/build in the root of the project and Heroku will use that script. The script just calls what ever tool you want to use to generate an uberjar with Clojure CLI tools

#!/usr/bin/env bash
clojure -A:uberjar
Then just add a config var to the Heroku app to set the Clojure CLI version and everything else is the same. There is an example of using CircleCI and Heroku pipelines with Clojure CLI here https://practicalli.github.io/clojure-webapps/projects/banking-on-clojure/deployment-via-ci.html

👍 1
practicalli-john 2020-07-29T18:40:33.265Z

Heroku runs on AWS (its one of their biggest customers). There are a lot of services you can get through Heroku, however, if you set AWS services up in the same region as the Clojure app deployed in Heroku, then you should have little issue. The biggest challenge is typically latency if you go across data center regions.

👍 1
raymcdermott 2020-07-29T20:02:57.266Z

@onetom there is also a https://github.com/RickMoynihan/lein-tools-deps

onetom 2020-07-29T20:09:37.266300Z

i know. i've maintained briefly a similar tool, to bridge boot and lein https://github.com/onetom/boot-lein-generate i just don't want the extra overhead of lein and the seemingly declarative project.clj, which does a lot of magic thru the various plugins and the resulting behaviour is quite opaque. it also adds quite some seconds to the clojure program startup times. some of these issues have been mitigated by tools.deps and there are even more improvements are happening lately: https://insideclojure.org/2020/07/28/clj-exec/

1
practicalli-john 2020-07-29T22:19:49.271700Z

The other option with Heroku is to create another Clojure buildpack using dep.edn, this would simpler and be a bit more efficient in terms of resources (no Leiningen install). It's been a while, but will take a look at creating a deps.edn buildpack in the next few weeks. They are all open source, so it's pretty easy to see examples.