Fork me on GitHub
#clojure-uk
<
2021-02-01
>
djm09:02:56

Do any CircleCI employees hang out here?

danm09:02:46

Morning morning

jonpither14:02:50

Hi, has anyone here used Mongo pipelines?

jkxyz16:02:36

We use Mongo at work and we’ve got some pipelines here and there. Using Monger as the client library

jonpither17:02:03

Hi @UE72GJS7J, quite a favour, but would you be up for a chat at some point about them? Doing something similar for our DB Crux and want to get a feel of the pipelines, from someone who has used them.

jkxyz18:02:56

I’m not an experienced Mongo user (nor much of a fan of it), so I don’t think I can contribute much, sorry. We’re only using it for now because we’re migrating from a legacy Node app, and I haven’t used Mongo outside of this migration. In many places we found pipelines to be very slow, and we’re moving to using Postgres as an additional layer for complex queries. I’ve written a couple of pipelines, and I found that the imperative style of the API is nice and more intuitive than SQL. It’s also easier to compose than SQL, because you’re just dealing with mutable objects, and operations can add or remove keys instead of selecting extra rows. For instance doing a subquery to get the authors of a post, which creates an _author key, and then filtering by _author.email. So I could concat some operations into the pipeline and they don’t need to care about aliases or joins. It was also nice being able to have a query that can then be used to perform a mutation. It reminds me of Datomic’s transaction fns, and Clojure’s transducers. I would love to use a more efficient implementation of Mongo’s pipelines, if only it weren’t Mongo, so I’m excited to see what Crux will do 🙂 Hope that helps some.

jonpither18:02:09

it does - thanks 👍

jkxyz18:02:04

No problem

folcon15:02:07

Curious if anyone's seen this yet? http://teavm.org/

rickmoynihan17:02:54

Yeah saw it pop up again on hn this morning; seems to have come a long way. Could in theory take aot compiled clojure and run it in the browser or on node. But could presumably you could run the clojurescript compiler itself on it.

folcon18:02:06

Yep, pretty exciting 😃... Be curious to see how that would differ from clojurescript dev and what the trade-offs will end up being...