Skip to content
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

How to run clj-3df? #34

Open
theronic opened this issue Feb 1, 2019 · 7 comments
Open

How to run clj-3df? #34

theronic opened this issue Feb 1, 2019 · 7 comments

Comments

@theronic
Copy link

theronic commented Feb 1, 2019

Hi guys! This looks promising, but I can't figure out how to use it. I cloned the repo, am running a differential dataflow server. Updated Leiningen to fetch some newer deps. When I try to run any of the clj-3df examples, I get an error like this:

~/Projects/clj-3df  master ?  clj -m lww                                                                                                            1 ↵  3240  19:47:21
[MIDDLEWARE] running
Exception in thread "main" java.lang.ClassCastException: clojure.core.async.impl.channels.ManyToManyChannel cannot be cast to manifold.bus.IEventBus
	at lww$_main.invokeStatic(lww.clj:52)
	at lww$_main.invoke(lww.clj:50)
	at clojure.lang.AFn.applyToHelper(AFn.java:152)
	at clojure.lang.AFn.applyTo(AFn.java:144)
	at clojure.lang.Var.applyTo(Var.java:702)
	at clojure.core$apply.invokeStatic(core.clj:657)
	at clojure.main$main_opt.invokeStatic(main.clj:317)
	at clojure.main$main_opt.invoke(main.clj:313)
	at clojure.main$main.invokeStatic(main.clj:424)
	at clojure.main$main.doInvoke(main.clj:387)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at clojure.lang.Var.applyTo(Var.java:702)
	at clojure.main.main(main.java:37)

Or like this:

 ~/Projects/clj-3df  master ?  clj -m runner lww                                                                                               INT(-2) ↵  3241  19:49:53
Exception in thread "main" java.lang.RuntimeException: No such var: df/debug-conn, compiling:(runner.clj:10:18)
	at clojure.lang.Compiler.analyze(Compiler.java:6792)
	at clojure.lang.Compiler.analyze(Compiler.java:6729)
	at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3813)
@bachdavi
Copy link
Member

bachdavi commented Feb 1, 2019

The examples are not up-to-date with changes from a few months ago.
We are now exclusively using core.async channels for communication between the server and Clojure.
I'll create an issue and fix the examples soon.

@theronic
Copy link
Author

theronic commented Feb 1, 2019

Thanks! Could you provide minimal instructions to get started with a pub/sub so I can play around a bit over the weekend? :)

@bachdavi
Copy link
Member

bachdavi commented Feb 1, 2019

Yeah sure!
We should update the readme too and provide some more instructions :)

When you have a look here in the core.cljc file you see an example:
https://github.com/comnik/clj-3df/blob/9d0352b49c2618d23641d8692779c4e6e924f9e9/src/clj_3df/core.cljc#L291-L320

@bachdavi
Copy link
Member

bachdavi commented Feb 1, 2019

If you use create-publication the conn map will contain a :pub key that has an async-pub which dispatches on the name of the registered query. In this case it would be "loans".
create-debug-publication will pipe every output that the server send also to the repl.

Hope that helps

@bachdavi
Copy link
Member

bachdavi commented Feb 2, 2019

The examples should work now.
For the example rga you need to use a different branch from the server.
ldbc requires you to have the data...

@bachdavi bachdavi closed this as completed Feb 2, 2019
@comnik
Copy link
Member

comnik commented Feb 2, 2019

Hey yeah sorry for that, the examples are somewhat internal still. We will try and get some more usable ones out there. Lots of things are happening on the back-end right now, hard to keep up :)

(Keeping this open for now, until we have some more examples / @theronic confirms he's somewhat good to go)

@comnik comnik reopened this Feb 2, 2019
@halljson
Copy link

halljson commented Mar 31, 2019

... am running a differential dataflow server. ...

Just wanted to clarify that the running server needs to be the declarative dataflow server: https://github.com/comnik/declarative-dataflow/tree/v0.1.0#build--run

Also, the code snippet posted here is slightly out of date; looks like create-conn was renamed to create-conn! (among a few other small changes). https://github.com/comnik/clj-3df/blob/master/src/clj_3df/core.cljc#L292 appears to be up to date.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants