-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could a Datomic profile be interesting to have? #131
Comments
A contribution for Datomic would be very much welcome, it might be worth taking a look at making it a module instead of a profile. I generally prefer adding functionality via modules since they can be instantiated after project creation meaning you don't need to know what functionality you'll need up front when making the initial project. The modules repo is located here https://github.com/kit-clj/modules |
I would love to have an easy way to hook in Datomic, especially as a module. |
@yogthos @gerdint I have 2 approaches for Datomic support, please check the diffs and let me know which one follows the philosophy best, then I'll open the MR in the modules repo: With transactor process management: Datomic can be deployed in many ways, so most of it should be done outside the lifecycle of the system in Kit, but it is a bit annoying having to manually start the transactor for development (that uses file DB) every time. This branch includes starting a dev transactor with defaults taken from the Getting started section of Datomic Pro. The user could just provide a DATOMIC_PATH env variable after following the instructions there and it works. It includes a Thread/sleep because usually you can't connect to the transactor right after spawning the process, it will fail and retry, but it can be, because it happened to me, that the retry timeout is too short and you never end up connecting to the transactor, being left with a very polluted repl full of errors. The transactor has a healthcheck endpoint, but for that you have to edit the config file, which is an extra step for the user and not very beginner friendly, probably. Without transactor: Much simpler, it only cares about the DB URI to know where to connect and that's it. Thanks! |
I wonder if a bb task might be a better place for starting the transactor since it's not actually part of the app and it's only used for dev. |
That might need creating a |
Well, I'm assuming including that as a base feature of kit-clj, it could also be a documentation tutorial on how to add such a script instead |
Adding scripts folder by default might be the way to go, there's already So, let's go with the version without the transactor then, and we can make a follow up issue to update the template and then add a script for starting the transactor for the module. |
I recently integrated a Datomic database (both dev/file version and with PostgreSQL) in a kit project, and I found it extremely interesting and exciting. I was wondering if it would be interesting to have a profile that adds the necessary bits for having Datomic ready to use, including a migration tool, I used https://github.com/gethop-dev/stork for example. I can try to make the profile and contribute!
The text was updated successfully, but these errors were encountered: