I want to create a Lex bot that would send a welcome message every time the chat gets opened. Does anyone know if this is possible?
It should depend on the channel you are going to use, but I know that Lex itself cannot initiate a conversation. Also, channels like Facebook Messenger highly discourage bots that initiate a chat because it could become flagged as a spam bot.
However, you could definitely build a workaround to do it, but that will have to be channel specific and outside of Lex. Perhaps as simple as detecting a user opens a chat, and send a "hello" to Lex from that user yourself so that Lex replies with the welcome message. But something like that depends completely on the channel you use.
Word of Warning: Initiating a conversation may violate a user agreement or developer guidelines of Amazon Lex, or the chat channel your bot uses, so I don't suggest doing so.
Related
Is there an open source project that deals with basic reporting functionality for Mailgun. All I want to do is download my permanent failures and export to a human readable file. Mailgun has an API that I can write code for that but I would like to avoid reinventing the wheel.
See github.com/kehers/suet (disclaimer: I built this). It gives you a detailed analytics dashboard and breakdown of email performance, users, mails and feeds. You can also connect Slack and get complaints, bounces and failures send to a channel.
A managed version is available at suet.co
As mentioned here
https://github.com/blog/1174-auto-updating-comments
What is the technology behind this? If I've to add this feature in a Django powered web app, what should I use and study?
Looking at network tab it looks like they (at least with chrome) are using HTML5 Server Sent Events.
So practically the browser subscribes to a event stream and the web server just sends messages back.
I am not an expert but I guess on the server side you need to be able to keep an open connection that streams the events to the client.
I found an implementation of SSE for python here: https://github.com/niwibe/sse and a django implementation on top of that: https://github.com/niwibe/django-sse
I did not use them (yet) on any production so I suggest them only as study / poc material :)
I have built a website in django framework. It has a lot of features such as blog, discussion forum, basically there are lots of ways users can interact. I have built a basic notification framework where a user gets notified when somebody comments on their blog, or answers their question in the forum.
Since the notifications are stored in db, new notifications are displayed only when a page refresh is done. I would like to make it real time using some push server using something like long polling technique.
I have come across NowJS which seems to be pretty handy for this, but in all the examples that are given I could not see any example where there was any interaction with the database. In all the cases there was some information sent by one client and it was displayed to one or more clients.
What I actually want to do is to call a function using NowJS, and make it go to sleep until a new notification is added in the database. When a new notifications comes in the server responds back with the notification and a new request is done immediately.
I can figure out all other parts except how to access the database from Node server that is used by NowJS. Any help or guidance is appreciated.
Either:
Have your node.js server make an http call to the Django server via something like a REST api to get info back
Google for a database connector for node.js - I found enough evidence for a MySQL one, and rumours of a PostgreSQL one. Note this won't get you access to the Django DB API, so you'll have to work out all your related queries and craft your SQL by hand (make sure Bobby Tables doesn't bother you: http://www.xkcd.com/327)
Re-implement the NowJS protocol so that you can write a django server for it, keeping the same JS client code on the clients... but then you may as wel.....
...use django-socketio http://blog.jupo.org/2011/08/13/real-time-web-apps-with-django-and-websockets/
I have a C++ application that uses curl to go to log in to a website, get information, and then parse the information. Now I want to send myself an alert to my phone via sms or e-mail or I can I also send the alert to twitter and then get a notification that way.
My environment is windows vista and I use MSVS 8.
I just need something easy that i can throw together quick to notify myself when something on the webpage changes.
If there's anything that will work with curl (POST/GET), even better because I am already familiar with that.
thanks!
Twitcurl provides a Twitter API on top of cURL.
I have a little (maybe the answer could require a book) question about web services and server side programming.
But first, a little preamble.
Recently we have seen new kind of applications & games using some kind of real-time interaction with a database, or more generally, with other users. I'm talking about shared drawing canvas, games like this , or simple chats, or the Android app "a World of Photo", where in real time you see who is online, to share your photos, etc.
Now my question:
Are all these apps based on classic TCP client/server architectures or is there a way to make them in a simpler way, like a web platform like LAMP?
What I'm asking, in other words is:
Can PHP+MySQL (or JSP, or RoR, or any other server language) provide a way to make online users communicate in real time and share data? Is there a way to do that without the ugly and heavy mechanism of temporary tables?
Thank you! I hope I've been clear.
There is this crazy black magiccy thing called P2P (peer-to-peer) that makes all of this possible.
I don't know, but I don't think it will catch on.
8-D
EDIT: CRAP....I didn't see the date the question was posted.
I can't believe it. This is my third consecutive question that involves XHR Long Polling aka Comet programming. Daliz, what you want is possible, easy and been done by various websites using XHR Long Polling.
The concept: Normally, web browsers send a request to the server, server sends a response back and closes the connection to the browser. Instead of closing the connection at the end, Comet programming keeps the connection open. So, the connection between the browser and the server is still open. So, in simple terms, when we want to connect to Alice, we find the thread connecting to her browser and send the message to Alice.
Facebook chant uses the same concept. Please read This.
If your client is not a web browser but some web service, then it is more easy. Web services unlike web browsers have an address. So, client service calls the main service with a callback URL and registers to a particular event. When that event happens, like someone drawing something, main service will use the callback url of the client service to notify about that action.
On sharing data like Photos or another binary data: it is also possible as the input stream from one user is send to all other related users. So a simple String or a photo can be shared. But it also means the user on the receiving end of the photo will not have a message like "xxx has sent you a photo. Click here to download it". They will simply get a "Do you want to open or save this file" option.