question

Rahul Ravikumar avatar image
Rahul Ravikumar asked

Better support for asynchronous skills

It would be awesome if the Skills SDK supported long running skills via a better asynchronous interface (something like a publish subscribe via Reactive Streams or a similar interface). For e.g. you could envision a conversation like: Alexa, launch . .... Alexa tell me about Alexa responds with, Let me check on it and get back to you When Alexa has the result, Here is the answer So the change from an API perspective is that a Speechlet could return something like a Subscriber or a similar interface. ( http://www.reactive-streams.org/reactive-streams-1.0.0-javadoc/org/reactivestreams/Subscriber.html)
alexa skills kit
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jjaquinta avatar image
jjaquinta answered
Most people have been calling this "push notification". There are several long feature request threads about it. You can find one and +1 it if you like. Personally, I do not think Amazon will ever do this for security and privacy reasons. But I'd happily be proven wrong.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Galactoise avatar image
Galactoise answered
I think his use case is actually a tiny bit different than what people are asking for with push notifications, in that he is describing a single action that needs completing, triggered by a user's Alexa request, just one that happens to fall outside of the length of Alexa's timeout period. Obviously push notifications as a feature would provide an avenue for solving this problem, but in theory asynchronous requests could be done without enabling push. I'm of the same opinion as you, that we likely won't see push notifications any time soon, for privacy and security reasons, but asynchronous requests might be more palatable. My team has several shelved ideas that might become achievable with asynchronous requests. +1 from me
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Stefan Negritoiu avatar image
Stefan Negritoiu answered
+1 There's value to standardizing a pattern for invoking long running tasks and checking back on them even without push notifications.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Rahul Ravikumar avatar image
Rahul Ravikumar answered
Thanks for all the clarifications. The reason why I think that this use case is a bit different than push notifications is that the Skill needs to be user initiated thereby avoiding most of the security implications. The skill just happens to be long running and gives us the opportunity to keep the conversation going. My request would require standardizing on a non blocking stream model, rather than respond with a single SpeechletResponse. Thanks for the +1s.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.