Luke-Jr [ARCHIVE] on Nostr: 📅 Original date posted:2012-03-03 📝 Original message:On Saturday, March 03, ...
📅 Original date posted:2012-03-03
📝 Original message:On Saturday, March 03, 2012 9:23:08 AM Stefan Thomas wrote:
> From what I understand the BIP uses a polling model, e.g. a miner would
> use getmemorypool to request new work from a pool in intervals. Would it
> make sense to specify a version of the API supporting long polling?
You mean explicitly mention the getwork longpoll protocol as part of the
getmemorypool BIP? Probably a good idea.
> For BitcoinJS specifically, since we also support JSON-RPC over TCP, I'd
> even be interested in a genuine "push" API. Something like C->S
> "listenmemorypool", S->C "updatememorypool" (continually).
HTTP and JSON-RPC are a client-server model; there is no way for the server to
make calls to the client. It's not practical to expect clients to run their
own JSON-RPC server - many cannot listen on WAN ports at all.
📝 Original message:On Saturday, March 03, 2012 9:23:08 AM Stefan Thomas wrote:
> From what I understand the BIP uses a polling model, e.g. a miner would
> use getmemorypool to request new work from a pool in intervals. Would it
> make sense to specify a version of the API supporting long polling?
You mean explicitly mention the getwork longpoll protocol as part of the
getmemorypool BIP? Probably a good idea.
> For BitcoinJS specifically, since we also support JSON-RPC over TCP, I'd
> even be interested in a genuine "push" API. Something like C->S
> "listenmemorypool", S->C "updatememorypool" (continually).
HTTP and JSON-RPC are a client-server model; there is no way for the server to
make calls to the client. It's not practical to expect clients to run their
own JSON-RPC server - many cannot listen on WAN ports at all.