Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Solving Business Problems with Content-as-a-Service

Solving Business Problems with Content-as-a-Service

Introduction to Alfresco Public APIs.
Presented at the Kansas City Developers Conference, 2013.


Richard Esplin

May 04, 2013


  1. Solving Business Problems with Content-as-a-Service Richard Esplin Community Technology

  2. Agenda • Introducing Alfresco • Making the case for content

    management • Best practices: standards and platforms • Leveraging the Alfresco Public API • Live example
  3. The open platform for business-critical content management and collaboration.

  4. Alfresco by the numbers 4 billion files 7 million users

    3,000 companies 180 countries
  5. do and share great work.

  6. How do we deliver? Tablet First Focused on enabling the

    content device of the future. Open Source Free access to the source code for developers. Open Standards WebDAV, CIFS, SharePoint Protocol, CMIS. Choice Any tool, any device, in the cloud, on-premise, or both. Flexibility Customizable, extensible, and easy to integrate.
  7. Business Problems Often Involve Content Data • Don't mistake Code

    for Content Unstructured Data • Structured data works well in a relational data store, XML store, or key-value store Unstructured Binary Data • Unstructured non-binary data works well in source control Examples: • Audio, Video, Images, Office Documents, Engineering Files, Reports
  8. The business is saying . . . I've got a

    ton of files, I've got people that produce and consume them, I've got systems that use them, I want to make it easier!
  9. A Few Examples Contract negotiation, creation, and review Case management

    Sales / Marketing collateral creation and distribution Media management and distribution Architectural plan creation, review, and archiving Loan processing Invoicing
  10. Let's build it ourselves! Pasukaru76 (cc attribution) http://www.flickr.com/photos/pasukaru76/4277763808/

  11. DIY approach seems simple . . . “This is simple

    stuff.” Grab a web-application toolkit Favorite front-end / presentation framework Store a bunch of files Relational Database • Data Model / Metadata • Comments / Ratings • Tagging / Categorization
  12. Relational may not cut it Good at text and numbers.

    Not so good at binary. Good at static table definitions. Not so good at dynamic aspects. Size limits. Random seek (streaming). Search: Some relational databases can index into blobs, but not all.
  13. Once files are figured out . . . Ensure security

    Execute a workflow Transform the content between types Schedule a job Provide shared drive access Versioning Replication API Access Integrate with authoring tools Lots of custom code!
  14. The optimistic scenario gobucks2 (cc attribution non-commercial share-alike) http://www.flickr.com/photos/69331170@N00/2854583096

  15. The pessimistic scenario http://commons.wikimedia.org/wiki/File:Professor_Lucifer_Butts.gif

  16. Best Practice: The Platform Approach

  17. Platform approach The common problems have been solved Content Platform

    = Repository + Services • Find a platform that meets your needs • Extend the platform with your own business logic • Customize the UI that the platform provides • Or write your own front-end using whatever language or framework makes sense Meets your current needs while providing a roadmap for the future
  18. Introducing the content repository Content = a file + metadata

    File system • Content binaries • Search indexes Database • Relations (associations) • Metadata Repository • Abstraction layer
  19. Components of content-centric systems User Interface Persistence / Data Model

    / Metadata Business Process / Workflow Library Services (Upload / Download, Versioning, Check-in / Check-out) Security Search Scheduler Transformation / Rendition / Thumbnails Tagging / Categorization Authoring tool integration Remote API Transfer / Publication Comments Ratings Activity Streams / Notification Quotas
  20. Evaluating content platforms Agility • Applicable to a broad set

    of solutions vs a vertical specific solution • Scale up, scale down Developer ergonomics • Fast and friendly developer model Open Source • Troubleshooting • Bug tracking • Community Standards compliance • Easier integration • Lower migration costs • Developer familiarity
  21. General architecture Web Applications Knowledge Portals Web Services Virtual File

    System High Availability Business Process Engine CRM Portal Server App Server
  22. Desktop Mobile Social Media Channels Web Services Public Alfresco Cloud

    Corporate Systems Open Web APIs CMIS JSR-168 Connectors WebDAV CMIS CIFS SharePoint Protocol Open Web APIs CMIS CMIS-based Alfresco Sync CMIS WebDAV
  23. Alfresco APIs Repository customizations are Java + XML Server-side Javascript

    works for many tasks Remote API • Public API = CMIS + REST • Custom API: Webscripts – Javascript or Java Source: 96dpi
  24. and

  25. What is CMIS? Content Management Interoperability Services Language-independent, vendor-neutral API

    for content management Least-common-denominator (some vendors have extensions) • CRUD functions for nodes • Check-in / check-out • Associations • Permissions (Access Control Lists) • Policies • Queries • Repository Traversal
  26. What is CMIS? OASIS standard • 30+ ECM vendors agreed

    to implement Two parts • Interoperability through standard SOAP and AtomPub bindings – JSON bindings coming soon • SQL-based query language for rich content repositories Vendor specific extensions may be useful
  27. Use cases Collaborative content creation Portals Client application Integration Mashups

    Embedded content store Client Content Repository Content Repository Content Repository Client Content Repository Content Repository Content Repository Workflow & BPM Archival Documents generation Digital Asset Management (DAM) Web Content Mangaement (WCM)
  28. The beauty of CMIS ? Presentation Tier Content Services Tier

    ? Enterprise Apps Tier REST SOAP
  29. Meet CMIS Client Content Repository Services Domain Model read write

    Consumer Provider Vendor Mapping Content Management Interoperability Services CMIS lets you read, search, write, update, delete, version, control, … content and metadata!
  30. Types Document • Content • Renditions • Version History Folder

    • Container • Hierarchy • Filing Relationship • Source Object • Target Object ACL • Target Object Described by Type Definitions Policy • Target Object
  31. Type Definitions * Custom Type Object • Type Id •

    Parent • Display Name • Queryable • Controllable Document • Versionable • Allow Content Folder Relationship • Source Types • Target Types Policy Property • Property Id • Display Name • Type • Required • Default Value • …
  32. Apache Chemistry Open Source implementations of CMIS Umbrella project for

    all CMIS related projects within the ASF • OpenCMIS (Java, client and server) • cmislib (Python, client) • phpclient (PHP, client) • DotCMIS (.NET, client) De-facto reference for CMIS and used by CMIS technical committee to test 1.1 features
  33. Content-as-a-Service "Look Ma! No server!"

  34. None
  35. Folder, file, content and metadata manipulation and search Networks, sites,

    people, comments, tags, activities, …
  36. Getting Started 1. Understand OAuth2 2. Register for developer keys

    3. Grab a client-side CMIS library or mobile SDK 4. Start coding!
  37. Step 1: Groking OAuth2 Defined in RFC-6749 Secure authentication •

    3rd party apps don't ever see the user's password Unambiguously identifies: • API provider (e.g. Alfresco) • Client application (e.g. your application) • End-user (e.g. an Alfresco Cloud user) "3 Legged Authentication"
  38. tl;dr: Use a library Google OAuth2 Client (lots of languages)

    https://developers.google.com/accounts/docs/ OAuth2#libraries Spring Social (Java) http://www.springsource.org/spring-social
  39. Step 2: Register Your App http://www.alfresco.com/develop • Alfresco Cloud Account

    • Registered Developer Account Add as many applications as you want Key, secret, callback URL
  40. Step 3: CMIS Library OpenCMIS (Java, client and server) cmislib

    (Python, client) phpclient (PHP, client) DotCMIS (.NET, client) ObjectiveCMIS (Objective-C) Other client libraries exist
  41. Considerations Rate limits • Dev: 5 requests / second, 10,000

    requests / day • Prod: 50 requests / second, 100,000 requests / day No limit on number of applications Alfresco Cloud users own their content
  42. Examples

  43. My setup • Debian Mint Wheezy • Python 2.7.3 •

  44. Python # Download Jeff Pott's Python example git clone https://code.google.com/p/alfresco-api-python-examples/

    cloud-demo # Setup Environment cd cloud-demo virtualenv . ./bin/pip install oauth2client ./bin/pip install keyring ./bin/pip install cmislib cp client_secrets.json.sample client_secrets.json [Sign-up at http://developer.alfresco.com] [Create an App] [Callback URL: http://localhost:8080/] [Copy into client_secrets.json your API Key and API Secret] ./bin/python ./get_sites_example.py [Login through the web browser] ./bin/python ./cmis_repository_info.py [No login needed] [Edit cmis_create_document.py: NETWORK, SITE, FOLDER_NAME, FILE] ./bin/python ./cmis_create_document.py
  45. Where to learn more Developer Portal: APIs, SDKs, developer keys

    • http://developer.alfresco.com Alfresco API forum • http://forums.alfresco.com/forum/developer-discussions /alfresco-api #alfresco on freenode IRC Alfresco Technical Discussion Google Group • http://groups.google.com/group/alfresco-technical-discussion DevCon Session • https://devcon.alfresco.com/sanjose/sessions /alfresco-cloud-api-part-one
  46. Alfresco Summit Barcelona, Nov 4 - Nov 7 Boston, Nov

    12 - Nov 15 http://summit.alfresco.com Pre-conference training day. Technical presentations for the developers Business oriented discussions. Demos, use cases, best practices, and more.
  47. Questions?

  48. Richard Esplin richard.esplin@alfresco.com

  49. Attribution and Licensing Copyright 2013, Alfresco Software Some images used

    in this presentation are licensed under the Creative Commons by- attribution non-commercial share-alike license. Original work in this presentation is licensed under the Creative Commons by-attribution license. Thanks to Jeff Potts for allowing me to base my presentation on his.