This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-09-08
Channels
- # announcements (32)
- # aws (2)
- # babashka (21)
- # beginners (143)
- # cider (3)
- # cljsrn (13)
- # clojure (65)
- # clojure-dev (7)
- # clojure-europe (20)
- # clojure-losangeles (8)
- # clojure-nl (13)
- # clojure-norway (39)
- # clojure-uk (9)
- # clojurescript (39)
- # code-reviews (10)
- # conjure (2)
- # cursive (3)
- # datascript (6)
- # datomic (40)
- # events (5)
- # exercism (23)
- # fulcro (9)
- # funcool (2)
- # girouette (2)
- # graphql (4)
- # helix (8)
- # improve-getting-started (4)
- # integrant (7)
- # introduce-yourself (5)
- # jobs (3)
- # luminus (32)
- # malli (3)
- # off-topic (10)
- # pathom (9)
- # pedestal (4)
- # polylith (25)
- # practicalli (1)
- # re-frame (4)
- # sci (3)
- # shadow-cljs (5)
- # tools-deps (25)
- # vim (31)
- # xtdb (32)
Another question.
It's possible to start crux.http-server/server
without writing any code, from a docker image or a .jar.
Is it possible to configure the URL prefix for the HTTP server without writing code? Either change /_crux/
to something else, or host on /$MY_PREFIX/_crux/...
?
From the https://opencrux.com/reference/1.18.1/http.html and the https://ring-clojure.github.io/ring/ring.adapter.jetty.html I'm guessing the answer is that I'll have to write some code.
Hey - yep, have a look at https://opencrux.com/reference/installation.html, or https://opencrux.com/reference/building.html if you want to build a custom Docker image/JAR (with your own selection of modules)
regarding the prefix: there's not a code-free way to configure this at the moment, I'm afraid - you'll have to pull in the Ring handler
Yet another question!
How do I escape question marks in GET query parameters to the HTTP module?
---
I want to use GET /_crux/tx-log
(https://opencrux.com/reference/1.18.1/http.html#tx-log) with get documents in the response, but I can't seem to set with-opts?
to true
. I've tried:
curl -H "Accept: application/json" "${MY_HOST}/_crux/tx-log?with-opts?=true" 2>/dev/null | jq
curl -H "Accept: application/json" "${MY_HOST}/_crux/tx-log?with-opts%3F=true" 2>/dev/null | jq
I found https://github.com/xtdb/xtdb/blob/main/modules/http-server/test/xtdb/http_server/json_test.clj#L161..L167, but I don't know how dakrone/clj-http encodes GET parameters.
PS. congrats on the new name πI dug into the HTTP client, and as far as I can tell, {:query-params {"with-opts?" true}}
encodes into {:query-string "with-opts%3F=true"}
.
> curl -H "Accept: application/json" "http://localhost:3000/_crux/tx-log?with-opts%3F=true"
seems to work for me :man-shrugging: (testing with Docker juxt/crux-standalone-rocksdb:1.18.0
)
cross-time is better, actually, since it lets me justify keeping the api aliased to c
I want to soft delete a document and record which user did the deletion, is there a common pattern? My first thought would be to :crux.tx/put a new version of the document that only has the "who deleted this" info and nothing else... instead of deleting the doc outright
ah, you've moved :valid-time and :tx-time under the same namespace! that's actually a really nice cleanup :)
@U797MAJ8M We tried to keep keyword namespace changes to a minimum (beyond renaming crux
to xtdb
) ... but not without a lot of debates first. π We're quite open to hear suggestions and preferences for these. We could do another round of improvements, potentially.
With the name change announcement, are you going to rename this channel to #xtdb? https://xtdb.com/blog/crux-to-xtdb-rename.html
oh it looks like that channel already exists?
maybe @seancorfield could do a rename so we donβt lose history or force 539 people to migrate to a new channel
Hey folks - as you've no doubt seen above, we're now XTDB πΎ https://xtdb.com/blog/crux-to-xtdb-rename.html
Kudos to the eagle eye of @teodorlu for spotting it within about 5m of me transferring/renaming the GitHub repo π
We've released a 1.19.0-beta1
version today for people to test their migrations:
β’ By and large, it's a 'find crux
, replace with xtdb
', full migration guide on the https://github.com/xtdb/xtdb/releases.
β’ We've kept unrelated changes out of this release, but it has been an opportunity to get all our keywords in the same namespace - we recommend (:require [xtdb.api :as xt])
, then ::xt/put
, ::xt/valid-time
β’ On-disk format remains the same, no data migrations required this time, and you should be able to run this as a rolling upgrade (i.e. you shouldn't need to simultaneously update all of the Crux nodes in a cluster to XT nodes)
If you do run into any issues, give us a shout - cheers! π
are the on disk representations ever going to change or are the crux namespaced keys planned to be around indefinitely?
I can't promise that they'll never change, but it's certainly not a decision we'd make lightly - we recognise it'll mean a substantial migration for anyone with existing instances. We're looking to make some more substantial changes to XT over the next 6-12m which will likely involve that kind of migration, but there'll be plenty of notice for those π
This is a great change, I think. Is XTDB still under Juxtβs umbrella?
(defn juxt-names
[s]
(string/join (reverse (take 4 (reverse s)))))
=> #'user/juxt-names
(juxt-names "juxtdb")
=> "xtdb"
Oh no, we are found out π