Skip to content

Repo API: Bulk read/write #25

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

Closed
enikao opened this issue Oct 28, 2022 · 9 comments
Closed

Repo API: Bulk read/write #25

enikao opened this issue Oct 28, 2022 · 9 comments

Comments

@enikao
Copy link
Contributor

enikao commented Oct 28, 2022

Ask the model repository for some subset of the stored model, and update it.

Assumptions for time being

Assumptions

Conceptual API

Independent of implementation (will most probably be REST, but could also use Protobuf etc.)

retrieve part of model

in: (list of) node IDs
in: mode {node, subtree, closure}
out: (list of) subgraph(s)

store part of model

in: (list of) subgraph(s)
out: success

Give me a range of IDs I can use

TODO:
in: Number of ids required
out: list of reserved ids

@enikao
Copy link
Contributor Author

enikao commented Nov 11, 2022

Do we care about Command Query Responsibility Segregation (https://www.martinfowler.com/bliki/CQRS.html), i.e. different APIs for read and write access? Seems to be popular especially with highly scalable systems.

@dslmeinte
Copy link
Contributor

I think it's unavoidable if we want to enable collaborative editing. Even when using CRDTs it's useful to separate the intent of performing some edit action from the determination of that edit action being consistent with persisted state and (possibly) other edit actions.

@enikao
Copy link
Contributor Author

enikao commented Nov 11, 2022

I have no experience with web-based systems. Would "different API" mean something like "use POST instead of GET", "have another fragment in my URL" or more like "completely different URL, possibly another server"?

@enikao
Copy link
Contributor Author

enikao commented Jan 16, 2023

How do we report back unknown ids?
Example: I sent a list of 5 ids to the server in mode node (i.e. only asking for each node, neither subtree nor closure).
3 of the ids can be resolved, 2 not. How is this reported back to me?

(Relates to discussion about resolve info)

@joswarmer
Copy link
Contributor

@enikao I think that we need to decide how to report errors in general. And of course we need the list of potential error that may be reported back.

@ftomassetti
Copy link
Contributor

Inspired by @joswarmer comment I created this issue: #74

@enikao
Copy link
Contributor Author

enikao commented Jul 7, 2023

relates to #127

@joswarmer
Copy link
Contributor

How do we report back unknown ids? Example: I sent a list of 5 ids to the server in mode node (i.e. only asking for each node, neither subtree nor closure). 3 of the ids can be resolved, 2 not. How is this reported back to me?

(Relates to discussion about resolve info)

Asking for nodes that do not exist in the repository is not an error, but a normal thing. Consider the following use cases:

  • The model at the client contains an unresolved reference
  • The client thinks a node exists, but in the mean time another client has changed the repository such that the node does not exist anymore.

Therefore, I think we should not explicitly report back unknown nodes. The client can simply check whether a requested node is in the returned chunk or not.

@enikao
Copy link
Contributor Author

enikao commented Mar 23, 2024

Spec in #167

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

4 participants