Re: [netconf] restconf collections

Kent Watsen <> Fri, 02 October 2020 14:46 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 11EA93A10EB for <>; Fri, 2 Oct 2020 07:46:30 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.895
X-Spam-Status: No, score=-1.895 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (1024-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id R313IxK8lyZo for <>; Fri, 2 Oct 2020 07:46:29 -0700 (PDT)
Received: from ( []) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 2CA9D3A1092 for <>; Fri, 2 Oct 2020 07:46:29 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=224i4yxa5dv7c2xz3womw6peuasteono;; t=1601649988; h=From:Message-Id:Content-Type:Mime-Version:Subject:Date:In-Reply-To:Cc:To:References:Feedback-ID; bh=WbpyfFfD+yI4N57PxB1CCLsx66+hD+YZ9ta06+JuHhU=; b=VeZmLhkIzaWxuToscBDm69eomxrKj9mvPRp5PzmElV0sGRb4wtL0nYCaBolvzXG8 Kjd0LwXLwJBLDTAimtXfc8vtGW3qDSYfR0mT/WRPvDWgoZTGpA/zzNp6NPojZVALzc6 u+xUMFCTq9lBUCepQAf8byAdYsqnRUh31a8gQhi0=
From: Kent Watsen <>
Message-ID: <>
Content-Type: multipart/alternative; boundary="Apple-Mail=_C6CE3C3F-81F0-48B6-9854-D005124FEDBC"
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.\))
Date: Fri, 02 Oct 2020 14:46:27 +0000
In-Reply-To: <>
Cc: Martin Björklund <>, "" <>
To: Hongwei Li <>
References: <> <> <> <> <> <>
X-Mailer: Apple Mail (2.3608.
X-SES-Outgoing: 2020.10.02-
Archived-At: <>
Subject: Re: [netconf] restconf collections
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: NETCONF WG list <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Fri, 02 Oct 2020 14:46:30 -0000

Hi Hongwei,

> [HL] A user case for time series data (e.g., logs), customers want to get the data in between Time A and Time B. Do we use timestamp filter here?

Some events have only one timestamp.  The database likely has a primary key (e.g., "record-id”) and a separate “timestamp” field.  For all intents and purposes, the logs are persisted in time-order, so no additional sorting is needed.  The physical order is good enough.

However, other events may have distinct "time-generated" and "time-received” fields.  This is most notable for a “log-receiver” (or just “receiver", in rfc8639 parlance), as there may be a delay between when a log is generated by a publisher and when it is persisted by the receiver.   In this case, the user-expectation is undoubtedly to sort on “time-generated”. The “record-id” and “time-received” fields are physically in order (same as above), but “time-generated” could be all over the place, so a sort is needed.

FWIW, if the goal is to find logs generated in a window of time around a timestamp, a fast-filter can be used to whittle down the result-set to a (hopefully) manageable size before the slow-sort as follows:

		"time-generated >= timestamp-of-interest - some-window”
		“time-received <= timestamp-of-interest + some-window"