Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/perbu/bollywood
PoC actor model implementation
https://github.com/perbu/bollywood
Last synced: about 2 months ago
JSON representation
PoC actor model implementation
- Host: GitHub
- URL: https://github.com/perbu/bollywood
- Owner: perbu
- License: bsd-2-clause
- Created: 2023-12-04T10:38:54.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-21T07:16:11.000Z (about 1 year ago)
- Last Synced: 2024-06-21T17:49:45.775Z (7 months ago)
- Language: Go
- Size: 10.7 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Bollywood
Bollywood a simplistic actor model framework. I wrote this to get an idea how
an actor model could be implemented in Go.It is not meant to be used in production and doesn't do support networking, limiting the actors to work within a
single process.## Usage
```go
e := NewEngine()
// spawn a baker actor
err := e.Spawn("baker", &baker{})
if err != nil {
panic(err)
}
// send a message to the baker
err = e.Send("baker", &bakeBread{})
if err != nil {
panic(err)
}
// stop the baker:
err = e.Stop("baker")
if err != nil {
panic(err)
}```
See the tests for usage## What about a real Actor Model implementation in Go?
Please see [Hollywood](https://github.com/anthdm/hollywood) for a more complete implementation of the Actor Model in Go.