I have two API's. API-1 generates a huge dataset, something like
Dictionary<string,Dictionary<string<List<object>>> data_
My final goal is to find the most efficient way to transfer this data to API-2 deserialize it and return response to API-1.
I have found two approaches:
So my question is, is there a way to transfer directly the data struct to API-2, without JSON serialization/deserialization.
Is there some way to send my data_ container like bytes, and serialize it in API-2?
From what you described, it sounds that this approach of sending all the data in one API call is not suited here.
I suggest that you will send the data to API-2 in chunks.
In API-1 you will save the records with indication of [sent/not sent] in a database. Then you should loop through the records, get chunks of them, and send the chunks to API-2. When you get success from API-2, you should mark the records as "sent" in API1 DB.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.