FDSN / SeedLink

https://docs.fdsn.org/projects/seedlink/
Creative Commons Zero v1.0 Universal
1 stars 1 forks source link

DATA with time window #45

Closed crotwell closed 9 months ago

crotwell commented 10 months ago

How should a user initiate a new connection to get a time window for a channel? The appears that <seq> has to be there, but what it should be is not clear from the spec.

Should they use:

DATA -1 2023-08-09T01:23:45Z 2023-08-09T02:00:00Z`

or

DATA -2 2023-08-09T01:23:45Z 2023-08-09T02:00:00Z`

or maybe leave seq out like

DATA 2023-08-09T01:23:45Z 2023-08-09T02:00:00Z`

or something else?

And related, what should the server do differently for the two above commands? Does -1 "next available" make any sense in a timed DATA command? Seems like you either know the time range you want, or you are resuming and know the start sequence number.

Also see #43 as this may be an additional case where the magic number system is more confusing. Would this be better, using ALL instead of -2 as in #43 ?

DATA ALL 2023-08-09T01:23:45Z 2023-08-09T02:00:00Z`

Alternative could be to add subcommand words, so initial request would be

DATA TIME 2023-08-09T01:23:45Z 2023-08-09T02:00:00Z`

and then resume a broken connection with

DATA TIME 2023-08-09T01:23:45Z 2023-08-09T02:00:00Z SEQ 4789`

so seq is optional???

@andres-h what do you prefer for timed data?

crotwell commented 10 months ago

43 has changed DATA comand, so two possible commands would be:

DATA NEXT 2023-08-09T01:23:45Z 2023-08-09T02:00:00Z

and

DATA ALL 2023-08-09T01:23:45Z 2023-08-09T02:00:00Z

Should initial timed DATA use ALL? And have

DATA NEXT 2023-08-09T01:23:45Z 2023-08-09T02:00:00Z

be an error? Or is this possibly useful if end time is greater than current data in server due to latency?

andres-h commented 10 months ago

I tend to think that the last variant should be an error. But then we probably don't need the NEXT keyword in the first place.

The '-1' that was renamed to NEXT was initially a dummy placeholder for sequence number in time window requests. We don't need NEXT when time window is not used, because that is the default when sequence number is omitted. And in time window requests we can use ALL.

crotwell commented 10 months ago

OK, so can remove NEXT completely? That cleans things up for the DATA command considerably. +1 from me

So, possible valid DATA commands would be:

DATA - start flow at next packet to arrive at server

DATA 1234 - start flow at packet with seq >= 1234

DATA ALL 2023-08-09T01:23:45Z - start flow at first packet >= start time

DATA 1234 2023-08-09T01:23:45Z - start flow at first packet >= start time and seq >= 1234

DATA ALL 2023-08-09T01:23:45Z 2023-08-09T02:00:00Z - all packets between start and end

DATA 1234 2023-08-09T01:23:45Z 2023-08-09T02:00:00Z - all packets between start and end and seq >= 1234

Does that cover all cases?

andres-h commented 10 months ago

Does that cover all cases?

I think so.

Spec updated accordingly.