Bitcoin Forum
December 09, 2016, 04:17:29 AM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: JSON Pull Interval Time  (Read 926 times)
fascistmuffin
Jr. Member
*
Offline Offline

Activity: 56



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?
1481257049
Hero Member
*
Offline Offline

Posts: 1481257049

View Profile Personal Message (Offline)

Ignore
1481257049
Reply with quote  #2

1481257049
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1481257049
Hero Member
*
Offline Offline

Posts: 1481257049

View Profile Personal Message (Offline)

Ignore
1481257049
Reply with quote  #2

1481257049
Report to moderator
1481257049
Hero Member
*
Offline Offline

Posts: 1481257049

View Profile Personal Message (Offline)

Ignore
1481257049
Reply with quote  #2

1481257049
Report to moderator
1481257049
Hero Member
*
Offline Offline

Posts: 1481257049

View Profile Personal Message (Offline)

Ignore
1481257049
Reply with quote  #2

1481257049
Report to moderator
weex
Legendary
*
Offline Offline

Activity: 1062


Give me your tired, your poor, your huddled...


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
Jr. Member
*
Offline Offline

Activity: 56



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: 6



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

1J3fCL37zs3YhgSrE36XwWuWdCpA5uuaE6
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!