Get the latest tech news

Clojure: Managing throughput with virtual threads


A blog mostly about Clojure programming

In this post we will look at using java Semaphore class to implement basic token bucket rate limiting to control throughput. One of the other key insights I've drawn from claypoole is that unordered parallelism helps minimising latency, as it allows you to process results as soon as they became available. Because of this our implementation of upmap will consume eagerly (i.e it requires all of it's inputs before it will execute) as we need to know the total number of items that we will want to take(count coll).

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Clojure

Clojure

Photo of virtual threads

virtual threads

Photo of Managing throughput

Managing throughput

Related news:

News photo

Rama is a testament to the power of Clojure