From: Pieter Wuille <pieter.wuille@gmail.com>
To: "Michael Grønager" <gronager@ceptacle.com>
Cc: Bitcoin Dev <bitcoin-development@lists.sourceforge.net>
Subject: Re: [Bitcoin-development] Announcement: libcoin
Date: Fri, 3 Feb 2012 01:19:02 +0100 [thread overview]
Message-ID: <CAPg+sBg16OPdyi3MQ+sfBR+z_ArP6c8KpU36pDA0MEdXpk9fxQ@mail.gmail.com> (raw)
In-Reply-To: <4CE9708D-0627-480C-B928-3F812544CD90@ceptacle.com>
[-- Attachment #1: Type: text/plain, Size: 1486 bytes --]
> You will also find the RPC server in libcoin blistering fast compared to
the Satoshi client. (It was actually what got me to write libcoin in the
first place...). The Satoshi client HTTP server executes all rpc commands
in its own thread, but to do so, it needs to stop the thread of the Node,
even though the command executed is just a query (i.e. not a SendTo), you
hence have two threads blocking each other and when they wait, you wait...
In libcoin all the query methods access the blockChain as a const object
and they can hence safely query it without intervening the work of the Node
thread. The exception are the SendTo methods that first query if a
transaction can take place, then pushes it to the work-queue of the Node
thread and again exits immediately. The actual execution then follows once
the Node has finished its current tasks (e.g. validating a block).
Hello Michael,
I'm impressed by your refactorings, and hope some of them can make it into
the Satoshi codebase. I am however not sure what you've said above is safe.
In particular, how do you guarantee that no other thread modifies the
blockchain structure while you are performing your query on it? Does the
query code operate on a const copy of the structure, or is there guaranteed
only one thread accessing it?
I've been thinking about moving to read-write locks that allow multiple
threads reading the datastructure simultaneously, but removing the locking
all together sounds wrong to me.
--
Pieter
[-- Attachment #2: Type: text/html, Size: 1552 bytes --]
next prev parent reply other threads:[~2012-02-03 0:19 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-01 14:18 [Bitcoin-development] Announcement: libcoin Michael Grønager
2012-02-01 14:59 ` Gregory Maxwell
2012-02-01 15:50 ` Michael Grønager
2012-02-01 16:06 ` Jorge Timón
2012-02-01 15:02 ` Wladimir
2012-02-01 15:52 ` Michael Grønager
2012-02-01 15:09 ` slush
2012-02-01 15:57 ` Michael Grønager
2012-02-01 23:50 ` grarpamp
2012-02-02 8:32 ` Michael Grønager
2012-02-02 11:34 ` Craig B Agricola
2012-02-03 0:19 ` Pieter Wuille [this message]
2012-02-03 9:52 ` Michael Grønager
2012-02-01 15:26 ` Luke-Jr
2012-02-01 15:58 ` Michael Grønager
2012-02-01 16:15 ` Luke-Jr
2012-02-01 16:21 ` Michael Grønager
2012-02-01 16:23 ` Aidan Thornton
2012-02-01 16:20 ` Michael Grønager
2012-02-01 16:23 ` Luke-Jr
2012-02-01 17:37 ` Luke-Jr
2012-02-01 17:51 ` Michael Grønager
[not found] ` <CAAS2fgSQZ1wv=OXnBnGbKnLTZXbn909umpPBaZDF2g6vy8katA@mail.gmail.com>
2012-02-02 17:12 ` Gregory Maxwell
2012-02-02 17:36 ` Gregory Maxwell
2012-02-02 17:46 ` Gregory Maxwell
2012-02-23 17:31 ` Martinx - ジェームズ
2012-02-23 19:48 ` Michael Grønager
2012-02-23 20:01 ` Michael Grønager
2012-02-23 20:35 ` Michael Grønager
2012-02-23 23:29 ` Martinx - ジェームズ
2012-02-24 2:17 ` Martinx - ジェームズ
2012-02-24 7:44 ` Michael Grønager
2012-02-24 16:17 ` Michael Grønager
2012-02-24 18:49 ` Martinx - ジェームズ
2012-02-24 19:40 ` Michael Grønager
2012-02-24 19:57 ` Michael Grønager
2012-02-25 2:11 ` Martinx - ジェームズ
2012-02-26 17:57 ` Michael Grønager
2012-02-27 19:03 ` Martinx - ジェームズ
2012-02-27 21:03 ` Michael Grønager
2012-02-28 9:03 ` Michael Grønager
[not found] ` <CAJSM8J15LBiT9ojrPDE1-TXqmBLXcVvAmWw0e=5nQfLtMQ42Zg@mail.gmail.com>
[not found] ` <8CEEE576-37DF-4101-9593-73D5FB66D52F@ceptacle.com>
2012-03-22 10:48 ` Martinx - ジェームズ
2012-03-22 11:34 ` Michael Grønager
2012-03-28 7:59 ` Martinx - ジェームズ
2012-03-22 10:50 ` Martinx - ジェームズ
2012-03-22 11:35 ` Michael Grønager
2012-03-22 16:34 ` Peter Vessenes
2012-03-27 9:58 ` Martinx - ジェームズ
[not found] ` <B4616B21-7C05-4793-8452-376EE4122BEC@ceptacle.com>
2012-04-15 4:32 ` Martinx - ジェームズ
2012-07-16 20:14 ` Martinx - ジェームズ
2012-09-12 23:27 ` Martinx - ジェームズ
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=CAPg+sBg16OPdyi3MQ+sfBR+z_ArP6c8KpU36pDA0MEdXpk9fxQ@mail.gmail.com \
--to=pieter.wuille@gmail.com \
--cc=bitcoin-development@lists.sourceforge.net \
--cc=gronager@ceptacle.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