class ChatRoom extendsActor{// receive an remote procedure call from the clientsendMessage(rpc: Rpc,username: string,message: string){// save message to persistent storagethis._state.messages.push({username,message});// broadcast message to all clientsthis._broadcast("newMessage",{username,message});}}
client.ts
Example client code
constroom = awaitrivet.get<ChatRoom>({name:"room",channel:"random"});// send a messagebutton.onclick = ()=>{room.sendMessage("joe_armstrong",input.value);};// receive broadcasted message from actorroom.on("newMessage",({username,message})=>{console.log("New message:",username,message);});
Rivet Actors come packed with features
Remote Procedure Calls
Create cross-application function calls with minimal code overhead.
Scale from zero to millions of users with powerful built-in capabilities.
Run globally near your users
Minimize latency with actors created in regions closest to your users.
Scales to zero
Handle millions of connections with low latency and high-throughput writes while saving costs through instant actor sleep/wake cycles.
Open-source and self-hostable
Rivet is open source under the Apache 2.0 license - customize and deploy it freely without any sales process. Choose between self-hosting or quick deployment with Rivet Cloud.
Resilient to failures
Automatic state preservation protects data during system failures and updates, with built-in safeguards that isolate failures.
Supports data localization
Store data in designated locations to meet data localization compliance requirements.
Powered by V8 isolates
Faster, cheaper, and more lightweight than lambda functions & containers.
Rivet Cloud
Deploy on Rivet Cloud
A full-featured platform that lets you focus on building.
Team collaboration
Bring your entire team together in one workspace, with no user limits on paid.
DDoS mitigation built-in
Automatic DDoS attack mitigation to protect your application.
class ChatRoom extendsActor{// receive an remote procedure call from the clientsendMessage(rpc: Rpc,username: string,message: string){// save message to persistent storagethis._state.messages.push({username,message});// broadcast message to all clientsthis._broadcast("newMessage",{username,message});}}
client.ts
Example client code
constroom = awaitrivet.get<ChatRoom>({name:"room",channel:"random"});// send a messagebutton.onclick = ()=>{room.sendMessage("joe_armstrong",input.value);};// receive broadcasted message from actorroom.on("newMessage",({username,message})=>{console.log("New message:",username,message);});
Rivet Actors come packed with features
Remote Procedure Calls
Create cross-application function calls with minimal code overhead.
Scale from zero to millions of users with powerful built-in capabilities.
Run globally near your users
Minimize latency with actors created in regions closest to your users.
Scales to zero
Handle millions of connections with low latency and high-throughput writes while saving costs through instant actor sleep/wake cycles.
Open-source and self-hostable
Rivet is open source under the Apache 2.0 license - customize and deploy it freely without any sales process. Choose between self-hosting or quick deployment with Rivet Cloud.
Resilient to failures
Automatic state preservation protects data during system failures and updates, with built-in safeguards that isolate failures.
Supports data localization
Store data in designated locations to meet data localization compliance requirements.
Powered by V8 isolates
Faster, cheaper, and more lightweight than lambda functions & containers.
Rivet Cloud
Deploy on Rivet Cloud
A full-featured platform that lets you focus on building.
Team collaboration
Bring your entire team together in one workspace, with no user limits on paid.
DDoS mitigation built-in
Automatic DDoS attack mitigation to protect your application.
class ChatRoom extendsActor{// receive an remote procedure call from the clientsendMessage(rpc: Rpc,username: string,message: string){// save message to persistent storagethis._state.messages.push({username,message});// broadcast message to all clientsthis._broadcast("newMessage",{username,message});}}
client.ts
Example client code
constroom = awaitrivet.get<ChatRoom>({name:"room",channel:"random"});// send a messagebutton.onclick = ()=>{room.sendMessage("joe_armstrong",input.value);};// receive broadcasted message from actorroom.on("newMessage",({username,message})=>{console.log("New message:",username,message);});
Rivet Actors come packed with features
Remote Procedure Calls
Create cross-application function calls with minimal code overhead.
Scale from zero to millions of users with powerful built-in capabilities.
Run globally near your users
Minimize latency with actors created in regions closest to your users.
Scales to zero
Handle millions of connections with low latency and high-throughput writes while saving costs through instant actor sleep/wake cycles.
Open-source and self-hostable
Rivet is open source under the Apache 2.0 license - customize and deploy it freely without any sales process. Choose between self-hosting or quick deployment with Rivet Cloud.
Resilient to failures
Automatic state preservation protects data during system failures and updates, with built-in safeguards that isolate failures.
Supports data localization
Store data in designated locations to meet data localization compliance requirements.
Powered by V8 isolates
Faster, cheaper, and more lightweight than lambda functions & containers.
Rivet Cloud
Deploy on Rivet Cloud
A full-featured platform that lets you focus on building.
Team collaboration
Bring your entire team together in one workspace, with no user limits on paid.
DDoS mitigation built-in
Automatic DDoS attack mitigation to protect your application.