-
Notifications
You must be signed in to change notification settings - Fork 29
[skipruntime] Allow to wait for external resources #425
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
Conversation
699eef0 to
d0945cc
Compare
bennostein
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First batch of comments. Mostly little things, but a handful of questions/comments that could use responses.
I don't see any tests about the main bit of behaviour that I thought this was designed to address: the initial GET request always returning an empty collection when it depends on something external. Can you explain what observable changes this PR makes from the user's perspective? What guidance should we give on how to use this / handle loading of external resources?
I'll follow up with a commit to clean up the doc comments' English, but appreciate all of those!
skiplabsdaniel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The general principle is to add a collection of statuses to each resource, with each external service involved in the resource adding its status to this table, along with “creation” and “modification” times.
When a request is made, a “request” (for want of a better word) is created to mark that a request is being made at that time.
The various statuses are aggregated relative to the time of this request (all this to avoid unfortunate time sequences that could lead to infinite waiting).
A request can be made with a “Checker” (too, for want of a better word).
If a “Checker” is provided, if will be called at status change for the requester to check and do what is necessary.
If there is no “Checker” provided and there is a dependency being loaded a “request” identifier is returned to allow subsequent status request relative to that request.
This is the general case for having a notion of status for the resource throughout its life in the service.
There are still some unanswered questions:
- What does this mean for a Skip service chain (status propagation, error handling, etc.)?
1446b2f to
4c0f1f1
Compare
74f7d36 to
83ddd60
Compare
9130ddf to
3b80950
Compare
3b80950 to
372ccdf
Compare
No description provided.