This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-01-08
Channels
- # asami (7)
- # aws (2)
- # babashka (21)
- # beginners (602)
- # calva (8)
- # cider (11)
- # clj-kondo (10)
- # cljfx (1)
- # clojure (177)
- # clojure-europe (43)
- # clojure-nl (3)
- # clojure-taiwan (2)
- # clojure-uk (45)
- # clojurescript (31)
- # depstar (8)
- # figwheel-main (2)
- # fulcro (12)
- # hugsql (2)
- # java (1)
- # jobs (2)
- # meander (1)
- # missionary (1)
- # off-topic (67)
- # other-languages (1)
- # pathom (212)
- # polylith (4)
- # rdf (1)
- # re-frame (10)
- # reagent (12)
- # reitit (28)
- # reveal (3)
- # shadow-cljs (21)
- # spacemacs (7)
- # sql (5)
- # tools-deps (12)
- # vim (1)
A little while ago I was asking questions in here that were essentially an attempt to learn missionary but eventually figure out how to use missionary to rewrite this code, (currently implemented with core.async): https://github.com/jjttjj/lmalob#syncing-up-the-feed-and-initial-lob but now that I'm attempting to actually implement it I'm thinking the minimal cases I was trying to solve in missionary were off a little bit.
Essentially I have to collect all messages from a flow, asynchronously make an http request, when the http response comes in, compare it to the first collected message from the flow to see if it meets a certain condition, if so immediately stop collecting messages from the flow (so that subsequent messages can be used later by another process) and do something with the messages collected thus far and the http request. If the request doesn't meet the condition I need to wait a bit and try again.
Is the best approach here still to model the http requests as a flow, wrap both flows that they can be identified, combine them with amb=
and then integrate
with a cond to wait for success condition?
I keep wanting to use integrate
+ relieve
to collect all messages, but drop the successive collections until ready to compare to the result of an http task and then to loop this somehow if it fails. But I can't seem to get anything like this working.