Our group has an number of services that interact with REST API’s.   Those
REST API documents are built by converting Domain Objects to Document DTO’s,
then the DTO’s are serialized to JSON via Jackson.
 
A (made-up) example might be a Car Domain Object that exposes itself and
it’s Parts with REST endpoints.   So there is a set of DTO’s that we
maintain to assemble various REST Doc types (Engine, Wheel, Assembly,
DamagedParts, etc…).
 
Now we want to introduce Kafka messaging with structured Avro Schemas and
generated Java Messages.   The generated Java Avro Message Classes is what
i'm referring to as "Avro DTO’s" (similar analogy of REST
data-representation of the Domain)
 
Ideally we could reuse our existing Json-DTO's and Domain<-> Json-DTO
Converters, but I’m not sure if/how that is possible?
 
Is there any way to stay DRY given we have Domain<->Json-DTO Converters, and
now it seems like we have to create duplicate Domain<->Avro-DTO Converters?
 
Is there any well-know way to streamline this situation that you know of?
 
Thank you for your help.




--
Sent from: http://apache-avro.679487.n3.nabble.com/Avro-Users-f679479.html

Reply via email to