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

Upon validation of a candidate, push an "acoustic detection event" to the Acartia.io data cooperative (holding visual and acoustic detections of animal locations across the range of the SRKWs) using the public API and a token specific to the OrcaHello system. #111

Open
4 tasks
Tracked by #104
bdefoy opened this issue Sep 20, 2022 · 7 comments
Assignees
Labels
2023-hackathon Goals or topics for the 2023 annual Microsoft hackathon 2024-hackathon Goals or issues for the 2024 annual Microsoft hackathon architecture moderator portal Issues pertaining to ModeratorPortal at https://aifororcas.azurewebsites.net notification system Issues relating to the notification system

Comments

@bdefoy
Copy link
Member

bdefoy commented Sep 20, 2022

Acartia.io

  • Obtain an authentication token
  • Determine how to map the fields of the OrcaHello metadata document to the fields of SSEMMI's Sightings API
  • Implement a Service Bus topic for found SRKWs
  • Use the found SRKWs topic to contribute sightings to SSEMMI/Acartia
@micya
Copy link
Member

micya commented Sep 21, 2022

This should probably be part of the Notification System.

@gaurimadhok
Copy link

gaurimadhok commented Sep 21, 2022

Idea for incorporating into notification system:

  • We could add logic to the SendSubscriberEmail function so that when an item is taken off the srkwfound queue, we make a call to the API in addition to sending out the email
    OR
  • We could make another queue for sending out to the API (it would be the same as srkwfound queue)
  • We would make a new class similar to the send subscriber email that would make the requests

@micya
Copy link
Member

micya commented Sep 21, 2022

Idea for incorporating into notification system:

  • We could add logic to the SendSubscriberEmail function so that when an item is taken off the srkwfound queue, we make a call to the API in addition to sending out the email
    OR
  • We could make another queue for sending out to the API (it would be the same as srkwfound queue)
  • We would make a new class similar to the send subscriber email that would make the requests

If it is possible to have multiple functions trigger off of the same queue, you could create a new function that also triggers off the srkwfound queue.

It might not be possible due to the way the trigger works (polling). If so, we should look to replace storage queue with service bus, which should support that functionality.

@bdefoy
Copy link
Member Author

bdefoy commented Sep 23, 2022

Current implementation

All of the OrcaHello whale detections are added to the srkwfound queue as they are confirmed with a moderator marking "Yes" in the moderator portal:

if (item.GetPropertyValue<string>("SRKWFound").ToLower() == "yes")
{
queueClient.SendMessage(StringHelpers.Base64Encode(item.ToString()));

This queue is used to send out the subscriber emails for example:

message = await cloudQueue.GetMessageAsync();

However, the queue could similarly be used to contribute to Acartia. The current implementation uses Queue Storage, which does not easily allow for multiple consumers of the same queue.

Suggested implementation

Using Service Bus is recommended, as it would allow for both the email system and the Acartia contributions to use the same Topic.

The mappings from OrcaHello's CosmosDB metadata documents to the Acartia/SSEMMI Sightings API are being determined and tracked with @scottveirs via this google sheet.

The authentication token that Acartia requires can be stored in app settings.

@scottveirs
Copy link
Member

Working on setting up an Acartia.io token for user orcahello@orcasound.net

Once I have it, I'll work on adding it to app settings, @bdefoy ...

@scottveirs scottveirs added the 2023-hackathon Goals or topics for the 2023 annual Microsoft hackathon label Aug 2, 2023
@micya
Copy link
Member

micya commented Aug 25, 2023

@TruaShamu to lead this effort for 2023 hackathon.

@scottveirs scottveirs added 2024-hackathon Goals or issues for the 2024 annual Microsoft hackathon moderator portal Issues pertaining to ModeratorPortal at https://aifororcas.azurewebsites.net notification system Issues relating to the notification system architecture labels Jul 20, 2024
@scottveirs
Copy link
Member

@skanderm A topic we could discuss soon is whether the workflow proposed here still makes sense. We could ponder it first with @paulcretu on Monday, and then maybe circle back to @pastorep and @micowan before the hackathon.

I'm wondering if it would be strategic for the next year to continue public display of machine-based candidates and their moderation within OrcaHello's UI, but POST raw and confirmed candidates to the Orcasound API. Or should we bite the bullet sooner than later and figure out how to merge the machine and human moderation UIs ASAP?

An interim solution could be to merge the machine detection stream with the human detection stream to leverage the logic you've been developing to define candidates and bouts. The Orcasite backend could then handle all interactions with Acartia (i.e. POSTing only temporally or spatially unique presence/absence information) as well as all notifications. Until moderator UIs are unified, the notifications to moderators could just point them to the two different UIs based on the type of detection (human or machine).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2023-hackathon Goals or topics for the 2023 annual Microsoft hackathon 2024-hackathon Goals or issues for the 2024 annual Microsoft hackathon architecture moderator portal Issues pertaining to ModeratorPortal at https://aifororcas.azurewebsites.net notification system Issues relating to the notification system
Projects
Status: Dev/ops challenges
Status: In Progress
Status: No status
Development

No branches or pull requests

6 participants