Introduction
Overview
otavia is an IO and Actor programming model powered by Scala 3. It provides a toolkit to make writing high-performance concurrent programs easier.
You can get a quick overview of the basic usage and core design of otavia in the following documentation:
You can also learn about other modules in otavia through other documentation on this site.
Features at a Glance
- Full-Link Asynchronous: Everything is asynchronous, no blocking, no thread suspending.
- Forget Threads, Forget Locks: You will no longer be plagued by multithreading problems; everything you write runs in a single thread!
- Simpler Concurrent: Actors and Channel let you build systems that scale up, using the resources of a server more efficiently, and out.
- Resilient by Design: Building on the principles of The Reactive Manifesto, Otavia allows you to write systems that self-heal and stay responsive in the face of failures.
- High Performance: Build millions of actor instances and send many billion messages in seconds.
- Type Safe: Message send between actors is type safe at compile time.
- Zero-Cost Ask-Pattern: Send ask message and get reply message like calling a method, but zero-cost.
- DI of Actor: An
ActorSystemis also seen as a container forActorinstances, and developers can type-safely inject dependentActors at compile time. - Powerful IO Stack: The IO stack is ported from Netty, but supports AIO and file channel.
- async/await: Implement a set of
async/awaitsyntaxes based on the CPS (Continuation Passing Style) usingScala 3metaprogramming tools. - Simple threading model: The threading model of the
otaviaruntime is very simple and efficient, allowing you to maximize the utilization of your system's CPU! - Zero-Deps: The core modules do not depend on any third-party packages.
- Open Ecosystem: Otavia provides a module mechanism that allows users to easily use third-party module libraries.
Ecosystem
The IO stack of otavia is ported from Netty. In order to make the IO tasks work better with the Actor model, otavia is not fully compatible with Netty. Happily, most of the application-layer network protocol codecs in the Netty ecosystem can be easily ported to otavia, so we maintain this ecosystem project to port various application-layer network protocol codecs from Netty and Eclipse Vert.x.
Contributing
Any contributions are welcome!