A large number of data transfer solutions for WEB Service Interfaces

Source: Internet
Author: User
Tags thread

Let's call it "using multithreading to get a large number of data methods." Assuming that our requirement is to get 10W orders through the Web service, my solution is to split into 10 threads per thread transmission 1W Order segment acquisition, specifically see the following flowchart and its description

1, flow chart

2, Process Description:

Thread 1 starts the request interface to obtain 1W data, when the data is successfully fetched, the interface is idle, at which point we start thread 2 to get the data, while thread 1 continues to perform the subsequent work of getting the data, and if you convert the data, the way I use it is to deserialize the XML using the predefined entity object format (this is said to be more efficient than iterating through XML or loading into a dataset, I haven't tested it, haha) stop thread 1 after inserting data into the data. Use this thread-looping approach to handle all threads reading data.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.