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

Transport Module (TM) trigger specifications #19

Closed
patrickkaleta opened this issue Jan 29, 2020 · 5 comments
Closed

Transport Module (TM) trigger specifications #19

patrickkaleta opened this issue Jan 29, 2020 · 5 comments
Assignees
Labels
enhancement New feature or request question Further information is requested

Comments

@patrickkaleta
Copy link
Contributor

Subtask of this issue.

In order for the TM to be able to generate study-relevant output, CSIS needs to trigger the TM and sent the necessary information for the relevant Studies.

We already have something similar for another external service (Emikat), where we use REST for the communication (issue, relevant code).

@rapto: Angela told me that you would be to right person to talk to. Can you check our trigger approach for Emikat and tell me if we could do something similar for the TM?

If so, we would have to think about the following things:

  1. Which Studies are considered to be relevant for the TM? -> should be just Studies of StudyType = Transport Infrastructure
  2. When and with what data should we trigger the TM? -> CSIS allows users to fill their studies bit by bit. So right after it is created, it doesn't yet contain all the needed data, so it might make sense to wait a bit before we actually trigger the TM.
  3. What shall we do when users change relevant parts of the Study? -> for Emikat, in such cases we trigger it again with the updated data and start a re-calculation
  4. How will the CSIS know once results are available? -> for Emikat, we periodically pull the current status. But it would also be possible (maybe the better solution?) if the TM would make a REST call and update the status of the calculations
  5. Which ID to use as primary identification for communication? (e.g. when requesting a map from the TM) -> for the CSIS (Drupal system) it would be easier if we could use our internal IDs and pass them along in our requests.
@patrickkaleta patrickkaleta added enhancement New feature or request question Further information is requested labels Jan 29, 2020
@patrickkaleta patrickkaleta added this to the D1.4 CLARITY CSIS v2 milestone Jan 29, 2020
@patrickkaleta patrickkaleta added this to Backlog: Low Priority in T1.3 Climate Services Co-creation via automation Jan 29, 2020
@patrickkaleta patrickkaleta moved this from Backlog: Low Priority to Backlog: High Priority in T1.3 Climate Services Co-creation Jan 29, 2020
@patrickkaleta
Copy link
Contributor Author

@ghilbrae adding you to this issue to keep you in the loop about the status.

@rapto
Copy link

rapto commented Feb 6, 2020

Hello there, I'll try to answer.

  1. Which Studies are considered to be relevant for the TM? -> should be just Studies of StudyType = Transport Infrastructure

That is correct, only TI.

  1. When and with what data should we trigger the TM? -> CSIS allows users to fill their studies bit by bit. So right after it is created, it doesn't yet contain all the needed data, so it might make sense to wait a bit before we actually trigger the TM.

The study can be triggered as soon as created. The only information that willbe kept in both systems will be the bare minimum: Title and short description.

  1. What shall we do when users change relevant parts of the Study? -> for Emikat, in such cases we trigger it again with the updated data and start a re-calculation

Should the title or description change, it would be required to sync in the TM.

  1. How will the CSIS know once results are available? -> for Emikat, we periodically pull the current status. But it would also be possible (maybe the better solution?) if the TM would make a REST call and update the status of the calculations

In this specific case, CSIS is not required to monitor the results in this moment.

  1. Which ID to use as primary identification for communication? (e.g. when requesting a map from the TM) -> for the CSIS (Drupal system) it would be easier if we could use our internal IDs and pass them along in our requests.

We can add this field to the DB model and allow queries by external ID.

Please let me know if there is anything else you would like to ask.

@patrickkaleta
Copy link
Contributor Author

patrickkaleta commented Feb 10, 2020

Ok great, so we will do the following:

Setup of initial trigger:

  • trigger the TM immediately once a TI study is created
  • update the TM when one of the relevant fields is changed
  • use the Drupal Study IDs as identifier

Relevant fields to be included in initial trigger:

  • Study title
  • Study description
  • SimulationType (needed by the TM app)

@rapto so how exactly can we talk to the TM? Is there a documentation or description of the API available, so that we can set this up? If you like we can have a telco and discuss this in more detail.

Also, what other fields will be needed? Don't you need the study area and the selected data package + resources, so that the TM can do its calculations? If so, we can add this information in the initial trigger, or the TM could also get these details via a REST call and inside the initial trigger I just place a link to appropriate REST endpoint on the CSIS side.

@ghilbrae
Copy link

We can discuss this on Monday after the weekly meeting. I'll let @rapto know when to connect.

@patrickkaleta
Copy link
Contributor Author

With the help of @rapto I was able to get the TM trigger up and running. I'm considering this issue done.

T1.3 Climate Services Co-creation automation moved this from Backlog: High Priority to Done Feb 28, 2020
p-a-s-c-a-l added a commit that referenced this issue Apr 17, 2020
p-a-s-c-a-l added a commit that referenced this issue Apr 17, 2020
p-a-s-c-a-l added a commit that referenced this issue Apr 17, 2020
p-a-s-c-a-l added a commit that referenced this issue Apr 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
No open projects
Development

No branches or pull requests

4 participants