AW: [RSP-QL] Regarding standalone keyword 'NOW'

Yes.

My main concern is, that [NOW] is defined via a single timestamp, let’s say t=0. Hence everything arriving a little bit earlier (t=-1) or later (t=1) is already out of the window’s scope (at least that’s how I understand it). However, as we know, windows are defined as intervals with a defined start and end point (typically that’s the RANGE parameter). NOW doesn’t make sense for me in that case.

In your example ([NOW – PT1M, NOW, STEP PT1M]) there is a clear interval definition of the window, which makes much more sense to me.

Best,
Peter

Von: Gray, Alasdair J G [mailto:A.J.G.Gray@hw.ac.uk]
Gesendet: Freitag, 18. Dezember 2015 14:55
An: Wetz Peter
Cc: Le Phuoc, Danh; Robin Keskisärkkä; Daniele Dell'Aglio; public-rsp@w3.org
Betreff: Re: [RSP-QL] Regarding standalone keyword 'NOW'


On 18 Dec 2015, at 13:46, Wetz Peter <peter.wetz@tuwien.ac.at<mailto:peter.wetz@tuwien.ac.at>> wrote:

Thanks Danh for clarifying!

If I understand you correctly, in CQELS the NOW keyword is coupled to the configured timestamp unit. For instance, if the configured timestamp unit is “minute”, then the engine will consider all triples in a [NOW] window which entered the system in the same minute. If this is true, then I think the keyword is somewhat misleading, because we shouldn’t speak of NOW, if the data may actually have arrived seconds (minute timestamp) earlier.

I am not strictly against NOW, but I think we need to clarify what it actually means if it is used in a window like this: [NOW].

Presumably you would be happy with a window of the form [NOW – PT1M, NOW, STEP PT1M] where the time interval is explicit in the range of the window?

Alasdair


Best,
Peter


Von: Le Phuoc, Danh [mailto:danh.lephuoc@deri.org]
Gesendet: Freitag, 18. Dezember 2015 09:59
An: Robin Keskisärkkä; Daniele Dell'Aglio; Wetz Peter; public-rsp@w3.org<mailto:public-rsp@w3.org>
Betreff: Re: [RSP-QL] Regarding standalone keyword 'NOW'

Hi all,

In CQELS, we use the “[NOW]” definition of CQL[1] (section 6.1.1), it's basically the shortcut of [RANGE T] when T=0(rounded off based on the time unit is used). In our implementation, we always use a nanosecond as the time  unit for time stamps, however, due to some use cases,  the engine can be configured to use second, millisecond or even minute as the time unit. So, It’s aligned to Jean-Pau’s reply, NOW is relative to time unit used in certain context.

Best,

Danh


[1]. The CQL continuous query language: semantic foundations and query execution http://dl.acm.org/citation.cfm?id=1146463


From: Robin Keskisärkkä <robin.keskisarkka@liu.se<mailto:robin.keskisarkka@liu.se>>
Date: Friday 18 December 2015 06:59
To: Daniele Dell'Aglio <daniele.dellaglio@polimi.it<mailto:daniele.dellaglio@polimi.it>>, Wetz Peter <peter.wetz@tuwien.ac.at<mailto:peter.wetz@tuwien.ac.at>>, "public-rsp@w3.org<mailto:public-rsp@w3.org>" <public-rsp@w3.org<mailto:public-rsp@w3.org>>
Subject: Re: [RSP-QL] Regarding standalone keyword 'NOW'
Resent-From: <public-rsp@w3.org<mailto:public-rsp@w3.org>>
Resent-Date: Friday 18 December 2015 06:59

Hi again!

I realised that perhaps the interpretation of CQELS 'NOW' is really something more along the lines of "the triples of the last reported timestamp of this stream". This would mean that it is the equivalent of a physical window (sliding as data comes in) but with the window defined by a timestamp rather than as a number of triples. If this is the case then is it possible to model without further exploring some stateful operators? Anyone involved in the CQELS project who could clarify this a bit?

Cheers,
Robin

From: Robin Keskisärkkä <robin.keskisarkka@liu.se<mailto:robin.keskisarkka@liu.se>>
Date: Wednesday 16 December 2015 15:47
To: Daniele Dell'Aglio <daniele.dellaglio@polimi.it<mailto:daniele.dellaglio@polimi.it>>, Wetz Peter <peter.wetz@tuwien.ac.at<mailto:peter.wetz@tuwien.ac.at>>, "public-rsp@w3.org<mailto:public-rsp@w3.org>" <public-rsp@w3.org<mailto:public-rsp@w3.org>>
Subject: Re: [RSP-QL] Regarding standalone keyword 'NOW'

Hi!
One use of the 'NOW' keyword would be filtering of a rapid stream, basically using it in a preprocessing step where a window interval might not be relevant to the filter. However, from my perspective I can not come up with no scenario where it could not equally well be replaced by a small window range with a small step parameter. The example could then be rewritten as:

REGISTER STREAM :filtered AS

CONSTRUCT ISTREAM { ?person :in ?room }
FROM NAMED WINDOW :w ON :superFastStream [RANGE PT0.0001S STEP RANGE PT0.000001S]
WHERE {
    WINDOW :w {
       ?event a :Observation ;
                    :observedPerson ?person ;
                    :sensorLocation ?room .
   }
}

What I like about this way of expressing it is that the meaning is more intuitive since the interval is stated clearly. The reason I brought it up was to see if there were any strong proponents for this, in particular I had in mind the implementors of CQELS who may have a different take on this issue, especially with regard to Istream.

Cheers,
Robin

From: Daniele Dell'Aglio <daniele.dellaglio@polimi.it<mailto:daniele.dellaglio@polimi.it>>
Date: Wednesday 16 December 2015 15:23
To: Wetz Peter <peter.wetz@tuwien.ac.at<mailto:peter.wetz@tuwien.ac.at>>, Robin Keskisärkkä <robin.keskisarkka@liu.se<mailto:robin.keskisarkka@liu.se>>, "public-rsp@w3.org<mailto:public-rsp@w3.org>" <public-rsp@w3.org<mailto:public-rsp@w3.org>>
Subject: Re: [RSP-QL] Regarding standalone keyword 'NOW'

In general I share the concerns of Peter. We introduced NOW in [1] to enable the possiblity to declare windows in the past, e.g., a window in the interval (NOW-24H,NOW-23H].
If we are planning to use NOW in other situations (i.e., not in the context of a window definition), can you point out the use case on where it is needed?
Regards,
Daniele

Il giorno mer 16 dic 2015 alle ore 13:14 Wetz Peter <peter.wetz@tuwien.ac.at<mailto:peter.wetz@tuwien.ac.at>> ha scritto:
For me, NOW was always a bit misleading. Which timepoint does it define exactly?

As you say, “CQELS defines the keyword NOW for windows to include data from the current timestamp”: But what defines the current timestamp? In my opinion NOW is only True in an infinitesimal point in time making it useless, if we use your definition. What I mean is that, if you say NOW at t0 (timestamp 0) then at “t1” it is not true/valid anymore.

But maybe I am just misinterpreting the definition of NOW. Generally I would not like to use it, since it seems intransparent to me.

However, and this is taken (and adapted) from Emanuelle’s example query at [1], we could use something like [NOW-PT35M]. This means to include every triple between “35min in the past” to “NOW”. This makes more sense to me than just using NOW in a window definition, e.g. [NOW].

[1] http://www.w3.org/community/rsp/wiki/Example_of_RSP-QL_query


Best,
Peter

Von: Robin Keskisärkkä [mailto:robin.keskisarkka@liu.se<mailto:robin.keskisarkka@liu.se>]
Gesendet: Mittwoch, 16. Dezember 2015 10:58
An: public-rsp@w3.org<mailto:public-rsp@w3.org>
Betreff: [RSP-QL] Regarding standalone keyword 'NOW'

Hi!
Do we think that the keyword NOW for logical windows will be supported in the RSP-QL specification? I haven't heard it be pushed as a proposal, nor is it any of the sample queries. CQELS defines the keyword NOW for windows to include data from the current timestamp, e.g.:

CONSTRUCT { ?person :in ?room }
WHERE {
   STREAM <MailScanner has detected a possible fraud attempt from "room.sensor>" claiming to be http://room.sensor><http://room.sensor%3e/> [NOW] {
      ?event a :Observation ;
                   :observedPerson ?person ;
                   :sensorLocation ?room .
   }
}

One possible interpretation of the keyword is that it is syntactic sugar for the minimal range of a logical window in an RSP engine (e.g. an interval limit related to the precision of the engine, or some property set by the user). I'm interested to hear any arguments for keeping the keyword as it is used in CQELS, as opposed to only allowing a window range to be defined as a range (with an optional STEP).

Cheers,
Robin

Best regards,
Robin Keskisärkkä
PhD Student

Department
581 83 Linköping
Mobile: +46 (0)70 49 09 179
Please visit us at www.liu.se<http://www.liu.se/>


Alasdair J G Gray
Fellow of the Higher Education Academy
Assistant Professor in Computer Science,
School of Mathematical and Computer Sciences
(Athena SWAN Bronze Award)
Heriot-Watt University, Edinburgh UK.

Email: A.J.G.Gray@hw.ac.uk<mailto:A.J.G.Gray@hw.ac.uk>
Web: http://www.alasdairjggray.co.uk

ORCID: http://orcid.org/0000-0002-5711-4872

Office: Earl Mountbatten Building 1.39
Twitter: @gray_alasdair












We invite research leaders and ambitious early career researchers to join us in leading and driving research in key inter-disciplinary themes. Please see www.hw.ac.uk/researchleaders<http://www.hw.ac.uk/researchleaders> for further information and how to apply.

Heriot-Watt University is a Scottish charity registered under charity number SC000278.

Received on Friday, 18 December 2015 14:03:37 UTC