WesleyYep / moviebot

Chatbot for movies
0 stars 0 forks source link

Draft version. Incomplete #19

Closed changkon closed 7 years ago

changkon commented 7 years ago

Incomplete but created it to ask for discussion. I'm unsure how the source dispatcher should behave for sources like tmdb. For example, if we are given slots and it has PlotDescription only. We can get the movies for it and return it. If another request comes in and it has PlotDescription and Actors, assuming we stored results in sessionAttributes (or some other place) we can filter the existing movies with actors. How about other way round? Actors first then PlotDescription. If the movies returned from either call, returns all the information, we only need to make one call? Or do they support a REST call?

Also how are we going to store previous results in sessionAttributes or some other place? The sessionAttributes only allows string to string mappings.

Wal8800 commented 7 years ago

sources like tmdb

At the moment, if you search by PlotDescription first using tmdb /search/movie endpoint, the result list only got basic detail of the movies so when you get Actor information from the user, you will have to make a query for each movie in the result list. which is not feasible. This is the same problem when you query for Actor first and then have plot description information later.

So thats why we should use the elastic search server that we prepared. i think it can search for movies using both actor and plot description quickly and in 1 API call. I think we can still use tmdb for some other query since we don't have all the information stored

storing results

As I mentioned before we could store the entire temporary movie list result in dynamodb while the sessionAttributes should be storing some key id, keywords or phrases.

WesleyYep commented 7 years ago

sessionAttributes store string, string mappings only. However, could parse an array of movie names into a string I suppose. sessionAttribute size limit is 12kb, so around 12,000 characters.

changkon commented 7 years ago

@Wal8800 have to elaborate on the dynamodb part. can you put a design doc for it

changkon commented 7 years ago

Also graphql..

Wal8800 commented 7 years ago

what I mean is that you would have a table containing the current movie list. The primary key for each list could be a request-id that we could generate so we can use to retrieve and update this list.

http://docs.aws.amazon.com/amazondynamodb/latest/gettingstartedguide/GettingStarted.NodeJs.html

don't think we need a design doc, is pretty simple to setup. but yea up to you on how you want to implement this :+1:

WesleyYep commented 7 years ago

sure lets give dynamo a try. Possible to set it up via aws cli for source control?

Wal8800 commented 7 years ago

yea definitely can set up a table via aws cli

http://docs.aws.amazon.com/cli/latest/reference/dynamodb/