[ANN] superlifter - DataLoader for Clojure

已查看 168 次
跳至第一个未读帖子

Oliver Hine

未读,
2020年2月19日 17:14:132020/2/19
收件人 Clojure
Hi everyone,

I am pleased to announce the first release of superlifter.

Superlifter is an implementation of DataLoader for Clojure.

To quote from the DataLoader readme:

DataLoader allows you to decouple unrelated parts of your application without sacrificing the performance of batch data-loading. While the loader presents an API that loads individual values, all concurrent requests will be coalesced and presented to your batch loading function. This allows your application to safely distribute data fetching requirements throughout your application and maintain minimal outgoing data requests.

Superlifter uses Urania, a remote data access library for Clojure/script inspired by Haxl which in turn inspired DataLoader. Urania allows batching of similar fetches and deduplication via caching of identical fetches.

Superlifter adds smooth integration with libraries like lacinia, where GraphQL resolvers are run independently and must return data (or promises of data), leading to 1+n problems which can otherwise only be resolved by prefetching which complicates code.

There is a readme and an example project for a Lacinia GraphQL server at the repo on Github https://github.com/oliyh/superlifter

Feedback appreciated, as always, here or on Github.

Cheers,
Oliy

Ag Ibragimov

未读,
2020年2月21日 21:42:542020/2/21
收件人 clo...@googlegroups.com

This looks absolutely mind-blowing and incredible! Thank you!

On Wed 19 Feb 2020 at 14:14, Oliver Hine <oliy...@gmail.com> wrote:

> Hi everyone,
>
> I am pleased to announce the first release of superlifter
> <https://github.com/oliyh/superlifter>.
>
> Superlifter is an implementation of DataLoader
> <https://github.com/graphql/dataloader> for Clojure.
>
> To quote from the DataLoader readme:
>
> DataLoader allows you to decouple unrelated parts of your application
> without sacrificing the performance of batch data-loading. While the loader
> presents an API that loads individual values, all concurrent requests will
> be coalesced and presented to your batch loading function. This allows your
> application to safely distribute data fetching requirements throughout your
> application and maintain minimal outgoing data requests.
>
> Superlifter uses Urania <https://github.com/funcool/urania>, a remote data
> access library for Clojure/script inspired by Haxl
> <https://github.com/facebook/Haxl> which in turn inspired DataLoader.
> Urania allows batching of similar fetches and deduplication via caching of
> identical fetches.
>
> Superlifter adds smooth integration with libraries like lacinia
> <https://github.com/walmartlabs/lacinia>, where GraphQL resolvers are run

Oliver Hine

未读,
2020年3月26日 10:19:142020/3/26
收件人 Clojure
Hi everyone,

I have published a blog post explaining the use and application of the library: https://juxt.pro/blog/posts/superlifter.html

In writing the blog post I realised the API could be much simpler. I have made some changes and released superlifter 0.1.1 which should be much more straightforward to use.

Thanks,
Oliy
回复全部
回复作者
转发
0 个新帖子