graphql

2020-02-08T00:53:33.042600Z

I've recently started to play around with some of the newer additions to juc, and tried swapping out lacina's promise implementation with a CompletableFuture: https://github.com/walmartlabs/lacinia/compare/master...hiredman:master it mostly works, a few tests fail, the execution model isn't exactly the same because with CompletableFuture you can't execute things on the same thread, and it allows multiple callbacks to be registered. Actually making the switch is likely to be kind of risky because of the changes to the execution model, that kind of thing is easy to get tripped up on, but it is interesting to look at

hlship 2020-02-08T00:55:29.043500Z

What's the advantage of CompleteableFuture vs. Lacinia promises? The "limitations" of RRP (like single deliver!) were chosen to prevent certain common mistakes from being possible.

2020-02-08T00:57:21.044800Z

the only big one I can think of would be interoperability, since CompleteableFuture is built into the jvm, other libraries are more likely to support it, but that may take a while (it was added in 1.8 and I still think of it as being a new thing)

2020-02-08T00:58:07.045500Z

but, even if lacina itself doesn't use CompletableFuture it is easy enough to extend the protocols to it