Skip to content

feat(call): Add call request and response objects for internal generic API - #4

Open
sauravzg wants to merge 1 commit into
method_handler_codegen_apifrom
call_objects
Open

feat(call): Add call request and response objects for internal generic API#4
sauravzg wants to merge 1 commit into
method_handler_codegen_apifrom
call_objects

Conversation

@sauravzg

Copy link
Copy Markdown
Owner

No description provided.

@sauravzg

Copy link
Copy Markdown
Owner Author

…c API

This change introduces data objects for the internal generic API.
The primary objects are
- RequestStream: which is essentially metadata + input stream
- Lazy: It's a delayed computation struct that is responsible for holding a set of lazy transformations to be performed on a mutable ref to an object. This is needed to allow laze deserialization for cases like arena
- ResponseWriter: A compile time state machine which guarantees the following potential states. "Trailer only" or "Metadata , Message* , Trailers" . This is achieved via compile time state transitions ensuring that's it's impossible to generate an incorrect order. The pain of having to implement these state transitions is simplified via extension API to to trivial maps.
- MessageWrappers: Outgoing and Incoming wrappers to allow tweaking per read(input) and write options(output).


- Known Pitfalls
  - Since, `Lazy` transformations are evaluated lazily, it's difficult to model complex transformations that need shared state without additional cost.
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

Successfully merging this pull request may close these issues.

1 participant