0.0.10 • Published 6 years ago

overdb v0.0.10

Weekly downloads
14
License
MIT
Repository
github
Last release
6 years ago

overdb

Simple virtual actor system

class Model {
    private counter = 0;

    async hello() {
        this.counter++;
        return this.counter;
    }
}

inject.when(MemoryPort).createSelf().asSingleton();

const c = await spawn(new Model());
const r = await c.hello();

const c2 = await actor(Model);
const r2 = await c2.hello();

expect(r2).toBe(2);
expect(await c.hello()).toBe(3);

const packed = Packer.pack(c);
const unpacked = Packer.unpack(packed) as Model; // ?

const result = await unpacked.hello() // ?

expect(result).toBe(4);
    
0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.1

6 years ago