alexa-app icon indicating copy to clipboard operation
alexa-app copied to clipboard

Add support for storing session data in a database (eg. dynamoDB)

Open artifactdev opened this issue 8 years ago • 7 comments

I don't see how to use dynamoDB with alexa-app.

It would be nice to have this especially for local trip skills. So a user can save the default origin of a trip.

artifactdev avatar Mar 27 '17 10:03 artifactdev

Sounds like a more general question - how do you use DynamoDB with any node.js app?

dblock avatar Mar 27 '17 11:03 dblock

What I think @artifactdev means is that the alexa-skills-kit-sdk-for-nodejs has native support for dynamoDB and that maybe this library should have native support as well.

tejashah88 avatar Mar 27 '17 18:03 tejashah88

Like @tejashah88 wrote, i mean exactly this.

artifactdev avatar Mar 28 '17 08:03 artifactdev

Cool. I think we can do better and make it as easy for users and allow switching back-ends. For one I'd love me some mongodb.

dblock avatar Mar 28 '17 11:03 dblock

Well I was thinking of a solution similar to how expressjs is set up, where the expressjs library is the main library and the various middleware are like the plugins that add extra functionality. Similarly, if we make alexa-app as the main library, we can have various plugins for it, such as the alexa-js/alexa-app-router. This allows the main library to be fairly lightweight and modular and you can add extra plugins as you need to.

tejashah88 avatar Mar 28 '17 17:03 tejashah88

Am interested in this proposal as well. In the meantime, does anyone know how to integrate dynamodb with alexa-app?

McGern avatar Apr 25 '17 10:04 McGern

const AWS = require('aws-sdk');

AWS.config.loadFromPath('./config.json');

const db = new AWS.DynamoDB.DocumentClient({ apiVersion: '2012-10-08' });

steveoh avatar Oct 05 '17 02:10 steveoh