Fork me on GitHub
#clojure
<
2024-02-05
>
J09:02:03

Hi! What lib do you use for talking with MongoDB?

p-himik09:02:59

Given some discussions in https://github.com/michaelklishin/monger/, it seems that MongoDB likes to break stuff in newer versions. In that case, the most robust option is to use their Java client via interop. Doesn't mean that things won't be breaking on newer versions, but at least you'll be able to change/fix exactly the things that are used in your app and not wait for all the necessary fixes from some library's maintainer.

p-himik09:02:23

Note that there's also #CKG1A2QPN. Not really active, but asking there won't hurt.

J10:02:27

Thanks @U2FRKM4TW! Yes, for now, I’m with monger. I note the chan for further discussions.

p-himik10:02:42

And, just in case - you can also search in #C06MAR553 or this channel, or use https://phronmophobic.github.io/dewey/search.html.

genekim15:02:01

I’ve use monger library, selected a couple of years ago for a couple of projects, basically at random — it’s worked great for me, and I’ve been pleasantly surprised that MongoDB features I learn about are supported (e.g. aggregates, selective fields, etc.) For years, I’ve been a little worried that someday everything will break, and wish I had chosen congomongo, which the esteemed @U04V70XH6 has stated he’s become a maintainer of. I’ve never used it, but I’m sure that one day I’ll be migrating, probably when all my things in production break overnight because something in MongoDB is no longer supported by monger. (There are some discussions of such an event looming in this issue: https://github.com/michaelklishin/monger/issues/225)

seancorfield16:02:40

I stopped maintaining congomongo years ago - after we stopped using MongoDB at work (and migrated all our data back to MySQL). I'll be honest, after the experiences we had, and all the time spent at MongoDB conferences listening to other MongoDB users, I couldn't recommend MongoDB to anyone.

2
genekim16:02:45

Hahaha. Thank you for all your great work, @U04V70XH6 — and congrats for dedicating your time only on the most exothermic projects. 😂 (I haven’t started any new MongoDB projects, and am hoping to avoid having that moment of true regret that seems so common in that community. 🙂

borkdude10:02:55

What the reason read-string doesn't attach line/column metadata vs load-string :

$ clj -M -e '(prn (meta (read-string "(+ 1 2 3)")))'
nil
$ clj -M -e '(prn (meta (load-string "(quote (+ 1 2 3))")))'
{:line 1, :column 8}

1
borkdude10:02:18

I guess the difference is the read-string doesn't use a LineNumberingPushbackReader

💡 1
phill16:02:47

What's the reason read-string doesn't use a LineNumberingPushbackReader?!

borkdude16:02:55

@U064X3EF3 is this intentional? (I would assume so, but the reasoning behind it would be good to have)

Alex Miller (Clojure team)17:02:28

I assume because it’s usually 1 line