REST API - Delay time

Hi there,

i want to use the REST API from OpenClinica. I still worked with that well. But know i want to add them in an thired Application.

May be this is an easy question for some cracks who still work with them. If you send an POST Request for example to get a Casebook of an Subject. OpenClinica needs some time to create them. But after the Post Request is send, the client get an answer from the Server "Depending on the size of your data,
this process may take several minutes.". With this answer stops the POST Request.




Is there any possibilty to set a life time of the POST Request that the client don´t stop with the first response from the server?

Comments

  • toskriptoskrip Posts: 265 ✭✭
    Hi,

    you are right the Casebook response time depends on the size of data that has to be fetched from the database. When you are programming OC client to interact with OC from third party application you can consider some approaches:

    - you can program asynchronous HTTP communication where the client just awaits for response but does not block the application logic so that you can send multiple HTTP requests to OC at the same time. (I would be a bit careful with this because OC can have performance problems when processing too many requests at the same time)

    - if we are talking about GUI application you can program blocking UI... having one thread executing HTTP communication and different thread responsible for GUI so that it does not freeze when waiting for response.

    Tomas
  • yogiyogi Posts: 25
    Hi Tomas,

    this sounds that i have no Chance for example to set an Timer for the REQUEST (Client Side)? I have not much experience with HTTP REQUEST Header Options or something. My hope was that i can set an flag. But yes, if i read your reply i saw this was more a asynchronous HTTP communication.

    My Target at the Moment is, to get a subject casebook from OpenClinica get it on my application and tarnsform this to an PDF.

    Thank you very much for yout reply. It gives me some new Inspiration.

    Best Holger
Sign In or Register to comment.