Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. JavaScript
  3. clooney

clooney

Apache-2.0JavaScript

An actor library for the web that runs classes in Web Workers to keep the main thread responsive.

GitHubGitHub
1.4k stars36 forks0 contributors

What is clooney?

Clooney is an actor library for the web that enables developers to run JavaScript classes in Web Workers without directly managing worker threads. It solves the problem of main thread blocking by offloading expensive computations to background threads, using Comlink under the hood for transparent communication. This allows for responsive web applications while maintaining a simple, class-based programming model.

Target Audience

Web developers building performance-sensitive applications that require offloading CPU-intensive tasks, such as data processing, image manipulation, or complex calculations, without diving into low-level Web Worker APIs.

Value Proposition

Developers choose Clooney because it dramatically simplifies concurrent programming on the web by abstracting Web Workers into an intuitive actor pattern, reducing boilerplate and eliminating common pitfalls in worker communication. Its integration with Comlink ensures reliable proxying and a seamless developer experience.

Overview

Clooney is an actor library for the web. Use workers without thinking about workers.

Use Cases

Best For

  • Offloading CPU-intensive calculations from the main thread in web apps
  • Implementing background processing for data-heavy operations without blocking UI
  • Building responsive web applications that require concurrent task execution
  • Simplifying Web Worker usage with a class-based abstraction layer
  • Handling events and functions across thread boundaries in a structured way
  • Managing multiple worker instances with configurable spawning strategies

Not Ideal For

  • Applications requiring direct DOM access or browser APIs within worker logic, as Web Workers run in an isolated context
  • Projects needing synchronous execution or real-time responsiveness, since all actor method calls are asynchronous via promises
  • Simple web apps with lightweight computations where worker management overhead outweighs performance benefits
  • Teams targeting browsers without ES6 Proxy support who are unwilling to add polyfills, due to Clooney's dependency on Proxies

Pros & Cons

Pros

Intuitive Actor Abstraction

Abstracts Web Workers into a class-based API, allowing developers to spawn actors in workers without managing threads directly, as demonstrated in the quickstart example with Clooney.spawn().

Seamless Async Handling

Automatically manages promises and async methods across thread boundaries, enabling natural asynchronous programming without extra boilerplate, shown in the timeoutThing() example.

Flexible Event Support

Provides special handling for events and functions by converting them into transferable remoteEvent objects, making cross-thread event handling possible, as detailed in the Events and Functions section.

Configurable Worker Strategies

Offers strategies like RoundRobinStrategy to control worker container creation and distribution, optimizing resource usage for concurrent tasks with options like maxNumContainers.

Cons

Scope Isolation Limitation

Actors cannot rely on their surrounding scope due to execution in isolated workers, restricting closure usage and requiring explicit data passing, as noted in the README caveat about ES6 module support.

Browser Compatibility Hurdles

Depends on ES6 Proxy support, requiring polyfills for older browsers, and CDN usage involves workarounds for same-origin restrictions, adding setup complexity as shown in the CDN example.

Performance Overhead from Proxying

Communication between main thread and workers involves proxying via Comlink, which can introduce latency compared to direct worker messaging for high-frequency or latency-sensitive tasks.

Frequently Asked Questions

Quick Stats

Stars1,420
Forks36
Contributors0
Open Issues5
Last commit3 days ago
CreatedSince 2018

Tags

#javascript-library#actor-model#web-development#concurrency#web-workers#performance

Built With

J
JavaScript
W
Web Workers API

Included in

JavaScript34.9kNaming1.4k
Auto-fetched 10 hours ago

Related Projects

PuppeteerPuppeteer

JavaScript API for Chrome and Firefox

Stars95,567
Forks9,577
Last commit1 day ago
UppyUppy

The next open source file uploader for web browsers :dog:

Stars30,964
Forks2,106
Last commit1 day ago
partytownpartytown

Relocate resource intensive third-party scripts off of the main thread and into a web worker. 🎉

Stars13,768
Forks452
Last commit1 day ago
UglifyUglify

JavaScript parser / mangler / compressor / beautifier toolkit

Stars13,382
Forks1,223
Last commit1 year ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub