aws lex human handoff / intervene - amazon-web-services

So, I am building a solution for web and mobile platforms which provides users with some screens from where the data from the Database is retrieved and inserted by some forms. One of the core features of the application is a chat-bot with supervised learning.
As per my understanding of the Lex API, it can share the current
websocket connection with other aws-services like API Gateway and Lambda.
Also, I have come to know that the human handoff is not provided out
of the box in Lex like DialogFlow API and Azure Bots.
Therefore, I am planning to share the same websocket opened by the Lex API for interacting with the user with the API Gateway ( as it supports websockets ) and thereby creating a human handover.
Please suggest whether there is a better approach to this problem's solution or I am on the right path ?
P.S. My Application stack is Nodejs and Angular based and following is my app's architecture.

Related

Alexa Skill Integration Testing using Postman

I am in the process of writing a Voice app for Google Home (using DialogFlow) and Amazon Alexa (AWS).
Both voice apps back onto a custom .net WebAPI that serves the answers.
We have written a series of integration tests that test both the Natural Language Processing (Deriving the Intent) and also the backend service. DialogFlow provide API access to their NLP making these integration tests pretty easy to set up.
I am in the process of porting the app to Alexa via AWS and want to perform the same set of integration tests against the AWS NLP but cannot see if this is possible. Most of the testing for Alexa seems to be centered around testing Lambda functions (which we are not using). Does anybody know if it is possible to interact directly with an Alexa skill restfully?
Yes, it is possible, but a little cumbersome.
Alexa Skill Management API (SMAPI) provides RESTful HTTP interfaces for programmatically performing Alexa skill management tasks, such as creating a new skill or updating an interaction model.
You'll need to create a Amazon app to use it and send requests adding Authorization header with all requests.
Docs for implementing this can be found here

Firebase-powered app with web service code

I am planning to use Firebase database and want to know how it fits in to the following scenario.
lets say I have a browser app, android app / iOS which uses Web Services to get / insert data, web services talks to the Data Base and returns data to the client.
This way I have to write code once in my web services and all the clients use that to retrieve and insert data to the database.
If I want to use Firebase, will I be following the same approach of having webservices between the client's and the Firebase DB.
I have done some sample Firebase examples where it it gets data from database directly without web services and in this approach we have to write our logic on each client (Web browser/ android app/ iOs app).
I have looked into this article
https://firebase.googleblog.com/2013/03/where-does-firebase-fit-in-your-app.html?showComment=1480073224245#c464815735109872173
The Pattern 2 has the server concept but that does not look appropriate in my scenario.
Can I have my web service and Firebase database and get data Synchronization capabilities.
Correct me if I am wrong and please suggest the approach I need to take.
Thank you for your valuable suggestions in advance.
Thanks & regards,
Rao Burugula
The article you link gives you the most common options for integrating Firebase into your app. Pattern 2 is the easiest way to use the Firebase Database and run your own server-side code:
In this model the Firebase Database sits between the app on the user's device and your back-end code. By using this model, you can still get all the benefits of the realtime synchronization, security rules and scalability, but also have back-end code that runs in a trusted environment.
Of course you can also go for a more traditional three-tier model, where your app server sites between the devices and the database. But in that case the Firebase database won't have direct interaction with your app anymore, so you'll have to take care of the realtime aspects of the synchronization (if you want those) in your own code.
I also recommend reading the Google Cloud documentation on using the Firebase Database and App Engine's Flexible Environments. The architecture described there is the same, but a bit more up-to-date:

Windows Phone 8 secure connection through Azure, to an on-premise web service

I am working on a WP 8 app which I would like to connect to an on-premise(local) web service. I have managed to do so using simple BasicHttpBinding without secuirty and Azure Service Bus Relay, but i cant manage to make a secure connection. WP 8 only support BasicHttpBinding, and thats my biggest problem so far.
I understand that Azure mobile service is an efficent and easy way to securly connect your WP 8 app to the cloud. Is it possible to access an on-premise web service through Azure mobile service? And if possible, could it be done without exposing all the content of the local service publically via Azure Service bus relay?
You should be able to do this securely from WP8 -- I'm not quite sure why it's not working -- but even if you had to roll something yourself, it should be possible (example, check out this post from Michael Collier on doing something similar: http://michaelcollier.wordpress.com/2011/08/19/azure-sb-and-wp7/)
To the question, though, WAMS (Windows Azure Mobile Services) is definitely easy to use, but it wouldn't be feasible to do what you want -- that is, to be a public endpoint in this fashion. In short, WAMS gives you an easy to use CRUD interface to data that happens to also expose features for authentication and notifications, and at the same time gives you some server-side javascript to do custom work -- such as calling out to other services, sending emails or notifications, etc.
But, each request into WAMS is essentially mapped to a CRUD operation on a database table. While you could likely 'inject' a simple call, this isn't what you want. It sounds like using the service bus is the right way to do this and should be possible...

Invoking a web service API by using Text Message

Now I am creating an iOS application. I also implemented some web services. My requirement is : "The user should be able to call a web service API by Sending a Text Message(SMS)". After a lot of research I found out that there a provider called Clickatell(http://www.clickatell.com/). But I don't know how can I configure it? Please help me in configuring this. Or Is there any other APIs or SMS gateways providing this service?
Disclaimer, I do developer evangelism part time at Nexmo.
Here are a few SMS APIs that I've used (I've not really used Clickatell, but I've gone through the signup process, and the following APIs seem a lot simpler to use):
Nexmo
Twilio
Tropo
All three APIs are straight forward REST/HTTP APIs.
You can call the API directly from your mobile application, however, you should consider if you really want to then compile your API credentials into your application. It may be better to host a kind pf proxy that your application uses - here's some example code used as a verification service, but it's essentially the same concept: https://github.com/Nexmo/Verify
I would suggest to take a look at Mogreet's new Developer Web Site
Very easy to use REST/HTTP APIs and very powerful. It supports sending SMS/MMS with awesome quality for all media types.

JMS, Message Queing Service, ESB related question

Assume there are 2 web services A and B setup in SOA infrastructure.
Web services A depends on information that is available from the locally installed Desktop application (its a legacy application based on C++ programming and provides C++ API to give the information needed by web service A).
The scenario is this: Human actor (which can be considered as Consumer of web service B)logs into a website and clicks a button which requests the service provided by web service B. As part of this request, his ID is sent. Web service B sends request to web service A with this ID. Web service A uses this ID to somehow determine a way to talk to locally installed desktop application of the human actor who originated the request.
The main problem how can web service A connect to desktop application and get the information in a reliable way using SOA infrastructure.
Assume that everything in this SOA is Java based except the desktop application.
The desktop application is basically like a CRM application with its own internal database and not traditional database like MySQL. It provides just basic textual information about the human actor and about the customer(s) of that human actor in his installed CRM desktop application.
I do want to use SOA related technologies even though it may be more complicated.
Given above details:
How can I use JMS to solve this problem?
If JMS is not the right solution, what about ESB and how can I use ESB to solve this problem?
The communication with the desktop application will greatly be determined by what different methods the application is capable of performing. If the application has a database backend, an ESB can facilitate communication with predefined adapters for the specific database being used. If the application has an api that can be tapped programmatically, that is a method as well. I am not sure JMS would be the appropriate solution since given your use case you would want a synchronous reply. Putting JMS in the middle (somehow) will break that reply and rather return an asynchronous response.
I would recommend looking more into the functionality available in the desktop application and with your findings start with evaluating ESB functionality. An ESB may be overkill for this use case but if you plan to do more operations like this it may become valuable.
I think the problem boils down to a Java Web Service A, having a requirement to talk to a C++ desktop application to get user details.
If the Desktop application is able to use JMS using Stomp etc, ActiveMQ or HornetQ maybe used. This also allows you to scale A into multiple instances across many machines, and use JMS to request user information from the Desktop application.
Another option is to expose a simple API (REST, TCP etc) on the Desktop application and make the Web Service A talk to the Desktop application using that. Again, you could distribute the A into multiple instances for scalability.
You can use an ESB to convert a REST call to TCP, or a SOAP to JMS etc. Basically any-to-any conversion. The Free and Open Source ESB UltraESB [http://adroitlogic.org] contains many examples, and is lightweight (~35MB) so the 'overkill' will be minimal compared to > 300MB+ resource hungry ESBs