Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
How Watson, Bluemix, Cloudant, and
XPages Can Work Together In A Real
World Application
Frank van der Linden, elstar IT
Fu...
Me
• Freelance Full stack Java developer
• Owner of elstar IT
• Curious of new technology
• IBM Champion 2013, 2014 and 20...
How do we proceed
• HR Assistant
• Running it on IBM Bluemix
• Store it in Cloudant
• Analyse it with IBM Watson
• Show it...
HR Assistant
Demo time
Frédéric Dehédin
• At the time of the project: Senior Application developer
at Belsoft Collaboration AG
• @fdehedin
• http...
Facts
• Winner of the ICS Developer Competition 2016
• Runs on the XSP runtime on IBM Bluemix
• Store all the data in Clou...
Add ons
• Cloudant connector OSGi plugin
• Take out the security issue
• Storing in and retrieving from Cloudant. JSON <—>...
Add ons
• Jackson Mapper OSGi plugin
• Take out the security issue
• Used with the IBM Watson services
• Conversion of JSO...
Roadmap
Running it on IBM Bluemix
Overview
• Bluemix is IBM PaaS, with various services
• The services we used.
Credentials
Deploy to IBM Bluemix
• Fill the Bluemix Manifest file under
Application Configuration
• Will result in a yaml file
Deploy to IBM Bluemix
• Set location of deployment
• Add shared-plugin folder
• Add the OSGi plugins
Deploy to IBM Bluemix
• Deploy Application
Store it in Cloudant
What is Cloudant
• It is the cloud version of CouchDb
• It is document based
• CouchDb is created by Damien Katz
• Cloudan...
What is Cloudant
• Data stored as JSON
• View and Search ‘formula’ defined in javascript
• Replication
• Tasks
• Build in A...
Cloudant database
Design document
• Special type of document
• Holds javascript for View and FT Search definition.
• It is JSON everywhere.
• _rev and _id are reserved parameters.
• doc{}, is the actual data from application
Document
Attachment @ Cloudant
• Stored as base64 encoded String
• Can be as standalone
• Or as part of Document (we choose this wa...
Attachment @ Cloudant
• AttachmentDAO
Attachment @ Cloudant
• AttachmentController
• Convert upload to Attachment
object
Attachment @ Cloudant
• ControllerBase
• All controllers can use these methods
Attachment @ Cloudant
• Servlet is called in application for download
• base64 data for the image tag
Analyse it with IBM Watson
Watson API explorer
• Very useful to test input and see what is returned
Services we used
• Tone analyser, to get the tone of the text
• Personality Insight, to determine the personality of the j...
tone analyser schema
Tone analyser
• The same structure to call the Watson services
Tone analyser
• ToneAnalyzerRequest contain the text to analyse
• ToneAnalyzerInjector gets text from model class
Tone analyser
• Post the data to IBM Watson service (1)
• Convert the response back to Java class (2)
1
2
Tone analyser
• ToneAnalyzerResponse holds the results
• Use @annotations from Jackson to map
JSON to properties
• Result ...
Show it with charts
ChartJS
• Open source HTML5 javascript based
• Responsive
• DataSets = Array of Objects
ChartJS
• Factory to produce the chart data, accepts objects
• Factory set default Chart Type, like Radar or Bar
ChartJS
ChartJS
• Custom control to display data
ChartJS
• Custom control to display data.
Lessons learned
Lessons learned
• No Single Sign On service on all datacenters
• Manifest yaml file and GIT are not an happy couple
• API’s...
Lessons learned
• There is no RichText on the web, it is HTML
• Handling attachments on Cloudant was a challenge. Took som...
The future
The future
• Move on as commercial service / solution (in progress)
• Let it work with Domino authentication (done)
• Chan...
Questions
Resources
• HR Assistant on Bluemix
• https://hrassistant1.mybluemix.net/
• HR Assistant code on GitHub
• https://github.c...
Resources
• OSGi Cloudant connector
• https://bitbucket.org/flinden68/cloudant-connector
• OSGi Jackson JSON Wrapper
• http...
Reach out to me
• @flinden68
• http://www.elstarit.nl
• flinden68@elstarit.nl
• https://nl.linkedin.com/in/flinden68
DEV03 - How Watson, Bluemix, Cloudant, and XPages Can Work Together In A Real World Application
Upcoming SlideShare
Loading in …5
×

DEV03 - How Watson, Bluemix, Cloudant, and XPages Can Work Together In A Real World Application

770 views

Published on

Learn how we build the HR Assistant application on Bluemix and integrate Watson services

Published in: Software
  • Be the first to comment

DEV03 - How Watson, Bluemix, Cloudant, and XPages Can Work Together In A Real World Application

  1. 1. How Watson, Bluemix, Cloudant, and XPages Can Work Together In A Real World Application Frank van der Linden, elstar IT Full stack Java Developer DEV03 Engage 2017
  2. 2. Me • Freelance Full stack Java developer • Owner of elstar IT • Curious of new technology • IBM Champion 2013, 2014 and 2017
  3. 3. How do we proceed • HR Assistant • Running it on IBM Bluemix • Store it in Cloudant • Analyse it with IBM Watson • Show it with Charts • Lessons learned • The future
  4. 4. HR Assistant
  5. 5. Demo time
  6. 6. Frédéric Dehédin • At the time of the project: Senior Application developer at Belsoft Collaboration AG • @fdehedin • http://www.fdehedin.ch/
  7. 7. Facts • Winner of the ICS Developer Competition 2016 • Runs on the XSP runtime on IBM Bluemix • Store all the data in Cloudant • Analyse jobs and job applications with IBM Watson • Backend is pure Java, no Java Notes objects
  8. 8. Add ons • Cloudant connector OSGi plugin • Take out the security issue • Storing in and retrieving from Cloudant. JSON <—> POJO • Can be accessed from Java backend. • Do the heavy lifting. Don't reinvent the wheel.
  9. 9. Add ons • Jackson Mapper OSGi plugin • Take out the security issue • Used with the IBM Watson services • Conversion of JSON to POJO • Makes @Annotations available in Java back end
  10. 10. Roadmap
  11. 11. Running it on IBM Bluemix
  12. 12. Overview • Bluemix is IBM PaaS, with various services • The services we used.
  13. 13. Credentials
  14. 14. Deploy to IBM Bluemix • Fill the Bluemix Manifest file under Application Configuration • Will result in a yaml file
  15. 15. Deploy to IBM Bluemix • Set location of deployment • Add shared-plugin folder • Add the OSGi plugins
  16. 16. Deploy to IBM Bluemix • Deploy Application
  17. 17. Store it in Cloudant
  18. 18. What is Cloudant • It is the cloud version of CouchDb • It is document based • CouchDb is created by Damien Katz • Cloudant is bought by IBM • Is like MongoDb or NSF a NoSQL datastore
  19. 19. What is Cloudant • Data stored as JSON • View and Search ‘formula’ defined in javascript • Replication • Tasks • Build in API • No annoying limitations
  20. 20. Cloudant database
  21. 21. Design document • Special type of document • Holds javascript for View and FT Search definition.
  22. 22. • It is JSON everywhere. • _rev and _id are reserved parameters. • doc{}, is the actual data from application Document
  23. 23. Attachment @ Cloudant • Stored as base64 encoded String • Can be as standalone • Or as part of Document (we choose this way) • Store id as attachmentId, so it can be retrieved when needed
  24. 24. Attachment @ Cloudant • AttachmentDAO
  25. 25. Attachment @ Cloudant • AttachmentController • Convert upload to Attachment object
  26. 26. Attachment @ Cloudant • ControllerBase • All controllers can use these methods
  27. 27. Attachment @ Cloudant • Servlet is called in application for download • base64 data for the image tag
  28. 28. Analyse it with IBM Watson
  29. 29. Watson API explorer • Very useful to test input and see what is returned
  30. 30. Services we used • Tone analyser, to get the tone of the text • Personality Insight, to determine the personality of the job applicant • AlchemyLanguage, to get the keywords from the Job and Job application (now "Watson Natural Language Understanding”)
  31. 31. tone analyser schema
  32. 32. Tone analyser • The same structure to call the Watson services
  33. 33. Tone analyser • ToneAnalyzerRequest contain the text to analyse • ToneAnalyzerInjector gets text from model class
  34. 34. Tone analyser • Post the data to IBM Watson service (1) • Convert the response back to Java class (2) 1 2
  35. 35. Tone analyser • ToneAnalyzerResponse holds the results • Use @annotations from Jackson to map JSON to properties • Result is the source of the charts
  36. 36. Show it with charts
  37. 37. ChartJS • Open source HTML5 javascript based • Responsive • DataSets = Array of Objects
  38. 38. ChartJS • Factory to produce the chart data, accepts objects • Factory set default Chart Type, like Radar or Bar
  39. 39. ChartJS
  40. 40. ChartJS • Custom control to display data
  41. 41. ChartJS • Custom control to display data.
  42. 42. Lessons learned
  43. 43. Lessons learned • No Single Sign On service on all datacenters • Manifest yaml file and GIT are not an happy couple • API’s are not consistent across Watson services • Cloudant is a very reliable, flexible and fast NoSQL datastore • IBM Watson services are really powerful.
  44. 44. Lessons learned • There is no RichText on the web, it is HTML • Handling attachments on Cloudant was a challenge. Took some time get a robust solution. • BTW the way, we won the competition ;-)
  45. 45. The future
  46. 46. The future • Move on as commercial service / solution (in progress) • Let it work with Domino authentication (done) • Change AlchemyLanguage service to Natural Language Understanding service. (done) • Add Document Conversion service (in progress) • Add support for more NoSQL datastores (NSF done, MongoDb in progress) • More to come…..
  47. 47. Questions
  48. 48. Resources • HR Assistant on Bluemix • https://hrassistant1.mybluemix.net/ • HR Assistant code on GitHub • https://github.com/flinden68/HR-Assistant • IBM Watson services • https://www.ibm.com/watson/developercloud/services-catalog.html • IBM Cloudant documentation • https://docs.cloudant.com/ • HR Assistant Demo • https://youtu.be/yM5Foxn9Fvg
  49. 49. Resources • OSGi Cloudant connector • https://bitbucket.org/flinden68/cloudant-connector • OSGi Jackson JSON Wrapper • https://bitbucket.org/flinden68/jackson-json-mapper-plugin • ChartJS • http://www.chartjs.org/ • Watson API Explorer • https://watson-api-explorer.mybluemix.net/
  50. 50. Reach out to me • @flinden68 • http://www.elstarit.nl • flinden68@elstarit.nl • https://nl.linkedin.com/in/flinden68

×