public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@bitpay.com>
To: "Rune Kjær Svendsen" <runesvend@gmail.com>
Cc: bitcoin-development@lists.sourceforge.net
Subject: Re: [Bitcoin-development] Implementing batch processing for -blocknotify
Date: Fri, 31 May 2013 09:05:54 -0400	[thread overview]
Message-ID: <CAJHLa0PQD46KLhGpB0W1F0JXkwD+ChC4EPb9jw1ULJU4zABdJQ@mail.gmail.com> (raw)
In-Reply-To: <CAH2=CKzW41TYbX6c1F8oknA_LttOaA8vmDPmojuowXgEADY61g@mail.gmail.com>

On Fri, May 31, 2013 at 7:56 AM, Rune Kjær Svendsen <runesvend@gmail.com> wrote:
> Hello dear list
>
> I have an application that wants to keep up with new blocks as they come in.
> For that I can use the -blocknotify option with bitcoind, which will execute
> my application for each new block.
>
> The problem is that my app isn't necessarily quick enough to finish its work
> before a new block comes in and the app is executed again. This means the
> that bitcoind might keep executing my application even though the previous
> instance hasn't finished, and that's fairly inefficient resource-wise, as
> many instances of the application will be running simultaneously.
>
> I've discussed this with wumpus on bitcoin-dev, and we figured out a
> solution that might be better. It could replace -blocknotify or we could put
> it in a new function called -batchblocknotify

Similar to other suggestions in this thread,

If your -blocknotify execution is too slow, then create a solution
that simply queues work.  There is no need to add this code to
bitcoind itself.

Another solution is modifying pynode to directly listen to a trusted
node (bitcoind), and monitor blocks as they arrive and are announced.
That does not fix the problem of slow block processing on your side,
but is another way to implement -blocknotify-like behavior.

-- 
Jeff Garzik
Senior Software Engineer and open source evangelist
BitPay, Inc.      https://bitpay.com/



  parent reply	other threads:[~2013-05-31 13:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-31 11:56 [Bitcoin-development] Implementing batch processing for -blocknotify Rune Kjær Svendsen
2013-05-31 12:10 ` Michael Hendricks
2013-05-31 12:37   ` Rune Kjær Svendsen
2013-05-31 19:25     ` Jeff Garzik
2013-05-31 12:54 ` Andy Parkins
2013-05-31 13:05 ` Jeff Garzik [this message]
2013-05-31 22:20 ` Chris Double
2013-05-31 23:29   ` Wladimir
2013-05-31 23:47     ` Chris Double
2013-06-01 13:12       ` Rune Kjær Svendsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJHLa0PQD46KLhGpB0W1F0JXkwD+ChC4EPb9jw1ULJU4zABdJQ@mail.gmail.com \
    --to=jgarzik@bitpay.com \
    --cc=bitcoin-development@lists.sourceforge.net \
    --cc=runesvend@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox