Bitcoin Forum
August 16, 2022, 09:32:39 AM *
News: Latest Bitcoin Core release: 23.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: JSON Pull Interval Time  (Read 1117 times)
fascistmuffin
Newbie
*
Offline Offline

Activity: 56
Merit: 0



View Profile
June 19, 2011, 07:10:15 AM
 #1

Any input on what the ideal time in between JSON pulls from sites should be? Right now I have mine app running at 60,000 milliseconds, which seems reasonable, but I'm not too sure if this interval is too taxing on the web service. Any good practices to consider while hitting a JSON web service frequently?
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1660642359
Hero Member
*
Offline Offline

Posts: 1660642359

View Profile Personal Message (Offline)

Ignore
1660642359
Reply with quote  #2

1660642359
Report to moderator
1660642359
Hero Member
*
Offline Offline

Posts: 1660642359

View Profile Personal Message (Offline)

Ignore
1660642359
Reply with quote  #2

1660642359
Report to moderator
1660642359
Hero Member
*
Offline Offline

Posts: 1660642359

View Profile Personal Message (Offline)

Ignore
1660642359
Reply with quote  #2

1660642359
Report to moderator
weex
Legendary
*
Offline Offline

Activity: 1104
Merit: 1000



View Profile
June 19, 2011, 07:24:29 AM
 #2

What kind of application are we talking about here?

Short of knowing that, it's best to pull only as often as you need so that you won't miss data or be too slow to be useful.

When in doubt try to contact the site and mention what you're trying to do. They may be able to provide data optimized to your need and in a more efficient way for them to deliver.

Having run web services I can say it's also nice to be able to contact whomever is doing the polling so adding some form of contact info in your Useragent string is a nice courtesy. This is all kind of common sense stuff but saves everyone a lot of time and energy.
fascistmuffin
Newbie
*
Offline Offline

Activity: 56
Merit: 0



View Profile
June 19, 2011, 07:35:24 AM
 #3

Right now my app is a .Net forum pulling stats from mtgox.

I'm pull the data from their API page http://mtgox.com/code/data/ticker.php here. Not too sure about the useragent string thing. Sorry, I'm a noob at web based development  Undecided.
ahihi
Newbie
*
Offline Offline

Activity: 7
Merit: 0



View Profile
June 19, 2011, 08:25:19 AM
 #4

Since you're pulling from Mt. Gox, you may want to consider using their WebSocket API instead of doing periodical requests. That way, they push the data to you in (more or less) real time! Smiley
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!