TREEcg / event-stream-client

Deprecated! Use the rdf-connect/ldes-client instead
https://github.com/rdf-connect/ldes-client
Other
14 stars 9 forks source link

Bookkeeper - make data exportable & importable #34

Closed KasperZutterman closed 2 years ago

KasperZutterman commented 2 years ago

Allow data structures inside https://github.com/TREEcg/event-stream-client/blob/main/packages/actor-init-ldes-client/lib/Bookkeeper.ts to be exportable and importable.

queue = new PriorityQueue({ comparator: compareFragments}); -> require('js-priority-queue');. this module does not contain serialize/deserialize methods so has to be done manually. Probably by calling Dequeue till the queue is empty and load them one by one using Queue

queued: any = new LRU({ max: 500, maxAge: 1000 * 60 * 60 * 24 }); -> require("lru-cache");. this module contains the methods dump & load that can be used.

blacklist: Set<string> = new Set(); can be serialized/deserialized by converting the Set to an Array and vice-versa.