Re: [dtn] [EXT] RE: DTN scheme demux syntax

"Sipos, Brian J." <Brian.Sipos@jhuapl.edu> Tue, 13 December 2022 16:08 UTC

Return-Path: <Brian.Sipos@jhuapl.edu>
X-Original-To: dtn@ietfa.amsl.com
Delivered-To: dtn@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 2FE9AC14CF1D for <dtn@ietfa.amsl.com>; Tue, 13 Dec 2022 08:08:57 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.095
X-Spam-Level:
X-Spam-Status: No, score=-7.095 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=jhuapl.edu
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XzOImOneQKqA for <dtn@ietfa.amsl.com>; Tue, 13 Dec 2022 08:08:52 -0800 (PST)
Received: from aplegw02.jhuapl.edu (aplegw02.jhuapl.edu [128.244.251.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 13D39C14F75F for <dtn@ietf.org>; Tue, 13 Dec 2022 08:08:51 -0800 (PST)
Received: from pps.filterd (aplegw02.jhuapl.edu [127.0.0.1]) by aplegw02.jhuapl.edu (8.17.1.19/8.17.1.19) with ESMTP id 2BDDSSng030909; Tue, 13 Dec 2022 11:08:49 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jhuapl.edu; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : mime-version; s=JHUAPLDec2018; bh=fTaPbLbYiRYGhJzYfmbfUHMa6YMX0x1lMRnhW5jMkmo=; b=gKE10ttgCXVfCE+L3yzKgepU7phTzgC9/C2W4vy9Ca1c5e4ih9jh+6wr6Cc5p/ikW1qJ s3IR5L6TC6pKloO4xgbCkj/0DgXn5UqLm5j+Z2WRC3kIyYCE2M/r7jEjwXIr/pMgniWc pOOPOWIpkIcCwq7ZmD7G8S8XxpsGQyH7oybO5UgQFf39iWrVRR/m8G4rvfCb4/CToTaw l2dTRqadeALaf7F2+xg6y2Hg/px+ILDw7V8mNeHwIyLtS7d1GpUA1yPY3fKAaFDYz4JL kTEV41vOaJHPX+Ll19MRjjKDwZWSRecn1BHF/MaqfCeBLjZGialpH/8Ub+qaADKdfgZV 8g==
Received: from aplex28.dom1.jhuapl.edu (aplex28.dom1.jhuapl.edu [10.114.162.13]) by aplegw02.jhuapl.edu (PPS) with ESMTPS id 3mcq7439t0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 13 Dec 2022 11:08:49 -0500
Received: from APLEX21.dom1.jhuapl.edu (10.114.162.6) by APLEX28.dom1.jhuapl.edu (10.114.162.13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.20; Tue, 13 Dec 2022 11:08:48 -0500
Received: from APLEX21.dom1.jhuapl.edu ([fe80::6032:607c:9f2a:6daa]) by APLEX21.dom1.jhuapl.edu ([fe80::6032:607c:9f2a:6daa%5]) with mapi id 15.02.1118.020; Tue, 13 Dec 2022 11:08:48 -0500
From: "Sipos, Brian J." <Brian.Sipos@jhuapl.edu>
To: Loiseau lucien <loiseau.lucien@gmail.com>
CC: Carlo Caini <carlo.caini@unibo.it>, "dtn@ietf.org" <dtn@ietf.org>
Thread-Topic: [dtn] [EXT] RE: DTN scheme demux syntax
Thread-Index: AdkL3EUSDlqAqczPQmKgh0SlEXi8MQAQJh8AAIih29AAE+QdgAAAhmiAAAnonpD//+TXAP//X8BQ
Date: Tue, 13 Dec 2022 16:08:48 +0000
Message-ID: <2e92f1108b6040ea87abe8ef40b37a58@jhuapl.edu>
References: <d08cbf2bea18476289c261d5455186d6@jhuapl.edu> <013a01d90bf2$f5ddb840$e19928c0$@gmail.com> <84df50e2f550401ab29f5893c683da11@jhuapl.edu> <CA++2eb28qbFs7w40vqwBWQKGSYp6XDHXgbobc4jKKrLvTKM9Nw@mail.gmail.com> <CANoKrvbx8-7H2fS2=aB=+q08xDYk0nsGtvbB4zzFHjeuDDBGgA@mail.gmail.com> <6a3aa211208b4474915282b7b2ed28c3@jhuapl.edu> <CANoKrvZacJY=Gc_ti+7grXyWb-x+6LiCnc4jPkNwu4+iAZaptg@mail.gmail.com>
In-Reply-To: <CANoKrvZacJY=Gc_ti+7grXyWb-x+6LiCnc4jPkNwu4+iAZaptg@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: yes
X-MS-TNEF-Correlator:
x-originating-ip: [10.114.162.27]
Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg="SHA1"; boundary="----=_NextPart_000_01FC_01D90EE3.4384C500"
MIME-Version: 1.0
X-CrossPremisesHeadersFilteredBySendConnector: APLEX28.dom1.jhuapl.edu
X-OrganizationHeadersPreserved: APLEX28.dom1.jhuapl.edu
X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-12-13_03,2022-12-13_01,2022-06-22_01
Archived-At: <https://mailarchive.ietf.org/arch/msg/dtn/Nf8lcVux3kPrc--xDpdZfnn1QPM>
Subject: Re: [dtn] [EXT] RE: DTN scheme demux syntax
X-BeenThere: dtn@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: "Delay Tolerant Networking \(DTN\) discussion list at the IETF." <dtn.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/dtn>, <mailto:dtn-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/dtn/>
List-Post: <mailto:dtn@ietf.org>
List-Help: <mailto:dtn-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/dtn>, <mailto:dtn-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 13 Dec 2022 16:08:57 -0000

Lucien,

Thanks again for all of these helpful details. I do agree that HTTP is under-appreciated as a stateless and timing-independent transport (timeouts are an application decision, not a protocol one).

Do you see a use for both query part (which has been more related to referenced object identity) and fragment part (which has been more related to the object content), or just the query part? And do you see any distinction between use of query part in bundle Source vs. Destination?

 

Keeping with the same conceptual use in HTTP and other protocols, I can see a use for pattern matching based on service path segments but not on query or fragment parts. Meaning a routing or endpoint configuration would match on the node-name and demux path but nothing further; though a receiving service would be able to see the full Destination EID, dissect the query, and potentially have conditional logic based on its content. The issue with pattern matching on query part is that there is no standard definition for normalizing the query (each scheme must define the syntax of the query part).

 

Also in keeping with the conceptual use of the fragment part, it’s possible to be present in the general URL but it is stripped off of what actually gets encoded on-the-wire. So while a general URI could have a fragment part, the EID that goes in the primary block or elsewhere would not have a fragment part (just like a browser strips off the fragment part when sending an HTTP request [1]).

 

The way this could be phrased in the ABNF definition would be as:

dtn-hier-part = "//" node-name name-delim demux [ "?" query ]

node-name = reg-name

demux = path-rootless / path-empty

 

which makes it more clear that the service demux *is* the path and not the suffix query part, which is just part of the EID.

 

The reason why I’m pushing for clarity here is that the URL/URI is something that browsers and HTTP had struggled with for a long time to get to the current state of protocol [1] and BCPs [2], and we can learn from their hard-won lessons rather than re-discover these kinds of edge situations after deployments are made.

 

[1] https://www.rfc-editor.org/rfc/rfc9110#section-4.2.5

[2] https://www.rfc-editor.org/rfc/rfc8820#section-2

 

From: Loiseau lucien <loiseau.lucien@gmail.com> 
Sent: Monday, December 12, 2022 6:27 PM
To: Sipos, Brian J. <Brian.Sipos@jhuapl.edu>
Cc: Carlo Caini <carlo.caini@unibo.it>; dtn@ietf.org
Subject: Re: [dtn] [EXT] RE: DTN scheme demux syntax

 


APL external email warning: Verify sender loiseau.lucien@gmail.com <mailto:loiseau.lucien@gmail.com>  before clicking links or attachments

 

Hi Brian,

 

It is my intuition that the bpv7 protocol could be very valuable as an "overlay" of HTTP to transparently deal with intermittent connectivity as it is often the case with mobile development. At least it is how we are using it.

Indeed, our mobile app logic depends on some services from our backend. Typically those services would be served over HTTP apis. However in our case we expose those service over BP EID. As such, from the mobile side instead of doing an HTTP query to the targeted URL endpoint to query the http service, we instead send a Bundle to an endpoint whose URI is almost exactly a 1:1 mapping of the targeted URL, the only difference being the scheme part. For instance https://ourdomain/service/v1/cmd would become dtn://ourdomain/service/v1/cmd. On the backend side, we would have a microservice that awaits for incoming bundle over such EID. 

 

We do still rely on HTTP but only as a convergence layer to relay pending bundles on either side. As such, we expose a URL https://dtn.ourdomain/gateway  whose only purpose is to receive and send pending bundle within a single HTTP query. (we have design our own CLA for that purpose but it is extremely simple, basically the body of the query is used to serialize bundles flowing from mobile to backend, and the body of the http response is used to serialize bundles from the backend to the mobile device). Effectively, we are tunnelling DTN over HTTP.

 

We actually like this approach a lot for multiple reasons:

- from an architecture point of view it is extremely similar to HTTP and so easy to port the code of various endpoints and handlers from being an HTTP service to be a DTN service

- it allows the mobile side to also work as a "server" also. Indeed, without DTN, the backend wouldn't be able to easily "query" the mobile for some service. This is because a connection is always initiated by he mobile for various reason (mobile is not always within cellular range, wireless interface may be off, application may not be in foreground, mobile OS kill background services). However each successful http query relaying bundle on both side, and since the address space is flat and there is no "NAT", we can simply send a Bundle from the backend side to an EID belonging to the mobile and it will get routed through. The software on the mobile side is periodically polling HTTP to make sure that bundles are flowing.

- it is actually cleaner because mobile development is de-facto asynchronous driven and DTN fits this model better than HTTP. We don't need to retry failed API request nor deal with retransmission and such, this is all taken care of by the BP.

 

As such, I believe there is great value in having bundle protocol EID naturally mapping to HTTP URL as it makes 1:1 relationship trivial and enables a great use case for DTN. This is how we are currently leveraging this protocol.

 

Kind Regards,

Lucien

 

On Mon, Dec 12, 2022 at 11:42 PM Sipos, Brian J. <Brian.Sipos@jhuapl.edu <mailto:Brian.Sipos@jhuapl.edu> > wrote:

Carlo and Lucien,

Thank you for the feedback! I was searching for whether this was a theoretical or practical use and your experiences are very valuable. I still think that the query and fragment portions of the URI are overly complicated and unnecessary from the perspective of naming and pattern matching. Especially since path segments can themselves have parameters, if such a thing is needed.

 

From: Loiseau lucien < <mailto:loiseau.lucien@gmail.com> loiseau.lucien@gmail.com> 
Sent: Monday, December 12, 2022 3:20 PM
To: Scott Burleigh < <mailto:sburleig.sb@gmail.com> sburleig.sb@gmail.com>
Cc: Sipos, Brian J. < <mailto:Brian.Sipos@jhuapl.edu> Brian.Sipos@jhuapl.edu>;  <mailto:dtn@ietf.org> dtn@ietf.org
Subject: Re: [dtn] [EXT] RE: DTN scheme demux syntax

 


APL external email warning: Verify sender loiseau.lucien@gmail.com <mailto:loiseau.lucien@gmail.com>  before clicking links or attachments

 

Hi Brian,

 

In our modest use of BP, our EID structure is quite similar to that of how one would structure a restful api in HTTP. We have an application agent named "MuxAgent" that lets the application logic registers EID paths with associated handlers such as:


MuxAgent(base-eid = "dtn://mynodeid/")
   .handle("/service/v1/cmd1",  cmd1)
   .handle("/service/v1/cmd2",  cmd2)
   .handle("/service/v1/cmd3",  cmd3)

For each call to handle, the MuxAgent registers the Bundle Node as a member of the EID made of the base-eid and the path ("dtn://mynodeid/service/v1/cmd1", "dtn://mynodeid/service/v1/cmd2", etc.)
The MuxAgent then route received ADU to the appropriate handler. 


Lucien

 

 

On Mon, Dec 12, 2022 at 9:05 PM Scott Burleigh <sburleig.sb@gmail.com <mailto:sburleig.sb@gmail.com> > wrote:

Brian, thanks, an interesting idea.  My inclination would be to say that this sort of mechanism would be fine for the "dtn" URI scheme, but I wouldn't want to extend the "ipn" scheme in this sort of way: the whole point of that scheme is to enable predictably terse bundle blocks, to support communication over constrained links, and this sort of extensibility would defeat that purpose.

 

What I *do* think could make sense would be a machine-readable catalogue of service numbers that could associate arbitrarily lengthy and informative strings with service numbers.  I think that indirection might enable the sort of behavior you're thinking about.

 

Scott

 

On Mon, Dec 12, 2022 at 8:56 AM Sipos, Brian J. <Brian.Sipos@jhuapl.edu <mailto:Brian.Sipos@jhuapl.edu> > wrote:

Scott,

Is there any precedence for having multi-segment service names (like “some/long/path”) in ION or otherwise?

I am wondering if there is some benefit for allowing multi-segment names or if it is more simple, and more in alignment with non-hierarchical IPN service naming, for a service to have a single-segment name?

 

My original reason for looking into this is for EID pattern matching, where multi-segment patterns get significantly more complex than single-segment. Is there any implied expectation that an endpoint would be able to register a subtree of service names, like an endpoint that handles “some/*” to be able to receive for “some/thing” and “some/other” etc.? Even this seems excessive without a specific use case.

 

Thanks for your thoughts,

Brian S.

 

From: sburleig.sb@gmail.com <mailto:sburleig.sb@gmail.com>  <sburleig.sb@gmail.com <mailto:sburleig.sb@gmail.com> > 
Sent: Friday, December 9, 2022 12:24 PM
To: Sipos, Brian J. <Brian.Sipos@jhuapl.edu <mailto:Brian.Sipos@jhuapl.edu> >; dtn@ietf.org <mailto:dtn@ietf.org> 
Subject: [EXT] RE: DTN scheme demux syntax

 


APL external email warning: Verify sender sburleig.sb@gmail.com <mailto:sburleig.sb@gmail.com>  before clicking links or attachments

 

Brian, good point; this certainly looks like a candidate for an erratum.  Aligning with path-rootless makes more sense to me, just because – as you say – it would be unwieldy for a node to have to register in every endpoint formed in this scheme, including every query.

 

Scott

 

From: Sipos, Brian J. <Brian.Sipos@jhuapl.edu <mailto:Brian.Sipos@jhuapl.edu> > 
Sent: Friday, December 9, 2022 8:09 AM
To: dtn@ietf.org <mailto:dtn@ietf.org> 
Cc: sburleig.sb@gmail.com <mailto:sburleig.sb@gmail.com> 
Subject: DTN scheme demux syntax

 

All,

While investigating a method of pattern matching for EIDs I ran into what may be a slight oversight in the DTN scheme definition. Currently the service portion of the URI [1] is defined as “demux = *VCHAR” which is any visible ASCII character. This is slightly different than the generic URI syntax with path-segment definition [2] as “segment = *pchar” which allows only unreserved (or percent encoded) characters, or even the “path-rootless” definition that would exclude query and fragment parts. The difference is in whether the DTN scheme demux allows an entire structured path (with potentially a query and fragment as well) or whether it is restricted to just one path segment.

 

Certainly the DTN scheme allows EIDs that look like:

dtn://node-name/service

dtn://other.node/tunnel

dtn://other.node/srv;with=parameter

 

But these are also currently allowed:

dtn://node-name/some/long/path

dtn://other.node/service?with=query#and-fragment

 

There’s no mention on how a BPA or an endpoint is supposed to actually deal with these kind of EIDs, meaning each query and each fragment ID would need to be registered as a different endpoint. Also keep in mind that while there may be purpose-built EID parsers within a BPA, these are still URIs and will inevitably be handled by non-dtn-aware tools that just know how to manipulate URIs following the generic syntax.

Does the DTN scheme make sense in this regime, or would it be better to consider this as an errata and restrict the DTN service demux to a single path segment? The comment in [1] actually says “path-rootless” but the ABNF matches more than just that.

Thanks,

Brian S.

 

[1] https://www.rfc-editor.org/rfc/rfc9171.html#section-4.2.5.1.1

[2] https://www.rfc-editor.org/rfc/rfc3986#section-3.3

 

_______________________________________________
dtn mailing list
dtn@ietf.org <mailto:dtn@ietf.org> 
https://www.ietf.org/mailman/listinfo/dtn




 

-- 

--
Lucien Loiseau




 

-- 

--
Lucien Loiseau