Skip to content

steliospaps/dataloader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dataloader

(under construction)

Build Status Maven Central Javadocs

A java version of the dataloader pattern.

This is my take of the facebook dataloader pattern.

Similar to the java-dataloader but it is not graphql related.

Wrap a batch api, and allow multiple requests to be batched under the hood. This is a reactor-based dataloader

usage

mvn dependency

<dependency>
  <groupId>io.github.steliospaps</groupId>
  <artifactId>dataloader</artifactId>
  <version>xxx</version>
</dependency>

examples

simple

DataLoader<String,Integer> dataloader = ReactorDataLoader.create(list -> list.stream().map(i -> "result"+i).collect(Collectors.toList()));

CompletableFuture<String> result= dataloader.load(1);
// result.get() will yield "result1"

result in the example above will eventually complete.

About

a java version of the dataloader pattern

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages