This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-11-16
Channels
- # admin-announcements (9)
- # beginners (112)
- # boot (223)
- # cbus (10)
- # cider (19)
- # clara (2)
- # cljs-dev (81)
- # cljsjs (3)
- # cljsrn (45)
- # clojure (239)
- # clojure-conj (12)
- # clojure-poland (2)
- # clojure-russia (56)
- # clojure-taiwan (1)
- # clojurescript (57)
- # cursive (28)
- # datomic (5)
- # events (14)
- # immutant (1)
- # jobs (1)
- # ldnclj (8)
- # off-topic (28)
- # om (80)
- # onyx (121)
- # re-frame (10)
- # sneer-br (1)
- # spacemacs (40)
- # yada (44)
@malcolmsparks: nice change for multipart form data
I have a question though: is it intentional that process-request-body only handles multipart/form-data and application/x-www-form-urlencoded?
no. it should be open
but I've only just reached the point where multipart works so I committed!
but haven't released yet
i'm closing this pull request, ok? https://github.com/juxt/yada/pull/34
I had to remove the original body protocol
yes, the reason I couldn't merge that PR was that I needed to finish multi-part first, because body processing is now asynchronous
because yada must support large bodies, as well as small ones
the question is, how to support json/edn etc. again
and make things open
it should be a simple matter of extracting out the protocol again and making it open for extension
although obviously json and edn support should be built in
body coercion is still part of multipart/form-data processing
so it shouldn't be too much work
I'll work on this tonight and push a few more commits
I'd like to test that it works with large streams, perhaps your video upload use-case
yes, forks are good
it doesn't make sense for yada to support all these http things, but then fall over at scale - and having bits of yada that require synchronous thread blocking is going to lead to a bottleneck
re. mongo gridfs - can you send me a link to the API
i'm using monger http://clojuremongodb.info/
great thanks
there's an important protocol in multipart.clj called PartReceiver - the idea is you can hook into yada's body processing to send the individual parts (including partial pieces, if the part is large), to your own 'receiver', that could send these parts on to mongodb
so it's a pass through
I can see that we need a similar protocol for non-multipart bodies, where you want raw access to the incoming buffers
it looks like they're working on it right now https://jira.mongodb.org/browse/JAVA-1282
yes, async may be the future, but it's not always the present!
perhaps the (far) future is super lightweight threads on the jvm, then we'd be back to synchronous models - that might be a long way off though
https://clojurians.slack.com/archives/yada/p1447677064000063 I guess I'll need to re-submit those PRs then
@malcolmsparks: did you say there is no extension point now for that?
@imre: hi - yes, but I meant to say that this was a temporary state, and that a new extension point will be added - I've fetched your branches into my local repo and will attempt to bring your json/edn/transit work into the new model
@malcolmsparks: great stuff. If you do have trouble, leave them there and I'll update them once the new ext point is out