yada 2018-10-24

Thanks @malcolmsparks I’m really interested in how it might work as the main bus of an application. I’ll give it a go myself and see what comes out.

Made a branch of yada with speculative tests. Found no errors. https://github.com/borkdude/yada/tree/speculative-tests

👍 1

if I want to use something that needs a java.io.Writer to create the body for a yada response, what is a good way to do this (i.e. what type of 'thing' do I write to? does yada e.g. create content from an OutputStream. what should I do to make sure the writer doesn't get closed before the request is returned?) Or is it just easier to use (with-out-str (write-the-thing *out*))?

@stijn you could give it a java.io.StringWriter too - presumably you are going to call this thing on a manifold.deferred/future ?

that might indeed be a problem on a different thread

@mccraigmccraig but what about the with-open that's usually used for this kind of writing. does that work with futures?

it doesn't matter for a StringWriter - it doesn't actually hold any i/o resources open - if it were something like a FileWriter with a file-handle though you could use with-open inside the body of the future