Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement SIRI Lite #6263

Open
leonardehrenfried opened this issue Nov 20, 2024 · 9 comments · May be fixed by #6284
Open

Implement SIRI Lite #6263

leonardehrenfried opened this issue Nov 20, 2024 · 9 comments · May be fixed by #6284

Comments

@leonardehrenfried
Copy link
Member

leonardehrenfried commented Nov 20, 2024

Goal / high level use-case

Some SIRI data providers implement only SIRI Lite, which means that rather than using the request/response pattern, the client sends a GET request downloading all of the data.

Describe the solution you'd like
OTP should support this workflow natively.

Describe alternatives you've considered

A proxy.

cc @rcavaliere @fahrplaner

@leonardehrenfried
Copy link
Member Author

@abyrd says the following:

http://www.normes-donnees-tc.org/wp-content/uploads/2018/10/Proposition-Profil-SIRI-Lite-initial-v1-3.pdf
See section 2.1.3. This profile was a back-formation from practices at the NY MTA and OpenPlans described at https://bustime.mta.info/wiki/Developers/SIRIIntro

@abyrd
Copy link
Member

abyrd commented Nov 26, 2024

At today's meeting @leonardehrenfried mentioned that no one seemed to know for certain whether SIRI Lite was supposed to return JSON or XML.

My understanding is that SIRI Lite was proposed as an official aspect of SIRI by Christophe Duquesne in this document: http://www.normes-donnees-tc.org/wp-content/uploads/2018/10/Proposition-Profil-SIRI-Lite-initial-v1-3.pdf
It states that SIRI Lite returns either JSON or XML depending on the situation. See section 2.1.3 for a description of how XML is mapped to JSON.

My understanding is that SIRI Lite was a formalization of practices seen in the wild at the NY MTA and OpenPlans. This page describes the system that introduced the practices that were formalized as SIRI Lite: https://bustime.mta.info/wiki/Developers/SIRIIntro

It says: "While the SIRI standard specifies XML as an interchange format, it incurs a substantial penalty in data-transfer and processing requirements. In contrast, JSON (Javascript Object Notation) is a lightweight data-interchange format. Human-readable, lightweight, and easy to parse, JSON offers an alternative. Thus, MTA Bus Time provides both XML and JSON versions of its API."

This page asserts that the MTA contributed directly to the normalization (standardization) process:
http://www.normes-donnees-tc.org/format-dechange/donnees-temps-reel/

@leonardehrenfried leonardehrenfried linked a pull request Nov 27, 2024 that will close this issue
@abyrd abyrd changed the title Implement SIRI light Implement SIRI Lite Dec 3, 2024
@abyrd
Copy link
Member

abyrd commented Dec 3, 2024

I updated the title and a comment to say "SIRI Lite" instead of "Light". All sources I could find spell it "Lite". The motivation is that I was baffled when searching for this ticket using the word "Lite" and couldn't find it :)

@leonardehrenfried
Copy link
Member Author

I reject this Americanism :)

@Jouca
Copy link

Jouca commented Dec 3, 2024

I don't even know @leonardehrenfried where you found the term "Light" 😂

@abyrd
Copy link
Member

abyrd commented Dec 20, 2024

@leonardehrenfried I fielded a question today about retrieving SIRI-Lite from a JSON-only endpoint. Currently it looks like the updater, even the one I modified to use the HTTP GET instead of POST method, can map only XML responses. It seems like JSON support might be a common need.

@leonardehrenfried
Copy link
Member Author

leonardehrenfried commented Dec 20, 2024

So far I managed to talk people out of it.

I see that there are some rules about converting XML to JSON in the draft but I much prefer having a proper XML schema to validate the data to a French-only document that doesn't contain tooling for automatic validation.

@abyrd
Copy link
Member

abyrd commented Dec 20, 2024

I don't even know @leonardehrenfried where you found the term "Light" 😂

Just in case you genuinely don't know: "Lite" is an intentional commercial/marketing misspelling of "light". It's definitely not the norm to use the "lite" spelling in a serious context like a data specification. Doing so is a bit tongue-in-cheek, like this is a "new and improved" product being promoted with a kitschy late-20th-century vibe. So someone who heard it in conversation would probably assume "light" while someone reading the spec might remember the distinctive "lite" spelling.

@abyrd
Copy link
Member

abyrd commented Dec 20, 2024

I reject this Americanism :)

Clearly this spelling is not American, for example used on this French sauce salade! /s
French Dressing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants