Open wrygiel opened 6 years ago
My personal opinion on these solutions:
omobility_id
.We briefly talked about these solutions in our team. It seems that ideas proposed in solutions 6 and 7 are not as unnecessary as I believed. There seems to be a need for a "shared space" for exchanging documents between HEIs. ToRs are only one kind of such document (and one we'd like to focus on in the beginning).
After an hour of talk we came up with another solution which seems plausible.
We leave existing mobility-related ToR APIs "as they are". However, we also introduce an alternative way of exchanging any kind of documents (including unbounded ToRs).
get(publisher_hei_id, document_id)
- returns raw content + metadata in headersindex(publisher_hei_id, document_types, reader_hei_ids, modified_since)
-> returns document_ids
along with their metadatareceive(document_ids)
(not sure if metadata should be included in the request or not)Metadata:
Content-Type
- regular HTTP Content-Type valueLast-Modified
- also per HTTP specsEwp-Document-Type
- this would be an enumeration, but might also allow any stringEwp-Document-Title
- title, preferrably in English (do we need more languages?)Pros:
Cons:
Not sure if "unbounded" is the best word to describe them, but it should do as a code name. What we mean here are ToRs which are not related to a mobility, and - as such - cannot be identified by
omobility_id
(the way they are currently identified in Incoming Mobility ToRs API).Why would we want to support them? Some examples:
Sharing without understanding mobilities: Perhaps some partners don't want to understand nominations and mobilities, but they still want to be able to share ToRs with other partners. (Currently, they are required to implement a client for Outgoing Mobilities API, and bind
omobility_ids
to their ToRs.)Sharing to a partner who doesn't (yet) understand mobilities: Perhaps we want to send a ToR to a partner which didn't implement Outgoing Mobilities API so far. (Currently we can't do that, because we need
omobility_id
to share, and this ID needs to be assigned by the partner. So we need to wait for the partner to implement Outgoing Mobilities API first.)Pushing partial ToRs at other partners: Perhaps it might be useful to allow the partner to share different subsections of the student's ToR with various receivers. (Currently each
omobility_id
identifies a unique ToR contents. There is no way to send different sections of student's achievements to other partners - there's only the option to send all achievements releated to that single mobility.)Let's discuss possible solutions here. @erasmus-without-paper/all-members (I won't have time to specify those before I leave the project, but I will leave some of my thoughts behind.)
Solution 1 (two standalone APIs for ToR retrieval)
Leave Incoming Mobility ToRs unchanged, add separate Unbounded ToRs.
get(receiving_hei_id, omobility_ids)
index(receiving_hei_id, sending_hei_ids, modified_since)
- returnsomobility_ids
receive(receiving_hei_id, omobility_ids)
get(publisher_hei_id, tor_ids)
index(publisher_hei_id, reader_hei_id, modified_since)
- returnstor_ids
receive(publisher_hei_id, tor_ids)
Pros:
Cons:
get
endpoints in two separate repos might need to be updated in unison.Solution 2 (split into Incoming Mobilities API and ToRs API)
Remove Incoming Mobility ToRs APIs. Replace them with ToRs API, when ToRs are identified by
tor_id
. Include thesetor_ids
in the existing Incoming Mobilities API.get(receiving_hei_id, omobility_ids)
- optional tor_id for each mobilityindex(receiving_hei_id, sending_hei_ids, modified_since)
- returnsomobility_ids
receive(receiving_hei_id, omobility_ids)
- will get called when ToRs get assigned to mobilitiesget(publisher_hei_id, tor_ids)
index(publisher_hei_id, reader_hei_id, modified_since) - returns
tor_ids`receive(publisher_hei_id, tor_ids)
Pros:
Cons:
Solution 3 (two get endpoints)
Pack both of these functionalities in a single API. Require partners to support two kinds of ToR identifiers (
tor_ids
andomobility_ids
) in two separate endpoints. Both responses will use the same XML namespace, but will be served at different endpoints.get-for-mobility(receiving_hei_id, omobility_ids)
get(publisher_hei_id, tor_ids)
index(publisher_hei_id, reader_hei_id, modified_since) - returns
tor_ids+ optional
omobility_id` for eachget(tor_ids + optional omobility_id for each)
Cons:
Solution 4 (one
get
endpoint with complex parameters)Same as Solution 3, but merge the two endpoints into one. Use different ToR identifiers depending on the parameters passed.
get(receiving_hei_id, omobility_ids)
get(publisher_hei_id, tor_ids)
index(publisher_hei_id, reader_hei_id, modified_since) - returns
tor_ids+ optional
omobility_id` for eachget(tor_ids + optional omobility_id for each)
Cons:
get
endpoint, but a bit complex parameter rules.Solution 5 (no
omobility_ids
in params)Support only
tor_ids
. Don't allow to fetch ToRs byomobility_ids
.get(publisher_hei_id, tor_ids)
-> XML (with optional mobility IDs)index(publisher_hei_id, reader_hei_id, modified_since) - returns
tor_ids` onlyreceive(publisher_hei_id, tor_ids)
Pros:
Cons:
Solution 6 (broader "XML document" support)
get(publisher_hei_id, document_ids)
- returns XML wrapper with a set of document_ids paired withxs:any
elementsindex(publisher_hei_id, document_types, reader_hei_ids, modified_since)
- returnsdocument_ids
with document_type for eachdocument_id
MAY contain adocument_type
prefix for better lookup performance (individual partner's choice)document_type
could be simply a namespace+elementname combined in a single string "{NS}name".receive(document_ids + document_type for each)
Pros:
Cons:
Solution 7 (broader "binary document" support)
get(publisher_hei_id, document_id)
- returns raw content, with headers for document_type and content_typeindex(publisher_hei_id, document_types, reader_hei_ids, modified_since)
-> returnsdocument_ids
with document type, content type, and multilingual title for eachdocument_id
MAY contain adocument_type
prefix for better lookup performance (individual partner's choice)document_type
would be an enumeration (but might also allow any string)content_type
is regular HTTP Content-Type stringreceive(document_ids + document_type, content_type, and multilingual title for each)
Pros:
Cons: