Porting a Sync Engine to Effect: Handling Multiple Service Instances

i'm currently porting a 'mini' sync engine similar to live store but with multi-provider / peer2peer support to effect, and i'm wondering if there's some primitives to have 'multiple services of the same type' (e.g. a remotesyncprovider/localsyncprovider)

with the old, non-effect version i was just doing something like:

new Chronicle({
    db,
    deviceId: data.id,
    providers: [(chronicle) => new RemoteProvider(chronicle, data), (chronicle) => new LocalProvider(chronicle, data)],
})
Was this page helpful?