Re: [Ledger] AGENDA - Interledger Call - 23 January - 3pm UTC

"Marc Blanchet" <marc.blanchet@viagenie.ca> Wed, 23 January 2019 13:15 UTC

Return-Path: <marc.blanchet@viagenie.ca>
X-Original-To: ledger@ietfa.amsl.com
Delivered-To: ledger@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 65DB812D84C for <ledger@ietfa.amsl.com>; Wed, 23 Jan 2019 05:15:55 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.043
X-Spam-Level:
X-Spam-Status: No, score=-2.043 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_MED=-0.142, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=viagenie-ca.20150623.gappssmtp.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uZ9tV7mF0P6K for <ledger@ietfa.amsl.com>; Wed, 23 Jan 2019 05:15:52 -0800 (PST)
Received: from mail-qk1-x732.google.com (mail-qk1-x732.google.com [IPv6:2607:f8b0:4864:20::732]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 8FBE21228B7 for <ledger@ietf.org>; Wed, 23 Jan 2019 05:15:52 -0800 (PST)
Received: by mail-qk1-x732.google.com with SMTP id d15so1080696qkj.0 for <ledger@ietf.org>; Wed, 23 Jan 2019 05:15:52 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=viagenie-ca.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=aNCCgMovqrDcMmYV8OVApT74+bbQcXyX/YYDWIdRNvY=; b=tnLmGQ08Q/xzFIRRFAnQX3xR+kJ/6RitgvQiMdUQefQJ57pVTt9eTzBd19+uPYY/16 S7Zq243uJDCHD7s0W8qT0vqSJs53V1xfVGP6EtaDoaz9VyCPChElCLSMKoasBTYxiBi4 jgWPcrrc3vDQr/CNtLOjSaadiT5CnlJ+0WJrj9B0Ddb2zGVcklIjOShifp/acLlhJOR0 IjJN97NEKToL5ccFGmqpa06I4M0m35fTT6Uhqcjt4Ojh+q2ksknp6VYXzSL/f3YnE8Tx juKwxiCkPmPejOn+eTG/30HaGlN7CDY+du0QmvmoZsBfj6c+RyxDuhU90xc2q+hbLoRf cf6g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=aNCCgMovqrDcMmYV8OVApT74+bbQcXyX/YYDWIdRNvY=; b=MfJACyZ2fYUmwkCGqOM5dwbZ2XQ8D+5+Fvg91MKxlK8oEXMNJPEbYYdElsMrvGue3p wvnXMjMZiCFWDt0QZkHgpXeoqoy31FoeNabVcvRkAMpaEFMnKb1FkXGMREYxJN68bKy5 0DCToe4zuhM/rAZ8u7uQ3InBGpR+vGcxkPhptaCUqbfx7UtO+6/nAZzFaQBmYOFQSJbn sjt6zMqCuiYQmn50u/Nf07WFJ+KtfpqZ+Qj32FupGV6QKFf4nVoGM7py/pYTcJq5+ay5 JKdzLlGiAtZhRNLYtjArOedVF1mUyP5ybTormZeG7kWVNypjH0evSbIsbrhPS8ZyhgSm ETqw==
X-Gm-Message-State: AJcUukf2cBUFs4bVZPUcWXLhHNEEbhQZjH7AHlwEaPGr4IduBxMjX0sz +7hr8G2nJy13+4vb9ogXaR08Hg==
X-Google-Smtp-Source: ALg8bN4hDdqfhNLKRZSxjU3a6lOAQRzH5VvoWNChSIbEoF9g/7t7FiohzYPEFe0KBa57Y2UHRdWMzA==
X-Received: by 2002:a37:ec5:: with SMTP id 188mr1764900qko.146.1548249351487; Wed, 23 Jan 2019 05:15:51 -0800 (PST)
Received: from [206.123.31.196] (modemcable040.161-162-184.mc.videotron.ca. [184.162.161.40]) by smtp.gmail.com with ESMTPSA id r5sm56581715qke.33.2019.01.23.05.15.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Jan 2019 05:15:50 -0800 (PST)
From: Marc Blanchet <marc.blanchet@viagenie.ca>
To: Adrian Hope-Bailie <adrian@hopebailie.com>
Cc: Evan Schwartz <evan@ripple.com>, Interledger Community Group <public-interledger@w3.org>, Interledger Mailing List - IETF <ledger@ietf.org>, Hyperledger Quilt Mailing List <hyperledger-quilt@lists.hyperledger.org>
Date: Wed, 23 Jan 2019 08:15:49 -0500
X-Mailer: MailMate (1.12.4r5594)
Message-ID: <81C3A496-0F4A-40C3-B6F0-FC775A54318F@viagenie.ca>
In-Reply-To: <CA+eFz_J1csdDcVzdg-Fmv9=X_UCKd5UOzBED4kPCs8gnTmYF=g@mail.gmail.com>
References: <CA+eFz_KQDLH+msT4xJvNXcO4FXYSCVZ1irksfU4NT5bWp2wVJQ@mail.gmail.com> <1548198536.local-2e8cb3d8-634d-v1.5.5-b7939d38@getmailspring.com> <CA+eFz_J1csdDcVzdg-Fmv9=X_UCKd5UOzBED4kPCs8gnTmYF=g@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/ledger/BduezVvt_9uBSctMbBQEokYL-w0>
Subject: Re: [Ledger] AGENDA - Interledger Call - 23 January - 3pm UTC
X-BeenThere: ledger@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Discussion of interledger, originally a protocol stack for moving digital assets \(making payments\) between accounts operating on different payment networks or ledgers." <ledger.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ledger>, <mailto:ledger-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ledger/>
List-Post: <mailto:ledger@ietf.org>
List-Help: <mailto:ledger-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ledger>, <mailto:ledger-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 23 Jan 2019 13:15:55 -0000


On 23 Jan 2019, at 8:08, Adrian Hope-Bailie wrote:

> Hey Evan,
>
> Thanks for sharing. Some thoughts on your blog post, we can discuss 
> further
> on the call:
>
> Many of the issues you highlight with BTP are not issues with 
> WebSockets
> themselves but more with how we have used it. E.g. We should be 
> hosting
> WebSocket servers that listen on a single port and path and then use a
> proper auth during the handshake. If you do that, the subsequent 
> messages
> sent over the underlying TCP connection are very light on framing and
> meta-data.
>
> From my research WebSockets are one of the most efficient and well
> standardised framing protocols available over a raw TCP socket. Binary
> WebSocket frames have very little overhead and all of the session 
> context
> is dealt with up front in the handshake. If you compare this to HTTP 
> (and
> HTTP2) you have a lot of overhead in the headers (i.e. sent with every
> message).
>
> Request/reply matching is a key feature requirement of bilateral 
> protocols
> in ILP but I think we've overblown the complexity required in
> implementations when you consider that an ILP request/reply pair 
> should be
> very short lived and that by simply using TCP you already have many of 
> the
> delivery guarantees you need.
>
> HTTP is only capable of request/reply matching because it only allows 
> a
> request to be sent after a previous reply has been received on the 
> same
> connection. i.e. You can only send requests serially. Any ILP 
> connections
> using HTTP 1 or 1.1 will be very inefficient unless they open multiple
> connections.
>
> HTTP/2 gets over this by mutiplexing the connection through streams. 
> But
> under the hood this is just another framing protocol (like WebSockets) 
> and
> giving those frames a stream id. Users of the HTTP/2 connection then 
> still
> need to explicitly create new streams for each request/reply pair if 
> they
> want to avoid head-of-line blocking. It's likely that the way this is
> implemented in clients is likely to be highly optimised given the
> popularity of HTTP/2, but given that streams have a complex state 
> machine
> that the client must manage it seems unlikely that it can be optimised
> further than a simple request/reply protocol using a correlation id. 
> (i.e.
> simply adding a correlation id to the header of a packet and sending 
> in a
> binary WebSocket frame is definitely more efficient in theory but in
> practice will come down to implementations).


however, http is the « substrate » for everything on Internet 
nowadays and therefore one benefits of all services available through 
cloud providers that are added every day. Therefore, by using http and 
that offering, you can really scale up much more easily.

my 2 cents,

Marc.

>
> The one aspect of WebSockets that may be hurting performance is the 
> masking
> which means that payloads need to be pre-processed before being sent. 
> That
> said, it's a very efficient algorithm so we'd need to test it to be 
> sure
> it's an issue.
>
> A concern I have with the cluster of stateless connectors is the 
> latency
> you'll introduce if the connector must do a balance check against a DB 
> for
> each packet. This can be optimised to a point but in reality the most
> efficient way to do this will be to ensure the stickiness at the load
> balancer routes packets from the same peer to the same connector. Not 
> sure
> this will be useful in a scenario where both peers are routing high 
> volumes
> of packets (e.g. Coil and Strata).
>
> That said, I think decoupling the messaging from the clearing and
> settlement (FYI: forwarding ILP packets isn't clearing, clearing 
> involves
> reconciliation and netting, but that's a different issue) will be a 
> huge
> improvement to the architecture. As I've mentioned before, this is the
> common pattern in most payments. We've been discussing how we could
> implement this in the reference connector and hope to do some 
> experiments
> in this regard when we are back from the Mojaloop convening next week.
>
> Lastly, I don't think hosting an HTTP server should be treated as a 
> light
> requirement. I'd still like to be able to accept payment on a 
> connection
> that I establish to my ILSP (i.e. I am the client) and have some
> third-party host my SPSP server. Assuming that the ILP receiver and 
> SPSP
> server are the same thing is a mistake in my opinion and imposes
> unnecessary limitations on the architecture.
>
> Question: Why not transmit the ILP packets with the packet headers as 
> HTTP
> headers and the data payload as the body? In place byte replacement 
> for
> packet forwarding is not going to help much if you are framing and
> de-framing the packets off the wire anyway.
>
> All in, there are some great ideas in the blog but I don't think they 
> all
> depend on changing the bilateral protocol (although I do still want to
> propose some better options than BTP).
>
> I'm keen to get agreement on a basic JS interface that is agnostic to 
> the
> underlying wire protocol and then we can ship HTTP, WebSocket and any 
> other
> implementation (I'll try and implement your HTTP protocol in JS as 
> soon as
> it's stable).
>
> Adrian
>
>
>
>
> On Wed, 23 Jan 2019 at 01:11, Evan Schwartz <evan@ripple.com> wrote:
>
>> I just wrote up this blog post describing my proposal for making
>> connectors stateless and switching bilateral communication to HTTP: 
>> Thoughts
>> on Scaling Interledger Connectors
>> <https://medium.com/@emschwartz/thoughts-on-scaling-interledger-connectors-7e3cad0dab7f>
>> :
>> <https://medium.com/@emschwartz/thoughts-on-scaling-interledger-connectors-7e3cad0dab7f>
>> How I Learned to Stop Worrying and Love HTTP
>> <https://medium.com/@emschwartz/thoughts-on-scaling-interledger-connectors-7e3cad0dab7f>
>>
>> Looking forward to hearing your thoughts and discussing on tomorrow's 
>> call!
>> Evan
>>
>> On Jan 22 2019, at 2:17 pm, Adrian Hope-Bailie 
>> <adrian@hopebailie.com>
>> wrote:
>>
>> Hi all,
>>
>> Evan has been working on a new HTTP-based bilateral protocol which 
>> he'll
>> be chatting about on the call tomorrow. Look out for a follow up mail 
>> from
>> him with some details.
>>
>> As usual, if you have any other topics to bring to the call please 
>> do!
>>
>> Join from PC, Mac, Linux, iOS or Android: https://zoom.us/s/377506344
>> <http://email.zoom.us/track/click/30854053/zoom.us?p=eyJzIjoiM0w2aVdDeVIxQS1QMWFUY2dOWDNqRF9FXzg4IiwidiI6MSwicCI6IntcInVcIjozMDg1NDA1MyxcInZcIjoxLFwidXJsXCI6XCJodHRwczpcXFwvXFxcL3pvb20udXNcXFwvc1xcXC8zNzc1MDYzNDRcIixcImlkXCI6XCI1NzY5ZmNlY2IyMTA0YjJlOGY5NTdjZDNkMzU3MDQxMlwiLFwidXJsX2lkc1wiOltcImY3NTEyMWVkZGI2NDQ2YjA4YzI1ODAxNjdiMWQ5ODlhM2MyY2FmMTZcIl19In0>
>>
>> Or iPhone one-tap:
>>     US: +14086380968,,377506344# or +16468769923,,377506344#
>>
>> Or Telephone:
>>     Dial(for higher quality, dial a number based on your current
>> location):
>>     US: +1 408 638 0968 <+1%20408%20638%200968> or +1 646 876 9923
>> <+1%20646%20876%209923> or +1 669 900 6833 <+1%20669%20900%206833>
>>     Meeting ID: 377 506 344
>>     International numbers available: https://zoom.us/u/cbrUAzE3W
>> <http://email.zoom.us/track/click/30854053/zoom.us?p=eyJzIjoiTkhxZ1pWcWZEbDlWZy1VaTBYTnFqX2RwcUs0IiwidiI6MSwicCI6IntcInVcIjozMDg1NDA1MyxcInZcIjoxLFwidXJsXCI6XCJodHRwczpcXFwvXFxcL3pvb20udXNcXFwvdVxcXC9jYnJVQXpFM1dcIixcImlkXCI6XCI1NzY5ZmNlY2IyMTA0YjJlOGY5NTdjZDNkMzU3MDQxMlwiLFwidXJsX2lkc1wiOltcImY3NTEyMWVkZGI2NDQ2YjA4YzI1ODAxNjdiMWQ5ODlhM2MyY2FmMTZcIl19In0>
>>
>> _______________________________________________
>> Ledger mailing list
>> Ledger@ietf.org
>> https://www.ietf.org/mailman/listinfo/ledger
>>
>>