This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-07-18
Channels
- # aleph (4)
- # beginners (70)
- # cider (66)
- # clara (16)
- # cljdoc (20)
- # cljs-dev (9)
- # cljsrn (2)
- # clojure (36)
- # clojure-ecuador (2)
- # clojure-italy (14)
- # clojure-japan (2)
- # clojure-nl (22)
- # clojure-uk (79)
- # clojurescript (133)
- # clojutre (2)
- # code-reviews (5)
- # cursive (5)
- # data-science (1)
- # datomic (47)
- # duct (2)
- # emacs (1)
- # figwheel-main (3)
- # fulcro (11)
- # funcool (1)
- # graphql (6)
- # hyperfiddle (4)
- # leiningen (4)
- # luminus (9)
- # lumo (8)
- # mount (4)
- # nrepl (2)
- # off-topic (19)
- # onyx (1)
- # re-frame (23)
- # reagent (91)
- # reitit (17)
- # ring-swagger (2)
- # shadow-cljs (43)
- # tools-deps (27)
- # vim (45)
Hi guys, I am trying to setup a subscription
in Lacinia. The original docs & test at https://lacinia.readthedocs.io/en/latest/subscriptions/index.html weren't fully clear and I have found https://lacinia-pedestal.readthedocs.io/en/latest/subscriptions.html# but still see the tests and examples a bit far from a real implementation (probably due my short experience with Lacinia). So, I wonder if there is any real example somewhere on how to drive the data through the streamer after a mutation to a subscription somewhere. The other question is, does it worth to adopt Pedestal just for the matter?
The subscription support inside lacinia is there to provide a general framework for the implementation, which comes in lacinia-pedestal. I don't know enough about the other HTTP stacks to know if they can support web sockets in a way that makes sense for subscriptions.
I made an implementation using Kafka as source, it's in a private repo, but shared some snippets before as somebody has the same question. It's a simple bank simulation, with several subscriptions, like keeping track of changes to your account. Maybe I should ask to open source it + create a blog post.
In my case when data came in from Kafka it would check if there where subscriptions active which needed the event.
it isn't much code at all to use lacinia to drive subscriptions over some other transport, I've been using them to control subscriptions over a http://socket.io socket (which is some elaborate protocol that does detection and fallback between websockets and long polling)