# trickle
**Repository Path**: mirrors_spotify/trickle
## Basic Information
- **Project Name**: trickle
- **Description**: A small library for composing asynchronous code
- **Primary Language**: Unknown
- **License**: Apache-2.0
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2020-08-18
- **Last Updated**: 2026-05-09
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
[](https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.spotify%22%20trickle*)
[](LICENSE.txt)
trickle
=======
A small library for composing asynchronous code. The main reason for it to exist is to make it
easier to create graphs of interconnected asynchronous calls, pushing the 'worrying about
concurrency' aspects into the framework rather than mixing it in with the business logic.
NOTE: this project is no longer supported. Feel free to fork it if you like it. Internally, we've
switched to using CompletionStage/CompletableFuture instead.
# When should I use it?
- ~~When you are combining more than 2 asynchronous calls together, and you think the code is hard to read.~~
- ~~When you want to separate concurrency management aspects (when code does something) from business logic (what it does).~~
- ~~When you want to use something smaller and easier to learn than frameworks like Akka and RxJava.~~
Probably none of the above, see note at top.
# Getting Started
Include the latest version of Trickle into your project:
```xml
com.spotify
trickle
0.6.2
```
Define the input parameters to your call graph:
```java
public static final Input KEYWORD = Input.named("keyword");
public static final Input ARTIST = Input.named("artist");
```
Define the code to be executed in the nodes of your graph:
```java
Func1> findTracks = new Func1>() {
@Override
public ListenableFuture> run(String keyword) {
return search.findTracks(keyword);
}
};
Func1 findArtist = new Func1() {
@Override
public ListenableFuture run(String artistName) {
return metadata.lookupArtist(artistName);
}
};
Func2, MyOutput> combine = new Func2, MyOutput>() {
@Override
public ListenableFuture run(Artist artist, List