janvgils / sids

Simple Downlink Share Convention (SIDS)
GNU General Public License v3.0
1 stars 0 forks source link

Specification update for testing #1

Open dernasherbrezon opened 1 year ago

dernasherbrezon commented 1 year ago

Hi,

I’m wondering if we can reserve noradID=0000 for testing purposes? The use case is the following:

Such setup should simplify integration.

daniestevez commented 1 year ago

This would require every consumer of SIDS to be updated to follow these semantics. Pragmatically speaking, this probably won't happen. An alternative approach is to set up a test server at a different URL.

dernasherbrezon commented 1 year ago

Why would it require to update every consumer? All current integrations won't be affected. This testing applies only during the initial integration. Separate URL looks reasonable though, but require a bit of configuration on the server-side. Blank/testing noradID is based on similar principles as RFC 2606 (https://datatracker.ietf.org/doc/html/rfc2606) where everyone can refer to the testing domain "example.com".

janvgils commented 1 year ago

Thank you very much for this suggestion.

After reading this I was wondering if the Norad ID specification could help us. the only thing I could find was this Wikipedia page and it states that numbering starts at 1.

So by altering the SIDS receiver that when it receives 0000 it will discard the frame should be enough to have a solution for testing purposes.

From a practical point,, creating a SIDS receiver and test communication, is something that will always be needed with or without discarding 0000.

If you need a test server, let me know.

daniestevez commented 1 year ago

Why would it require to update every consumer? All current integrations won't be affected.

Maybe I misunderstood your proposal (or the modal verbs in it). I thought you meant "implementations SHALL treat norad ID 0 as a test [...]", but apparently you mean "implementations MAY treat NORAD ID 0 as a test [...]"? I don't see how this being optional but being in the protocol definition is helpful. It risks confusion about what implementations follow this, which not, and among those who follow it, which is their behaviour.

Blank/testing noradID is based on similar principles as RFC 2606

I think it's not the same. RFC 2606 gives some domain names which are guaranteed that will never be used in the global DNS. Therefore, they can be used as examples, placeholders or internal tests without risk of future clashes. The RFC does not say how these reserved names should be used for test purposes, nor how a DNS implementation should react when seeing these (in 99.9% of the cases these domain names are not treated specially).

the only thing I could find was this Wikipedia page and it states that numbering starts at 1.

Indeed NORAD IDs start at 1, which apparently got assigned to Sputnik-1's rocket (Sputnik-1 itself got NORAD ID 2). In this sense, NORAD ID 0 is invalid, and implementations may reject it in validation because of internal limitations (using non-negative integers to represent NORAD IDs, for example) or crash (hopefully not) when they see it, so it doesn't seem too good to use it for test purposes.

In the spirit of RFC 2606, we might choose to reserve some NORAD IDs with the guarantee that they will never be used for actual objects. However, this poses two problems. First, it is NORAD who manages assignments of NORAD IDs, not us. Second, we are already using incorrectly the 9xxxx IDs as temporary IDs [source: I read this in passing a while ago, from T.S. Kelso, I believe, but the only thing I can find at the moment is "The analyst range, which is denoted by a satellite number from 80,000-89,999, is used like an analytical sandbox" from the Space-Track FAQ].

dernasherbrezon commented 1 year ago

NORAD who manages assignments of NORAD IDs, not us.

That's true. Maybe we can reserve "source" name instead? Semantically better use "analyst range" to test the data flow from satellite to the endpoint. While source="TEST" can be used to test the flow between SIDS endpoints.

FYI: Satnogs prod has noradID=00000.

curl -v -H "Authorization: Token XXXXX" "https://db.satnogs.org/api/telemetry/?satellite=00000&app_source=&observer=&transmitter=&start=&end=&page=1"
...
[{"sat_id":"EPYJ-2448-1587-4393-4391","norad_cat_id":0,"transmitter":"","app_source":"sids","decoded":"","frame":"00555,139.0,43.669412,-79.521232","observer":"0-JJ00aa","timestamp":"2023-07-07T20:02:20Z","version":"","observation_id":null,"station_id":null,"associated_satellites":[]} .... ]

If you need a test server, let me know.

Thanks Jan, I'm more after spec for now. I can filter out both noradID=0000 or invalid sources on my end without making changes to the SIDS specification. Just want to make spec a little bit nicer.