Bitcoin Forum
May 06, 2024, 10:46:34 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: JSON Pull Interval Time  (Read 1129 times)
fascistmuffin (OP)
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?
1714992394
Hero Member
*
Offline Offline

Posts: 1714992394

View Profile Personal Message (Offline)

Ignore
1714992394
Reply with quote  #2

1714992394
Report to moderator
1714992394
Hero Member
*
Offline Offline

Posts: 1714992394

View Profile Personal Message (Offline)

Ignore
1714992394
Reply with quote  #2

1714992394
Report to moderator
1714992394
Hero Member
*
Offline Offline

Posts: 1714992394

View Profile Personal Message (Offline)

Ignore
1714992394
Reply with quote  #2

1714992394
Report to moderator
There are several different types of Bitcoin clients. The most secure are full nodes like Bitcoin Core, which will follow the rules of the network no matter what miners do. Even if every miner decided to create 1000 bitcoins per block, full nodes would stick to the rules and reject those blocks.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714992394
Hero Member
*
Offline Offline

Posts: 1714992394

View Profile Personal Message (Offline)

Ignore
1714992394
Reply with quote  #2

1714992394
Report to moderator
weex
Legendary
*
Offline Offline

Activity: 1102
Merit: 1014



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 (OP)
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!