Skip to content
This repository has been archived by the owner on Oct 26, 2023. It is now read-only.
/ node-finagle Public archive

Proof of concept lib for creating finagle-like composable Services/Filters in node.

Notifications You must be signed in to change notification settings

jusbrasil/node-finagle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-finagle

Proof of concept lib of a finagle-like composable Service/Filter in node.

A Service is basically a function (input) => Promise<output>

The idea is provide composable wrappers to create smart Services on top of very simple ones.

Things to support in mind:

  • Circuit breaking
  • Batchcing
  • Batch fork-join
  • Retry
  • Hedging requests (more info)

Ideally it should be built on top of proved libraries like dataloader, bluebird and generic-pool

Idea:

val filterStack = (
  FilterStack
    .prepare()
    .andThen(circuitBreaker(/* options */)),
    .andThen(caching(/* options */))
    .andThen(batching(/* options */))
    .andThen(dedup(/* options */))
    .andThen(forkJoin(/* options */)),
    .andThen(hedgeRequest(/* options */)),
);

val loader = filterStack.build((req) => client.loadMany(req.ids));

const x = loader(1);
const y = loader(2);

About

Proof of concept lib for creating finagle-like composable Services/Filters in node.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published