0.0.10 • Published 4 years ago

overdb v0.0.10

Weekly downloads
14
License
MIT
Repository
github
Last release
4 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

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.1

4 years ago