Skip to content

diagrid-labs/dapr-namespaced-actors-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dapr namespaced actors demo

This demo shows how to run Dapr actors across two Kubernetes namespaces on a local kind cluster, simulating client/server traffic between namespaces. A smart-bulb actor service is deployed into two namespaces, and a client app in each namespace talks to its local actor; a Pusher-backed UI streams events from both namespaces to four browser tabs so you can watch the namespaced traffic side by side. The demo is intended for developers exploring multi-tenant or environment-isolation patterns with Dapr actors.

Install requirements

Setting up

Copy the service/config.ini.example file to service/config.ini and fill in the values for your Pusher account.

Run the setup script:

./setup.sh

Follow the instructions on screen and run the port-forwarding commands. When the forwarding is set up, you can open four browser tabs to simulate a client and server app in two namespaces.

Project structure

  • service/ — Smart-bulb actor service (Python). Contains smartbulb_actor.py, smartbulb_actor_service.py, smartbulb_actor_interface.py, the FastAPI/Flask host, Dockerfile, and config.ini.example.
  • client/ — Client app (Python) that invokes the actor. Contains app.py, the shared smartbulb_actor_interface.py, templates, and a Dockerfile.
  • deploy/ — Kubernetes manifests for deploying the client and service into the two namespaces.
  • setup.sh — Script that builds images, loads them into kind, and applies the manifests.
  • demo.gif — Recording of the demo in action.

Join the Dapr Discord for Q&A and chat with other community members!

About

Demonstrates namespaced Dapr actors on Kubernetes (kind), simulating two-namespace client/server traffic with a Pusher-backed UI.

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors