IBM Watson Dialog Concept - ibm-watson

I am creating Watson Dialog Service. My question is : do we always need the formatted XML file for the input or is there a way by which we can feed data in to Watson from other sources like from several web URLs etc? Because when we will have a huge amount of data how XML will be able to deal and creating of XML files will also be difficult as data grows. Kindly help to understand the basic concept.

It is possible to configure an existing XML Dialog by setting up profile variables.
The Set Profile Variables API call on the Dialog Service is key to priming up a dialog: https://watson-api-explorer.mybluemix.net/apis/dialog-v1#/
Sadly, this is also the most poorly documented call in their docs.
Have a look at the What's in Theaters example from IBM. This is by far the most comprehensive application that shows how their Dialog Service can interact with other Watson enabled services like Natural Language Classifier and also third party apps.
Source Code: https://github.com/watson-developer-cloud/movieapp-dialog
Documnentation: http://www.ibm.com/smarterplanet/us/en/ibmwatson/developercloud/doc/ega_docs/dialog_ega.shtml
Based on this you have to decide if the Dialog service is suitable for your purpose or can play a small role in your larger application when combined with other services.
Conversational Agent Application Starter Kit: https://github.com/watson-developer-cloud/conversational-agent-application-starter-kit

Related

Sending User Input from IBM Watson Assistant to Database or via E-Mail

I want to implement an evaluation feature to my chatbot. User would be able to rate service on a scale of 1 to 5 and make suggestions.
I guess I would use slots for that and store the provided data in a variable.
What would be the easiest way for me to save and access that data later?
Somehow I need to write it to a database and make that database easily accessible. Or ideally having Watson sending an email with the feedback to myself.
Is there an IBM Cloud Database service available for that?
What would be my first steps in order to achieve this? Maybe you have some tips or documentation links, or even code snippets if it's not to much work for you.
I used IBM Cloud functions to get a joke from an API to Watson via webhook. I used code from the internet. So I am somewhat familiar with the concept, but I need more guidance and couldn’t find anything helpful. Basically I know nothing about NODE.
I would recommend the tutorial and its code on how to build a database-driven Slackbot with Watson Assistant. It uses a webhook and Cloud Functions to interact with a database for various actions. You could use that as blueprint for setting up the webhook and see how the database is invoked.
Make sure to secure the webhook. This can only be done using the command line (CLI), see the Cloud Functions doc on securing web actions.

Backend for iOS app

My question is how do i get information from a server to my iphone app. let's assume I have completed my current project I'm working on that only needs data to be uploaded to my application.
I understand there is a database or server I must create but how do I go about creating or modifying one for my needs.
I mainly want to store login information from one user and allow users to search for people who have entered login information (name) to add to a friends lists within the current app.
i think in your case you can use Django-tastypie for backend will be good choice.since using django you can develop it in quick time and the tastypie has api services which can used easily for retrieval and sending data
you can go through this
http://django-tastypie.readthedocs.org/en/latest/
Take a look at services like Stackmob or Parse. These types of service could make it really easy for you to get the server side part of your application up and running. These services would act as your database and also provide an easy api for you to access the server side pieces.

Upload a java/php/python.. application on Force.com

I am doing a survey about cloud paltforms and I have the following the question:
Is it possible to upload a Java/PHP/Python/etc application on Force.com just like you can do with Google App Engine, Heroku, Openshift, etc.?
I looked at the Salesforce website but I couldnt reach a certain conclusion. If I understood correctly, you can upload the code on Heroku and then integrate the application with features of Force.com or something like that.
Could someone shed some light here? Thnx
Force.com has his own language to run custom code on server. This language is called APEX.
Apex is a strongly-typed, object-oriented programming language that
lets you centralize and execute flow and transaction control
statements on the Force.com platform in conjunction with application
calls to Force.com ​APIs. Using syntax that looks like Java and acts
like database stored procedures, Apex lets you add powerful custom
business logic to most system events, including button clicks, related
record updates, and Visualforce pages. Web service requests and
database triggers on objects can also initiate the execution of Apex
code.
More info in the official apex doc
But you can't upload to salesforce servers any kind of standard code like php/python. If you need to develop your own app using php/python/java + salesforce-api's you will have to upload/run this code on your own server.
Heroku and database.com are closer to what you're after. Heroku will let you upload you Python/Java etc. app and then you can easily connect it to Salesforce-style database.
By "style" I mean one in which you can still use this Apex language in triggers for example or expose pieces of Apex to be called via webservices. Such webservices could be used like "stored procedures" in classic solutions - if you'd want to keep part of the logic on the Force.com side rather than in your app.
Martin's answer is very good. If it's not immediately obvious - there's a "vendor lock-in". You can't run this Apex code anywhere else, only on SF server. There's no open source equivalent like LAMP stack for PHP, Tomcat for Java etc.
I think it will make sense for you to read these 2 questions from "related" sidebar: Disadvantages of the Force.com platform and
https://stackoverflow.com/questions/3363333/anyone-moved-off-force-com. They're a bit negative but for your pros/cons type of comparison should give you some highlights.

Silverlight: discover and invoke webservice dynamically

I have a Silverlight application and I would need to be able to get data from practically any webservice. I'd like to provide the functionality for the user to specify an URL of a webservice during runtime, then my app would discover the service and offer some UI to select the webmethod and fill the necessary parameters. Then the user could call the webservice and the app would display the data on the UI.
How can I achieve this?
I assume you mean a SOAP web service? There are many components in .NET that you would normally want to use for this (e.g. WCF's metadata download and client proxy generation functionality, based on CodeDOM, as well as various classes for dealing with WSDL and XSD schema). Unfortunately, these are not present in Silverlight. So, I can think of two approaches:
1) Manually implement a general-purpose SOAP client in Silverlight (i.e. manually implement metadata download, WSDL parsing, XSD parsing, etc) - this will be very difficult unless you can find some existing code for this that you can adapt to Silverlight (and even then it's probably still very difficult)
2) Do it through the server. The server will do all the difficult parts, and Silverlight will just display the UI. Still not an easy task, but possible; You can start by reverse-engineering how the WCF Test Client application works by using Reflector and go from there.

Web Analytics & Stats

We want to add tracking statistics to a web application we are building but are pretty unsure of how to go about it. (i.e. clicks, pageviews, unique visits etc)
Does anyone have any articles on the best way to go about incorporating tracking data into an application ? i.e. javascript tracking or IIS etc ?
We want to add tracking in as a ASP.NET MVC module - but we are unsure as to the best way to actually get the data and essentially 'track' this information ?
If anyone could help out - much appreciated.
Edit: just to be clear, we want to do this in-house and present the stats to our users as an additional fee module?
You can turn on the logging for IIS and then use the SQL Server Report Server Pack for IIS. It comes with many canned reports for your sites stats and then you could take it from there with your own custom reports.
You could also just use log parser to get the stats into a SQL Server DB and then you could use SQL from their to analyse and roll your own app.
Either way, you could modularize this and sell it as an add-on to your customer base.
You could use Piwik, you just need PHP version 5.1.3 or greater and MySQL version 4.1 or greater. As they say in their website, "Piwik aims to be an open source alternative to Google Analytics."
They have a demo on the official website so you can see if it's what you're looking for.
Google analytics is a popular service. You just insert a bit of javascript on every page that contains your sites name and Google tracks the data and provides all the report on a handy web based dashboard.
It's not an ASP.net MVC module like what you mentioned, but it will certain track stats for you and will be a lot simpler to set up than trying to code or integrate anything yourselves.
I'd look at analytics to begin with and only branch out to something more complex if it doesn't meet your requirements.
klabranche provided a holistic answer in terms of using logs of web server. I think using web server log is a a great way to analyse data of your web application.
That being said, depend on your web application and the scope of your analytics, just relay on web server log is not a good way to.
As you may know, web log does not record users behaviors like clicking certain tabs which may not trigger a web server request. Obviously your web log has no idea whether users clicked that tab or not, this may hurt your analyse.
Another you need to know is browser cache, this may create another black hole in your data.
RECAP
If you want to do a holistic analytics, you need to use two approaches, one is JavaScrip tag, another one is web log. Since both of them have shortages, combining them together will give you a complete picture.
Hope this helps

Resources