[SOLVED] Scheme game nodejs socket database Lab #4 SMS with FaaS Learning objectives

$25

File Name: Scheme_game_nodejs_socket_database_Lab_#4__SMS_with_FaaS_Learning_objectives.zip
File Size: 715.92 KB

5/5 - (1 vote)

Lab #4 SMS with FaaS Learning objectives
Create a serverless (FaaS) SMS bot using Twilio
Use a microservice (DBaas) to store application data
Requirements
We will create an SMS bot that when texted will modify a Redis database and send responses, and will also access at least one 3rd party API. You will also create an accompanying NodeJS application that continuously checks for changes to the Redis database, and will update a front-end website and SQLite database in response.
Your bot must include at least one command that accesses at least one 3rd party API. The precise syntax for the command is for you to choose, but you must document it. The API can be your choice weather data, video game data, social media data, anything really, except the Yelp API, that isnt allowed for this one because weve already used it. A list of possible APIs is available here, though youre free to use APIs that arent on this list. The command that accesses the API has to allow the user to specify an argument or arguments, for example latitidue/longitude, or a search string, etc.
Your bot must include one status update command Update Status Message where Update is the name of the command, Status is a one- word string argument (e.g. Warning, Error, etc.), and Message is a string (e.g. some sentence describing something). This command should insert this data into a Redis database somehow (exactly how, is up to you).
Your bot most include one help command that is invoked when the user sends a message containing exactly the text helpme. This command should reply back to the user with as brief as possible a list of the available commands. If the user enters the text help command, where command is the name of the command (e.g. help search), the bot should respond with instructions on how that specific command works (including one example of how it works).
Note that your bot does not need to account for different users using the bot from different phone numbers. It is possible to check the number of the person attempting to use the bot, and alter the behavior accordingly, and if you wish to do that, youre free to do so. But you can assume that the bot has only one user, and that any number accessing the bot is that one user.
All of the above bot code can be put directly into your Twilio FaaS using their web interface. You must also create a filecalled server.js which runs an Express web server that makes a webpage accessible at http://localhost:3000/dashboard. Your server.js file should regularly check the Redis database to see if any new status update commands have been received. If a new status update command has been received, a record should be inserted into an SQLite database table identical to that in Lab #1 with the status and message given by the user of the SMS bot, as well as a timestamp for the current date/time. When a user first accesses http://localhost:3000/dashboard they should initially be presented with a list of all status update records in the SQLite database (ordered most recent to least recent). When additional status update commands are found by the server via its regular checking of the Redis database, websockets should be used to communicate this new status update information to the front-end dashboard which should present an updated list containing the new status update.
Bot Documentation
Important: For this lab, given its open nature, this part is as important as the code you write. I wont award full marks if I cant use the bot successfully by using your documentation.
Create a file called command.txt, you can document your third-party API SMS bot command in this file. When documenting your third-party API command, give the following:
A general definition of the command, for example, Weather Address
A description of what the command does, for example, Reports the weather for the given address
At least two example usages of the command, for example, Address Hamilton, Ontario, Address Toronto, Ontario
At the very top of the file, list the phone number where your SMS bot is hosted. I will test it using this phone number.
Hints
You can find an entire list of publicly available APIs here: https://github.com/toddmotto/public-apis.
Submission instructions
When you have completed the lab, put your source files and commands.txt file in a folder called lab4.zip.You can copy your Twilio FaaS source into a file called source.js.
Important: I will need your account username/password so that I can add my phone number to your service (it requires verification). So in addition to these files, submit a file called account.txt with your Twilio username/password (and of course, pick a password you dont mind me seeing). Ensure that your service has been deployed and is available by texting the phone number provided to you by Twilio. I will test it directly using this phone number.
Marking scheme
Server

20
Dashboard
20
API command
20
Status update command
20
Help command
10
Accessible at number
10
T otal
/100

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] Scheme game nodejs socket database Lab #4 SMS with FaaS Learning objectives
$25