Fork me on GitHub
#yada
<
2015-10-09
>
malcolmsparks15:10:09

hi @mccraigmccraig - the rationale is my reading of https://tools.ietf.org/html/rfc7231#section-4.3.4 but it's a bit ambiguous

malcolmsparks15:10:34

yes, i'm definitely planning to support Prefer - you must be an http nerd like me for knowing about that!

malcolmsparks15:10:12

Prefer is also very useful for yada's asynchrony: http://tools.ietf.org/html/rfc7240#section-4.1 - I've included 7240 in the release for a while, partly to remind me to implement it

malcolmsparks15:10:36

I've been a bit quagmired in implementing async streaming for large request and response bodies

malcolmsparks15:10:59

taken me a longer time than I expected, but has ended up being 'the right thing to do'

mccraigmccraig15:10:22

hey @malcolmsparks i wouldn't have called myself an http nerd, but i did notice the RFC7240 you referenced in the PutMethod and i did rtfm for once simple_smile

mccraigmccraig16:10:40

looking forward to async streaming - i have an entirely async application apart from the handlers dealing with http uploads, which is niggling me

malcolmsparks16:10:49

@mccraigmccraig: is there a clojure exchange talk in your work? or can't you talk about it

mccraigmccraig16:10:38

@malcolmsparks: dunno - there's no particular reason i can't talk about it - i hadn't thought about it

mccraigmccraig16:10:45

when/where is clojure exchange ?

mccraigmccraig16:10:27

ah, got it - skillsmatter

malcolmsparks16:10:34

having a totally async app is pretty novel

malcolmsparks16:10:56

and lots of people are interested in async now

malcolmsparks16:10:07

especially what you've been doing with manifold chains

malcolmsparks16:10:29

I think there's a talk in manifold - I've been reading manifold.stream and think I finally get why it's called manifold

malcolmsparks16:10:38

it's a junction box for all the various async apis out there

malcolmsparks16:10:54

I think it's a work of genius to think of doing this, and actually accomplish it too

malcolmsparks16:10:34

he's right in his docs when he says that library authors need an abstraction to avoid serving only those in their particular walled garden

malcolmsparks16:10:48

I feel like manifold was a good choice for yada

mccraigmccraig16:10:00

yeah, it's pretty neat - i'm certainly glad i stumbled across it - all the pieces fell into place

mccraigmccraig16:10:10

(and yada was one of those pieces)

mccraigmccraig16:10:49

hmm. well doing talks is good for me, though i'm not exactly sure i enjoy doing it

mccraigmccraig16:10:01

what's the talk you and @thomas are doing ?

malcolmsparks16:10:08

i feel the same way about yada's upstream ingredients, lots of things all falling into place

malcolmsparks16:10:50

it's a proposal for a joint talk about various ways of writing a rest service using his phonebook example - he's doing a compojure/ring version, I'm showing the same but with yada code

malcolmsparks16:10:42

his implementation is very neat and minimal, my code is in examples/phonebook in master, but the PUT implementation forced me down the rabbit hole of thinking about streaming bodies...

malcolmsparks16:10:42

I've found a really nice trick of finding boundary strings in bodies, with a nice boyer-moore implementation already written: https://github.com/ikoblik/clj-index

mccraigmccraig16:10:10

i remember doing a boyer-moore impl about 20 years ago simple_smile

malcolmsparks16:10:22

so the implementation will be both fast and asynchronous (compared to commons file upload that is)

malcolmsparks16:10:30

simple_smile it's circa 1977 i think

malcolmsparks16:10:01

I hope clj-index doesn't have any major perf problems, I really don't fancy writing a bm implementation - maybe you can resurrect yours!

mccraigmccraig16:10:37

iirc it was in C simple_smile

malcolmsparks16:10:19

it's a bit tricky, I have to worry about boundaries straddling byte-buffers

malcolmsparks16:10:00

but the bm algo is nice, and given everything is byte buffers, you can run it on a whole byte buffer (which helps, because with bm you have to go 'backwards')