0

I am new to web services, so kindly bear with me. I am building a WordPress website for a client where they require some data to be stored in a custom table. They have an application which fetches the data from some other vendor. Now they don't want to give us access to their application or the 3rd party vendor. So they want us to implement a web service which will consume the data sent by them to update our custom table.

Their exact words: "XML/SOAP based Web Service hosted at the Web Site"

Now I have been reading about WP rest API and also have been able to implement simple custom endpoints.

But since I am just a beginner, I am wondering whether is it possible for WP Rest API to consume HUGE data? For instance, would it be possible for them to send 1000 rows of data (to be updated) as parameter to the Web Service.

From what I have read, it looks like it is possible using SOAP and/or MTOM. But I cant seem to find out the answer to whether this is possible using REST? And whether REST is even preferred in this case or not?

BTW, I am not asking for the entire code, but just a few pointers to useful resources and a simple explanation would help.

Thanks in advance.

  • I see someone has downvoted the question. Perhaps they could have tried commenting on why they deemed it necessary to do so? If I am asking a question which has been asked multiple times, or if my language is offensive, or if I am violating SE policies/guidelines, then at least let me know by your comments so that I may improve next time. But this shoot-and-scoot downvoting by click-happy folks perplexes me. – shariqkhan Jan 22 '18 at 8:01
0

Having a huge amount of data is a problem only if you need to give back a meaningful response. If you do not have to, you can just save the request and process it with some kind of a cron job.

Is 1000 rows (whatever that means) is a lot of data? that actually depends on what is it that you need to do with it and the abilities of your server. By itself no amount of textual data should be "huge" for modern servers and software (unless you are talking about google and the like).

  • Thanks @Mark Kaplun By 1000 rows, I meant tthat I needed to update 1000 rows of db table, with each row having 4 columns. I was trying to understand whether it is possible around 4000 (1000 x 4) parameters in the request to the WP API. – shariqkhan Feb 4 '18 at 8:52
  • As I said, there should not be a problem with modern servers, but worst case you do it with some kind of cron based processing. If you can not delay the processing (unreasonable, but sometimes it is a must) you just get a better hardware. – Mark Kaplun Feb 4 '18 at 9:02
-1

You may have a look at this. It will give you a better idea about how to implement the batch requests.

  • 1
    Answers should be self contained with external links to non canonical sites only as an additional information :( – Mark Kaplun Feb 2 '18 at 16:56
  • @ManzoorWani Thank you. I will have a look at the link – shariqkhan Feb 4 '18 at 8:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.