@cicadoidea/actor

0.0.4 • Public • Published

Actor

Actor model for nodejs.

  • npm install @cicadoidea/actor

Examples

Basic ping-pong

const { actor_t } = require('@cicadoidea/actor/lib/actor')

let a = new actor_t()

a.on('ping', re => {
  console.log('a on ping')
  re.send('pong', a)
})

let b = new actor_t()

b.on('pong', re => {
  console.log('b on pong')
  re.send('ping', b)
})

a.send('ping', b) // loop forever

Community

Contributions are welcome, see current TODO list for tasks.
(Please add yourself to the AUTHORS list if you made any contributions.)

License

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.0.40latest

Version History

VersionDownloads (Last 7 Days)Published
0.0.40
0.0.30
0.0.20
0.0.10

Package Sidebar

Install

npm i @cicadoidea/actor

Weekly Downloads

0

Version

0.0.4

License

GPL-3.0-or-later

Unpacked Size

36.5 kB

Total Files

4

Last publish

Collaborators

  • xieyuheng