Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
capnproto
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
capnproto
Commits
5326ffc7
Commit
5326ffc7
authored
Sep 18, 2013
by
Kenton Varda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Flesh out pipelining a little more, so that it can be extended later.
parent
dd9038ab
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
6 deletions
+31
-6
rpc.capnp
c++/src/capnp/rpc.capnp
+31
-6
No files found.
c++/src/capnp/rpc.capnp
View file @
5326ffc7
...
...
@@ -285,6 +285,12 @@ struct Return {
canceled @4 :Void;
# Indicates that the call was canceled due to the caller sending a Finish message
# before the call had completed.
unsupportedPipelineOp @5 :Void;
# The call was addressed to a `PromisedAnswer` that was not understood by the callee because
# it used features that the callee's RPC implementation does not support. The caller should
# wait for the first call to return and then retry the dependent call as a regular,
# non-pipelined call.
}
}
...
...
@@ -627,7 +633,7 @@ struct PromisedAnswer {
# ID of the question (in the sender's question table / receiver's answer table) whose answer is
# expected to contain the capability.
path @1 :List(
UInt16
);
path @1 :List(
PathPart
);
# Path to the capability in the response. This is a list of indexes into the pointer
# sections of structs forming a path from the root struct to a particular capability. Each
# pointer except for the last one must point to another struct -- it is an error if one ends
...
...
@@ -635,11 +641,30 @@ struct PromisedAnswer {
#
# If the question refers to an `Accept` (or anything other than a `Call`), this list must be
# empty.
#
# TODO(someday): Would it make sense to support lists in the path, and say that the method
# should be executed on every element of the list? Of course, if we wanted to get arbitrarily
# complicated, the ideal would be for the caller to be able to upload a script to run that
# derives the capability given the former answer, but that's probably unreasonable.
struct PathPart {
union {
noop @0 :Void;
# Dummy. Ignore this part. This field is only here so that we can define PathPart to be
# a union which we might extend in the future. If an RPC implementation receives a PathPart
# of a type it doesn't recognize, it should reply with a `Return` with `unsupportedPipelineOp`
# set.
pointerIndex @1 :UInt16;
# Index of a pointer in the pointer section of a struct. Only valid when addressing a
# struct.
# TODO(someday): We could add:
# - For lists, the ability to address every member of the list, or a slice of the list, the
# answer to which would be another list. This is useful for implementing the equivalent of
# a SQL table join (not to be confused with the `Join` message type).
# - Probably not a good idea: the ability to specify an arbitrary script to run on the
# result. We could define a little stack-based / point-free language where `PathPart`
# specifies one "instruction" or transformation to apply. Although this is not a good idea
# (over-engineered), any narrower additions to `PathPart` should be designed as if this
# were the eventual goal.
}
}
}
struct ThirdPartyCapDescriptor {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment