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

Set up RPC #14

Closed
cinnamon-bun opened this issue Jun 3, 2020 · 4 comments
Closed

Set up RPC #14

cinnamon-bun opened this issue Jun 3, 2020 · 4 comments

Comments

@cinnamon-bun
Copy link
Member

Right now sync happens over an HTTP REST API.

Generalize this using some RPC framework so it can happen over other transports too.

JSON-RPC is a good choice.

This was referenced Jun 3, 2020
@cinnamon-bun cinnamon-bun changed the title set up RPC Set up RPC Jun 3, 2020
@cinnamon-bun cinnamon-bun added this to the v1 milestone Jun 3, 2020
@cinnamon-bun cinnamon-bun modified the milestones: v1, v2 Aug 5, 2020
@sgwilym
Copy link
Contributor

sgwilym commented Aug 19, 2020

I'd like to throw in that earthstar-graphql is capable of doing this job, as it can be carried out over any transport.

@cinnamon-bun
Copy link
Member Author

cinnamon-bun commented Aug 19, 2020

Hmm! Do you think GraphQL would work over a duplex stream like you get from hyperswarm?

@sgwilym
Copy link
Contributor

sgwilym commented Aug 20, 2020

Yes, so you can communicate bi-directionally with a GraphQL server using 'subscriptions' (here's an implementation which can be used with graphql-js, the package earthstar-graphql uses to define its schema: https://github.com/apollographql/graphql-subscriptions)

A lot of it is very new to me, but I think (?) this is right in principle.

@cinnamon-bun
Copy link
Member Author

I wrote mini-rpc for this purpose, now we need to hook it up in the sync and pub code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants