Scalability : Convert large list of objects into pojo and make api call
Let's say I have a json data of multiple vendors in a large number of categories. I need to make post api calls for top 10 vendors of these hundreds of categories. How can I do that in a scalable manner? Each category's post api call has a specific request body. How to map the specific json to each api call's expected request body? I was thinking something like : json.stream .parallel() .map((x) -> { reqBody = jackson mapper for the request body; return reqBody; }) .forEach((body)-> make post call); I thought of polymorphism, but with large number of categories, it's difficult to have a common
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.