public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: Jonas Schnelli <dev@jonasschnelli•ch>
To: Luke Dashjr <luke@dashjr•org>,
	Bitcoin Protocol Discussion
	<bitcoin-dev@lists•linuxfoundation.org>
Subject: Re: [bitcoin-dev] Currency/exchange rate information API
Date: Mon, 6 Mar 2017 09:14:23 +0100	[thread overview]
Message-ID: <A9659D64-96A3-45B4-90FA-15F35BAE9676@jonasschnelli.ch> (raw)
In-Reply-To: <201703060709.40311.luke@dashjr.org>

[-- Attachment #1: Type: text/plain, Size: 2481 bytes --]


I like the BIP. It can reduce workload during implementation on both sides of the API and it allows to show the user more data without implementing tons of proprietary APIs.
It’s not directly Bitcoin specific (example: BIP32 is also not Bitcoin specific), but I think a BIP is the right way for this.


> 
>> Apart from that, my feeling is that it could be simplified. Is
>> longpolling useful?
> 
> I would think so, at least for Bitcoin since rates can change significantly in
> a short period of time (or can they anymore? I haven't really watched lately.)

Long polling is a simple push concept that works on most type of network configurations (NAT, proxy, etc.).
The only concern I see here is that an public API will quickly fill up the maximum allowed httpd connections.
But it’s solvable.

> 
>> And is the historical rate thing really necessary for typical applications?
> 
> When displaying historical transactions, it doesn't really make sense to use
> the current market rate, but rather the market rate at the time the payment
> was made. While wallets might simply cache it with the transaction, it would
> be perhaps nicer if it could be automatically restored for seed-only
> recoveries. In any case, if a service/wallet doesn't want to provide/use
> historical information, it can simply not implement that part.

I’m also not sure how useful historical datapoint are. I don’t think the use case where someone wants to restore from a seed and get all exchange rates during the time of the payment is something users are looking for.
However, It’s optional.

> 
>> If yes, the client should be allowed to decide on which time scale the
>> data should be. (tick, min, hour, day, ...) That goes together with
>> clearly defining the type field (something like low, high, open, close,
>> but without flexibility). Think of a candle-stick chart basically.
> 
> How is the current draft insufficient for this?
> 
>> Also, pushing may be more appropriate for "current" rates than polling.
>> Then no polling interval is necessary. On the other hand, this adds
>> complexity in other places, e.g., state.
> 
> Pushing is what longpolling does.

Agree with Luke. A „real“ push (though I’d say long-polling is the real push, AFAIK it’s also the technique behind Apple’s iOS push channel) would require a complex server setup that complicates many things like load-balancer, mem-caching, etc.


</jonas>


[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2017-03-06  8:14 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-04  8:27 Luke Dashjr
2017-03-04 15:18 ` アルム カールヨハン
2017-03-06  5:37 ` Tim Ruffing
2017-03-06  7:09   ` Luke Dashjr
2017-03-06  8:14     ` Jonas Schnelli [this message]
2017-03-06 21:54     ` Tim Ruffing
2017-03-06 22:02       ` Tim Ruffing
2017-03-06 22:21         ` Luke Dashjr
2017-03-06 22:14       ` Luke Dashjr
2017-03-06 22:30         ` Tim Ruffing
2017-03-06 22:38           ` Tim Ruffing
2017-03-06 23:14   ` Andreas Schildbach
2017-03-07  9:29 ` Marcel Jamin
2017-03-13 18:10   ` Andrew LeCody

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=A9659D64-96A3-45B4-90FA-15F35BAE9676@jonasschnelli.ch \
    --to=dev@jonasschnelli$(echo .)ch \
    --cc=bitcoin-dev@lists$(echo .)linuxfoundation.org \
    --cc=luke@dashjr$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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