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

#VajramInheritance Design and implement Vajram Inheritance #245

Open
RamAnvesh opened this issue May 7, 2024 · 0 comments
Open

#VajramInheritance Design and implement Vajram Inheritance #245

RamAnvesh opened this issue May 7, 2024 · 0 comments
Labels
size: m Medium sized change

Comments

@RamAnvesh
Copy link
Collaborator

We should be able to define a "Vajram Protocol" which only has input and output facet definitions, and no business logic.
Multiple vajrams should be able to "implement" the VajramProtocol. VajramProtocols are classes having the @VajramProtocolDef annotation. The vajram code generator annotation processor would generate RequestInterface, ImmutableRequest and RequestBuilder for the Vajram protocol. The Protocol implementers will depend on the same Request Hierarchy and would not have their own generated models . (In a future version, if needed, we might allow VajramProtocol Implementers to widen the data type of the input facets defined in the VajramProtocol )

Implementers should not be able to add new input facets (this is to make sure that the vajram protocol can add new optional facets without breaking implementers, and also make sure facet ids are deterministic across protocol implementers)
Clients should be able to invoke any of the implementers by creating a Request of the VajramProtocol Request Type - thus achieving runtime polymorphism.

Implementers should be able to

  • add non-input facets like dependencies
  • Add input resolvers and output logic
  • The output type of the implementer must be same as or a subtype of the output type of the vajram protocol
@RamAnvesh RamAnvesh added the size: m Medium sized change label May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: m Medium sized change
Projects
None yet
Development

No branches or pull requests

1 participant