What is the default timeout on the client?

Questions about the WURFL Cloud service.
cchiu
Posts: 4
Joined: Tue Oct 23, 2012 5:16 pm

What is the default timeout on the client?

Postby cchiu » Tue Jan 29, 2013 12:47 pm

Hello,

I was wondering what the default timeout is when we make a request to retrieve device information. Is this something I should be wrapping around with my own code or is there a way to set the timeout?

Thanks,
Clement

kamermans
Posts: 393
Joined: Mon Jun 06, 2011 9:50 am

Re: What is the default timeout on the client?

Postby kamermans » Tue Jan 29, 2013 2:14 pm

Hi Clement,

I believe the default timeout is 1 second, but in some languages, like PHP using fsock, it is difficult to fully control the timeout. Which language are you using?
Thanks,

Steve Kamerman
ScientiaMobile

Make sure you check out our WURFL Cloud, WURFL InSight and WURFL InFuze products!

kamermans
Posts: 393
Joined: Mon Jun 06, 2011 9:50 am

Re: What is the default timeout on the client?

Postby kamermans » Tue Jan 29, 2013 2:16 pm

Also, note that our load balancers are very picky about timing and they will give you a "HTTP/1.0 408 Request Time-out" if the request is not completed in 1 second, so the connection should not be left open unless there is something seriously wrong on your side.
Thanks,

Steve Kamerman
ScientiaMobile

Make sure you check out our WURFL Cloud, WURFL InSight and WURFL InFuze products!

cchiu
Posts: 4
Joined: Tue Oct 23, 2012 5:16 pm

Re: What is the default timeout on the client?

Postby cchiu » Tue Jan 29, 2013 2:42 pm

Hello,

I am using the Java client.
I just had wanted to make sure that in the unlikely event that the service is unreachable that I will not be spinning my wheels.
Thanks for the prompt reply.

Clement

stefan66
Posts: 5
Joined: Fri May 11, 2012 10:42 am

Re: What is the default timeout on the client?

Postby stefan66 » Thu Jun 20, 2013 7:01 am

Hi,

coming back on this issue, I could not find back in the documentation what happens when the services is unavailable. We call the service using Java:

Code: Select all

AbstractDevice device = manager.getDeviceFromRequest(request, response, CAPS);
In case the service is not available is an error thrown so I can catch it or does the device instance contains the errors I can get with using the getErrors() method ?

If so what are the possible key/value pairs in the map ?


Regards,

S.

fulvio.crivellaro
Posts: 38
Joined: Tue Jan 31, 2012 10:27 am

Re: What is the default timeout on the client?

Postby fulvio.crivellaro » Mon Jun 24, 2013 3:55 am

Hello Clement,
in case of service unreachable, a com.scientiamobile.wurflcloud.exc.UnreachableServerException is thrown.
It is a RuntimeException, hence you are not forced to catch it.

The way it is supposed to be handled is:

Code: Select all

try {
    AbstractDevice device = manager.getDeviceFromRequest(request, response, CAPS);
} catch (UnreachableServerException) {
    // handle the exception
}
For what concerns the socket timeout, it depends on the JVM and/or the application server you are running, since the cloud client resides on environment default values.

Hope this fully answers your questions.

Regards,
Fulvio


Who is online

Users browsing this forum: No registered users and 60 guests