Mindquarry For Cocoon Users

50 %
50 %
Information about Mindquarry For Cocoon Users

Published on October 5, 2007

Author: lars3loff

Source: slideshare.net

Description

Implementation and architecture notes for the Mindquarry Collaboration Server. Presented at the 7th Cocoon GetTogether in Rome.

1 Mindquarry Mindquarry for Cocoon Users Lars Trieloff, Mindquarry

What is Mindquarry 2 Mindquarry

What is Mindquarry 2 Mindquarry

What is Mindquarry 2 Mindquarry

What is Mindquarry 2 Mindquarry

What is Mindquarry 2 Mindquarry

Short Demo 3 Mindquarry Collaboration Server: Mindquarry Teams, Files, Tasks and Talk Mindquarry Desktop Client: File Synchronization, Task Management Live Sites: http://www.mindquarry.org

Mindquarry Internals 4 Server based on Mindquarry Apache Cocoon 2.2 Apache Jackrabbit Apache Lucene Solr Subversion Apache Web Server mod_perl SubethaSMTP JRuby Client based on Java 5 SWT Svnkit

Architecture 5 Jetty Web App Container Mindquarry

Architecture 5 Jetty Web App Container Mindquarry Apache Cocoon 2.2

Architecture 5 Jetty Web App Container Mindquarry Apache Cocoon 2.2 Team Block

Architecture 5 Jetty Web App Container Mindquarry Apache Cocoon 2.2 Team Block Apache Jackrabbit

Architecture 5 Jetty Web App Container Mindquarry Apache Cocoon 2.2 Team Block Apache Jackrabbit PostgreSQL

Architecture 5 Jetty Web App Container Mindquarry Apache Cocoon 2.2 Team DForms Block Block Apache Jackrabbit PostgreSQL

Architecture 5 Jetty Web App Container Mindquarry Apache Cocoon 2.2 Wiki Block Team DForms Block Block Apache Jackrabbit PostgreSQL

Architecture 5 Jetty Web App Container Mindquarry Apache Cocoon 2.2 Wiki Tasks Block Block Team DForms Block Block Apache Jackrabbit PostgreSQL

Architecture 5 Jetty Web App Container Mindquarry Apache Cocoon 2.2 Wiki Tasks Block Block Team DForms Files Block Block Block Apache Jackrabbit PostgreSQL

Architecture 5 Jetty Web App Container Mindquarry Apache Cocoon 2.2 Wiki Tasks Block Block Team DForms Files Block Block Block Apache Jackrabbit PostgreSQL SVN Repo

Architecture 5 Jetty Web App Container Mindquarry Apache Cocoon 2.2 Wiki Tasks Talk Block Block Block Team DForms Files Block Block Block Apache Jackrabbit PostgreSQL SVN Repo

Architecture 5 SubethaSMTP Jetty Web App Container Mindquarry Apache Cocoon 2.2 Wiki Tasks Talk Block Block Block Team DForms Files Block Block Block Apache Jackrabbit PostgreSQL SVN Repo

Architecture 5 SubethaSMTP Jetty Web App Container Mindquarry Mail Parser Apache Cocoon 2.2 Wiki Tasks Talk Block Block Block Team DForms Files Block Block Block Apache Jackrabbit PostgreSQL SVN Repo

Architecture 5 SubethaSMTP Jetty Web App Container Mindquarry Mail Parser Apache Cocoon 2.2 Wiki Tasks Talk Block Block Block REST Client Team DForms Files Block Block Block Apache Jackrabbit PostgreSQL SVN Repo

Architecture 5 SubethaSMTP Jetty Web App Container Mindquarry Mail Parser Apache Cocoon 2.2 Wiki Tasks Talk Block Block Block REST Client Team DForms Files Block Block Block Apache Jackrabbit PostgreSQL SVN Repo

Architecture 5 SubethaSMTP Jetty Web App Container Mindquarry Mail Parser Apache Cocoon 2.2 Search Wiki Tasks Talk Block Block Block Block REST Client Team DForms Files Block Block Block Apache Jackrabbit PostgreSQL SVN Repo

Architecture 5 SubethaSMTP Jetty Web App Container Mindquarry Mail Parser Apache Cocoon 2.2 Search Wiki Tasks Talk Block Block Block Block REST Client Solr Team DForms Files Servlet Block Block Block Apache Jackrabbit PostgreSQL SVN Repo

Architecture 5 SubethaSMTP Jetty Web App Container Mindquarry Mail Parser Apache Cocoon 2.2 Search Wiki Tasks Talk Block Block Block Block REST Client Solr Team DForms Files Lucene Servlet Block Block Block Index Apache Jackrabbit PostgreSQL SVN Repo

Lessons learned 6 Mindquarry 1. Integrating Jackrabbit and Cocoon 2. Using the Servlet Services Architecture 3. Integrating Solr-based search with Cocoon 4. Tuning AJAX Performance 5. Neat REST Tricks in Mindquarry Code and Libraries available at www.mindquarry.org

Jackrabbit and Cocoon 7 Jackrabbit: JCR/JSR-173 Container Mindquarry Versioned, Typed, Queryable Node Store Ideal for document-centric applications Mindquarry's Enhancements com.mindquarry.jcr.xml.source.JCRNodeSource an JCR-to-XML mapping com.mindquarry.jcr.jackrabbit.xpath.JaxenQueryHandler a XPath 1.0 Query handler for Jackrabbit based on Jaxen Mindquarry's most popular Pitfalls Having many small nodes in JCR affects performance Mapping Business objects to JCR is no good idea There is no easy way to limit the result size of queries

Mapping XML to JCR 8 Mindquarry rep:root nt:unstructured / xt:element xt:text nt:folder * nt:folder STRING xt:characters users images xt:element: child nodes of type xt:element (XML elements) xt:element: child nt:file properties of type nt:file STRING (XML attribute) alex.saar photo154 nt:unstructured Binary Data xt:document xt:document jcr:content nt:resource XML jcr:content xt:element user <user> BINARY jcr:data <name>Alexander Saar</name> <email type=quot;businessquot;>alex@mq.com</name> STRING jcr:mimeType </user> xt:element DATE jcr:lastModified name xt:text text STRING xt:characters = Alexander Saar mix:versionable xt:element email nt:resource xt:text Later text STRING type = business STRING xt:characters = alex@mq.com xt:versionableresource

Using Servlet Services 9 Servlet Services allow running and interacting with Mindquarry arbitrary servlets in the Cocoon quot;Containerquot; What works great Shielding: Conflicting dependencies are no problem Inheritance: Define a parent block that handles all requests that the child cannot handle What needs more handwork Inheritance of resources, e.g. having a common styling resource for all blocks Passing complex requests (e.g. including authentication) between blocks Polymorphy: e.g. a parent block passing sub-requests back to the child

Mindquarry's Servlet 10 Services Mindquarry Solr Tasks Wiki Block Servlet Block Search Team DForms Files Block Talk Block Block Block Block Resources Usage Block Inheritance

Integrating Solr and 11 Cocoon Solr is a REST-based search engine based on Lucene Mindquarry Implemented as a Servlet, easy to embed in Cocoon SolrPost TextFilter XSLT Generator Serializer HTTP POST XML Solr AJAX Lucene Document Servlet Client Index HTTP GET JSON When using with Jackrabbit, Shielding is neccessary com.mindquarry.cocoon.TextFilterGenerator

Tuning AJAX 12 Performance Cocoon uses Dojo, which is very powerful Mindquarry And up to 500 kb big, which need to be downloaded parsed for every page reload better use caching and better do not reload Mindquarry uses following solution special AJAX representation of every resource customization stylesheet (html2lightbox.xsl) Client side: Dojo widget AjaxLink replaces every (internal) link with an AJAX call

REST in Mindquarry 13 What means REST? Mindquarry Everything is a resource and has an URI Different representations of a resource possible HTML, XML, RSS, JSON, Atom... Interaction via GET, PUT, POST, DELETE HTTP HTTP Session-less Accept-Headers Authentication web applications

HTTP Accept-Headers 14 Specify what content the client can process Mindquarry most often HTML, images, but also XML, JSON, etc. Definition: <selector name=quot;RESTquot; src=quot;org.apache.cocoon.selection.RegexpHeaderSelectorquot;> <header-name>accept</header-name> <pattern name=quot;htmlquot;>application/xhtml+xml|text/html|*/*</pattern> <pattern name=quot;xmlquot;>text/xml</pattern> <pattern name=quot;atomquot;>application/atom.xml</pattern> <pattern name=quot;pdfquot;>application/pdf</pattern> <pattern name=quot;opmlquot;>text/x-opml</pattern> <pattern name=quot;icalquot;>text/calendar</pattern> <pattern name=quot;jsonquot;>(text|application)/json</pattern> </selector>

HTTP Accept-Headers 15 Usage Example: Mindquarry <select type=quot;RESTquot;> <when test=quot;jsonquot;> <transform src=quot;xslt/json/log2jsonXML.xslquot;> <parameter name=quot;baselinkquot; value=quot;/tasks/{1}/{2}quot; /> </transform> <transform type=quot;i18nquot;> <parameter name=quot;localequot; value=quot;{request-attr:locale}quot; /> <parameter name=quot;default-catalogue-idquot; value=quot;mindquarryquot; /> </transform> <serialize type=quot;jsonquot; /> </when> <otherwise> <serialize type=quot;xmlquot; /> </otherwise> </select>

HTTP Accept-Headers 16 What to do if my client does not support Accept- Mindquarry Headers? <filter> <filter-name>HttpHeaderSpoofingFilter</filter-name> <display-name>HTTP Header Spoofing Filter</display-name> <filter-class> com.mindquarry.webapp.servlet.HttpHeaderSpoofingFilter </filter-class> </filter> Turns http-*-header request parameters into actual HTTP headers Example usage http://localhost:8888/changes?http-accept- header=application/json

HTTP Authentication 17 HTTP-Basic or HTTP-Digest Authentication Mindquarry cross client support (even non-interactive) no Cookies needed no Sessions needed But: ugly login window

HTTP Authentication 18 Mindquarry Mindquarry's solution combines a servlet filter a Dojo (AJAX) widget <filter> <filter-name>MindquarryAuthenticationFilter</filter-name> <display-name> Mindquarry Authentication filter </display-name> <filter-class> com.mindquarry.user.webapp.AuthenticationFilter </filter-class> <init-param> <param-name>realm</param-name> <param-value>Mindquarry Server</param-value> </init-param> </filter>

Session-less web applications 19 Mindquarry Mindquarry needs no sessions REST architecture HTTP Authentication Easy to cluster But Mindquarry uses CForms, which uses Continuations, which is very close to sessions A better solution: AJAX-based forms construct XML document from form values send PUT, POST or DELETE afterwards But not yet implemented

20 Mindquarry Thank You www.mindquarry.com lars.trieloff@mindquarry.com

Add a comment

Related presentations

Related pages

GT2007Notes - Cocoon Wiki

Mindquarry for Cocoon Users by LarsTrieloff. Cocoon Project Wizard by Jasha Joachimsthal . Cocoon 2.2 Classic by VadimGritsenko. Bye Bye Avalon ...
Read more

Mindquarry For Cocoon Users - Technology - documents.mx

Implementation and architecture notes for the Mindquarry Collaboration Server. Presented at the 7th Cocoon GetTogether in Rome.
Read more

Cocoon | LinkedIn

View 12016 Cocoon posts, presentations, experts, and more. Get the professional knowledge you need on LinkedIn.
Read more

Cocoon. | LinkedIn

View 12183 Cocoon. posts, presentations, experts, and more. Get the professional knowledge you need on LinkedIn.
Read more

Cocoon Powerpoint - Technology - documents.mx

Cocoon Creations - Our Services & Portfolio Comments. ... Mindquarry For Cocoon Users. Cocoon Best Practises. Login or Join. Processing Login successful.
Read more

Cocoon | Reinhard Pötz

Posts about Cocoon written by Reinhard. ... For all Cocoon 2.2 users this feature comes ... The next speaker was Lars Trieloff talking about “Mindquarry ...
Read more

JcrSource - Cocoon Wiki

The Cocoon JCR (JSR-170) Source. Cocoon comes with a JCRSource in 2.1.8 ... A bit of documentation can be found in the Mindquarry architecture ...
Read more

(Www.nyinaymin.org)English for Com Users - Documents

(Www.nyinaymin.org)English for Com Users. by david-hawkins. on Nov 26, 2015. Report Category: Documents. Download: 0 Comment: 0. 214. views. Comments.
Read more