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

Context Source Forwarding Specification #2

Closed
wants to merge 1 commit into from

Conversation

jmcanterafonseca
Copy link
Contributor

No description provided.

@jmcanterafonseca
Copy link
Contributor Author

not yet finished

@jmcanterafonseca
Copy link
Contributor Author

@fgalan @kzangeli @dcalvoalonso r? please

/cc @jason-fox

@jmcanterafonseca jmcanterafonseca changed the title Context Source Forwarding Context Source Forwarding Specification May 31, 2018
Copy link

@dcalvoalonso dcalvoalonso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my eyes, it is more than OK. I have done some very minor comments or suggestions.

I guess that @fgalan would have more to say since he has much more experience with NGSI and the Context Broker.

By the way, thanks for requesting our point of view, we really appreciate it! :)

and [![NGSI-LD badge](https://img.shields.io/badge/NGSI-LD-red.svg)](http://www.etsi.org/deliver/etsi_gs/CIM/001_099/004/01.01.01_60/gs_CIM004v010101p.pdf)
but when there are particularities they are clearly stated.

## Definitions

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should an NGSI Registry be defined? Which is their role as part of the Context Source Forwarding?


## Context Source Interface

Compliant Context Sources shall support the interface (HTTP binding) defined by the operations described below.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I am not wrong, the interface is based on the RESTful paradigm. Maybe it would be good to specify this aspect.

+ It shall support the same HTTP interface as described by the
[NGSIv2 Specification](https://swagger.lab.fiware.org/?url=https://raw.githubusercontent.com/Fiware/specifications/master/OpenAPI/ngsiv2/ngsiv2-openapi.json#/Entities/List_Entities)

If the Context Source is not capable of resolving a filter query or a geoquery

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we specify also what happens when the query refers to an entity which is not provided by the Context Source?

The rest of NGSI operations are not suitable to be forwarded and Brokers,
instead they shall respond with an HTTP `422` error. Error description shall include the string `Operation not Supported`.

### Maximum Number of Context Forwarding Requests

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe to maximize the understandability of this part, it would be good to explain which is the purpose and benefit of this mechanism.


If all matching Context Sources responded with an HTTP status code in the ranges `4xx` or `5xx` or were not reachable at all, then an HTTP response with status code `502` `Bad Gateway` shall be generated. If all matching Context Sources raised timeout conditions, then an HTTP response with status code `503` `Gateway Timeout` shall be generated.

If some matching Context Sources responded with a HTTP code in the ranges `4xx` or `5xx`, they were not reachable (Connection Errors, timeouts, etc.), or they were not contacted due to Context Forwarding request limits (posed by `Fiware-Csource-Max-Forwards` or the implementation itself), then the HTTP response code shall be `207` (`Partial Success`). Clients should inspect the content of the `Fiware-Csource-Response` header to understand the real motivation of the partial success.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small typo: an HTTP code instead of a HTTP code

Copy link
Member

@jason-fox jason-fox Jul 25, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

an HTTP code is correct APA Style

The general rule for indefinite articles is to use a before consonants and
an before vowels. The trick here is to use your ears (how the acronym
is pronounced), not your eyes (how it's spelled).

HIV (pronounced "aitch eye vee") begins with a vowel sound, so an
HIV patient is correct. HIPAA (pronounced "hippa") begins with a consonant
sound, so a HIPAA form is correct.

**`Fiware-Csource-Response`** HTTP response header. There shall be as many fields values (comma separated) for `Fiware-Csource-Response` as the number of involved Context Sources that were contacted, when processing the original request. Each field-value is a semicolon-separated list; this sublist consists of parameter-identifier pairs. Parameter-identifier pairs are grouped together by an equals sign. The parameters defined are:

+ `id`: the id of the matching Context Source registration. Ex. `id=urn:ngsi-ld:ContextSourceRegistration:A4567`. Mandatory
+ `endpoint`: For instance when debugging activated, it can include the URI of the endpoint associated to the Forwarded Context Source endpoint. Ex. `host=mycsource.example.org`. Optional.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

associated with` instead of associated to`

@fgalan
Copy link
Contributor

fgalan commented Jul 25, 2018

I haven't been able to have a look to the specification yet (sorry for that! I'll do...) but, before I forget about it, it'd like to comment something:

It would be a good idea to have a look to current Orion issues looking for those related with forwarding problems/limitations and check if the new specification would solve them. For instance (not exahustive list):

For each issue a comment explaing how Context Source Forwarding Specification solves it would be great, in order to check the "coverage" of all them.

@jason-fox
Copy link
Member

jason-fox commented Jul 25, 2018

Just adding to @fgalan 's list of forwarding issues, I've done a broad trawl of Registration/Notifications issues:

For each issue a comment explaing how Context Source Forwarding Specification solves it would be great, in order to check the "coverage" of all them. I'm not saying all of the list are necessarily relevant - it just makes sense to go broad and not to miss anything.

@jason-fox
Copy link
Member

I have cherry picked this and moved the texts to an NGSI-v2 specific README.md - forwarding for NGSI-LD has not been brought forward to the ETSI CIM committee yet, so I have removed the references to LD for now.

@jason-fox jason-fox closed this Mar 27, 2020
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 this pull request may close these issues.

4 participants