Hippo gettogether april 2012 faceted navigation a tale of daemons

995 views

Published on

A presentatino by wouter Danes

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Hippo gettogether april 2012 faceted navigation a tale of daemons

  1. 1. Faceted Navigation on Related Documents A tale of Daemons Wouter Danes – Hippo Gettogether – 20 april 2012 Vrijdag 20 april 2012 | Copyright ©2012 HintTech B.V. All rights reserved 1
  2. 2. Agenda• About me• User story: faceted navigation for site wide search• Problem: practice doesn’t follow theory• Possible solution: Derived Data Engine• Better solution: Daemons!• Some stuff we learned• How to improve Hippo to make this easier Vrijdag 20 april 2012 | Copyright ©2012 HintTech B.V. All rights reserved 2
  3. 3. About me – Wouter Danes• Hired via Orange11 @Rijksoverheid.nl• Java (10yrs experience) & Hippo Developer• Competence Manager Java & Hippo @ Hinttech• Merciless refactorer• Loves Test Driven Development• Hippo CMS Committer• Experience as a Software Architect Vrijdag 20 april 2012 | Copyright ©2012 HintTech B.V. All rights reserved 3
  4. 4. Faceted Navigation for Site Wide Search• Rijksoverheid.nl needed a new side wide search• It had to allow a drill down via four facets: Responsible Department(s), Document Type Applicable Theme(s), Document Date• This is pretty easy with Hippo• It supports faceted navigation out of the box• At least, if all facets are properties on the document… Vrijdag 20 april 2012 | Copyright ©2012 HintTech B.V. All rights reserved 4
  5. 5. Problem: Practice doesn’t follow theoryWe would like to see: Vrijdag 20 april 2012 | Copyright ©2012 HintTech B.V. All rights reserved 5
  6. 6. Problem: Practice doesn’t follow theoryWe would like to see: The horrible truth: Vrijdag 20 april 2012 | Copyright ©2012 HintTech B.V. All rights reserved 6
  7. 7. Possible solution: Derived Data Engine• Derived Data Engine allows you to define input properties and then populate some output properties• You can even point to a single property on ONE related Document (property name is secretly a relative path… shhh!) f.ex: “common:subject/@title”• You cannot point to a property on multiple related Documents• Crap! Foiled again! Vrijdag 20 april 2012 | Copyright ©2012 HintTech B.V. All rights reserved 7
  8. 8. We Were About to Give Up…When Jeroen and me came up with this idea… Vrijdag 20 april 2012 | Copyright ©2012 HintTech B.V. All rights reserved 8
  9. 9. Daemon Modules• Hippo CMS supports Daemon Modules• Daemon modules are services that run in the Hippo Repository in their own (admin) session• We could let this daemon module derive stuff for us, all we have to do is send it the UUID of the node…• Let’s see how that works! !! WARNING: DO NOT TRY THIS AT HOME !! Vrijdag 20 april 2012 | Copyright ©2012 HintTech B.V. All rights reserved 9
  10. 10. Sequence DiagramNow show us some code..!! Vrijdag 20 april 2012 | Copyright ©2012 HintTech B.V. All rights reserved 10
  11. 11. Nothing Like the Smell of a Good Hack!(unless you are Hippo Support and got 50+ clients doing this…) Vrijdag 20 april 2012 | Copyright ©2012 HintTech B.V. All rights reserved 11
  12. 12. Stuff We Learned1. Make Sure Your Daemon Module is Thread Safe2. When you Refresh a Session, any Nodes it Supplied Become Useless3. If a Derived Data Function Throws an Exception, any Action that Triggered the Node.save() Fails4. This Will Break (Delayed) Publishing! 1 + 2 + 3 + 4 == Weird Artifacts ….That took us ages to debug Vrijdag 20 april 2012 | Copyright ©2012 HintTech B.V. All rights reserved 12
  13. 13. How to improve Hippo to make this easier• Improve Derived Data Engine to Supply a Decorated Read Only Node instead of Input & Output Properties• Read Only is Good, Because You Don’t Want the Derived Data Engine to Modify/Save other Nodes• Output Concept Can Stay Like it Is• Or… Wait for SOLR Integration Vrijdag 20 april 2012 | Copyright ©2012 HintTech B.V. All rights reserved 13
  14. 14. Wouter Danes @wouterdanes Tel: +31–(0)88–268 25 00 Address: Delftechpark 37i Mob: +31-(0) 6 1158 8264 2628 XJ DelftE-mail: Wouter.danes@hinttech.com The Netherlands Delft San Francisco Novi Sad Nordic United Kingdom Vrijdag 20 april 2012 | Copyright ©2012 HintTech B.V. All rights reserved 14

×