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
Tweet

More Decks by Richard Esplin

Other Decks in Technology

Transcript

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

    management • Best practices: standards and platforms • Leveraging the Alfresco Public API • Live example
  2. 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.
  3. 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
  4. 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!
  5. 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
  6. 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
  7. 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.
  8. 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!
  9. 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
  10. Introducing the content repository Content = a file + metadata

    File system • Content binaries • Search indexes Database • Relations (associations) • Metadata Repository • Abstraction layer
  11. 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
  12. 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
  13. General architecture Web Applications Knowledge Portals Web Services Virtual File

    System High Availability Business Process Engine CRM Portal Server App Server
  14. 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
  15. 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
  16. and

  17. 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
  18. 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
  19. 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)
  20. 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!
  21. 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
  22. 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 • …
  23. 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
  24. Getting Started 1. Understand OAuth2 2. Register for developer keys

    3. Grab a client-side CMIS library or mobile SDK 4. Start coding!
  25. 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"
  26. 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
  27. 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
  28. 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
  29. 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
  30. 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
  31. 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
  32. 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.
  33. 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.