Slide 1

Slide 1 text

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

Slide 2

Slide 2 text

Agenda ● Introducing Alfresco ● Making the case for content management ● Best practices: standards and platforms ● Leveraging the Alfresco Public API ● Live example

Slide 3

Slide 3 text

The open platform for business-critical content management and collaboration.

Slide 4

Slide 4 text

Alfresco by the numbers 4 billion files 7 million users 3,000 companies 180 countries

Slide 5

Slide 5 text

do and share great work.

Slide 6

Slide 6 text

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.

Slide 7

Slide 7 text

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

Slide 8

Slide 8 text

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!

Slide 9

Slide 9 text

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

Slide 10

Slide 10 text

Let's build it ourselves! Pasukaru76 (cc attribution) http://www.flickr.com/photos/pasukaru76/4277763808/

Slide 11

Slide 11 text

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

Slide 12

Slide 12 text

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.

Slide 13

Slide 13 text

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!

Slide 14

Slide 14 text

The optimistic scenario gobucks2 (cc attribution non-commercial share-alike) http://www.flickr.com/photos/69331170@N00/2854583096

Slide 15

Slide 15 text

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

Slide 16

Slide 16 text

Best Practice: The Platform Approach

Slide 17

Slide 17 text

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

Slide 18

Slide 18 text

Introducing the content repository Content = a file + metadata File system ● Content binaries ● Search indexes Database ● Relations (associations) ● Metadata Repository ● Abstraction layer

Slide 19

Slide 19 text

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

Slide 20

Slide 20 text

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

Slide 21

Slide 21 text

General architecture Web Applications Knowledge Portals Web Services Virtual File System High Availability Business Process Engine CRM Portal Server App Server

Slide 22

Slide 22 text

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

Slide 23

Slide 23 text

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

Slide 24

Slide 24 text

and

Slide 25

Slide 25 text

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

Slide 26

Slide 26 text

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

Slide 27

Slide 27 text

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)

Slide 28

Slide 28 text

The beauty of CMIS ? Presentation Tier Content Services Tier ? Enterprise Apps Tier REST SOAP

Slide 29

Slide 29 text

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!

Slide 30

Slide 30 text

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

Slide 31

Slide 31 text

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 ● …

Slide 32

Slide 32 text

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

Slide 33

Slide 33 text

Content-as-a-Service "Look Ma! No server!"

Slide 34

Slide 34 text

No content

Slide 35

Slide 35 text

Folder, file, content and metadata manipulation and search Networks, sites, people, comments, tags, activities, …

Slide 36

Slide 36 text

Getting Started 1. Understand OAuth2 2. Register for developer keys 3. Grab a client-side CMIS library or mobile SDK 4. Start coding!

Slide 37

Slide 37 text

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"

Slide 38

Slide 38 text

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

Slide 39

Slide 39 text

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

Slide 40

Slide 40 text

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

Slide 41

Slide 41 text

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

Slide 42

Slide 42 text

Examples

Slide 43

Slide 43 text

My setup ● Debian Mint Wheezy ● Python 2.7.3 ● VirtualEnv

Slide 44

Slide 44 text

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

Slide 45

Slide 45 text

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

Slide 46

Slide 46 text

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.

Slide 47

Slide 47 text

Questions?

Slide 48

Slide 48 text

Richard Esplin [email protected]

Slide 49

Slide 49 text

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.