Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building a source: Roundtripping operations through firebase #98

Closed
opsb opened this issue Mar 2, 2015 · 1 comment
Closed

Building a source: Roundtripping operations through firebase #98

opsb opened this issue Mar 2, 2015 · 1 comment

Comments

@opsb
Copy link
Contributor

opsb commented Mar 2, 2015

In orbit-firebase operations are roundtripped asynchronously, but without promises i.e.

firebaseSource: transform(operation){
    firebase.saveChanges(operation);
}

to keep things consistent between all listening clients (not just the one that emitted the transformation) the response is then delivered via a websocket i.e.

firebaseListener.on("didTransform", function(operation){
    cache.transform(operation);
})

the firebaseListener registers listeners using the firebase client and then converts any received events back into operations which are applied to the cache. This means that there's no way to track the ancestry...

Possible approaches:

  1. Ignore the ancestry issue - I've already seen sequencing issues that are most likely caused by a lack of this information.

  2. Maintain operation queues on firebase - this means that the operations are stored verbatim in firebase and delivered in their original form to any listening clients. Getting this to work with firebase's approach to security is going to be difficult though...

@dgeb if you have any suggestions or input at all I'd be very happy to hear it :)

@opsb opsb changed the title Building a source: Roundtripping operations without ancestry information Building a source: Roundtripping operations through firebase Mar 2, 2015
@opsb
Copy link
Contributor Author

opsb commented Mar 16, 2015

I'm now using a different approach to handle this so it's not relevant.

@opsb opsb closed this as completed Mar 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant