Customized Navigation Using SOLR


Published on

The organization needed to enable a very customizable form of Global Navigation for the various types of users This would normally have involved complex logic to figure out the appropriate set of links to show for a customer, and would have been a maintenance nightmare. Instead we approached the problem as a search problem.

  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Customized Navigation Using SOLR

  1. 1. Customized Navigation Using SOLR<br />Shantanu Deo,<br />Technical Director, AT&T<br />
  2. 2. We Have A Simple Business Need<br />Great! What is it?<br />We want a Global Navigation with Multiple levels. <br />Sure no problem.<br />It should be different for different people!<br />Hmm.. Ok.<br />BTW we have @ 60+ ways to group users and a user can belong to many groups at once<br />What does that mean ?<br />Also we want to be able to make frequent changes to who sees what and when. <br />Ok that might be tough to do given our release turnaround times for code related changes<br />Page 2<br />
  3. 3. Simple Needs = Complex Requirements<br />Page 3<br />No. of user types = about 60<br />No. of Navigation levels = 3<br />No. of unique URL’s = 700+ <br />Hierarchical dependence across levels.<br />Complex edge cases: If user belongs to Category A/B/C but Not D then show URL<br />Combinatorial explosion (60! In theory)<br />
  4. 4. Other small requirements…<br />Page 4<br /><ul><li> A user can belong to many categories at once
  5. 5. The tertiary level is further broken up in categories by columns
  6. 6. Each Column has a heading which may/may not be a link
  7. 7. The rightmost column should be highlighted differently.
  8. 8. The same URL can appear at different places for different types of users.</li></li></ul><li>Modeling The Hierarchy…<br />Page 5<br />Encode the hierarchy using a 6 digit number to capture the relation between levels.<br />2 digits per level (xxyyzz)<br />So has a encoding of 010000<br />Whereas has a encoding of 010206<br />
  9. 9. Page 6<br />Modeling the customization<br /><ul><li>Hard to code all possible conditions (60!).
  10. 10. Could use some rules engine to figure it out.</li></ul>Aha moment…<br /><ul><li>Can we model it as a search problem ?</li></ul>Give me all the URL’s that I should see and none that I should not.<br />Afterall the URL’s are already capturing hierarchy using flat encoding<br /><ul><li>Have them also capture their category/group affiliations:</li></ul>Each URL also has a bunch of showgroups/hidegroups associated with it.<br />
  11. 11. Data that gets indexed<br />Page 7<br />A flat list of URL’s (search documents).<br />Each document contains:<br /><ul><li>A URL
  12. 12. Its positional encoding
  13. 13. Its list of user groups for which it can appear in that position
  14. 14. Its list of user groups for which it is hidden
  15. 15. Other attributes that address the other small requirements associated with the tertiary level (eg. Column heading etc) </li></ul>The same URL may appear multiple times, but its set of User Groups is unique.<br />
  16. 16. Why SOLR<br />Page 8<br /><ul><li>Very easy to setup and start using
  17. 17. Robust and Scalable
  18. 18. Proven stability in our own Production environment for over a year as our primary search for phones.
  19. 19. So already in our production environment (no internal hoops to jump through)
  20. 20. FAST</li></li></ul><li>Architecture Diagram<br />Page 9<br />URLDocs<br />Convert to JSON<br />SOLR <br />Server<br />SOLR <br />Service<br />Browser<br />Ajax<br />
  21. 21. Advantages of Search Based Approach<br />Page 10<br /><ul><li>Able to avoid coding complex logic and shorten development time
  22. 22. Avoid the need to make code changes everytime there is a change in the groups or new URL’s are introduced – Simply re-index new data and begin rendering
  23. 23. Deploy quickly in existing SOLR infrastructure
  24. 24. Only needed to write a simple service to recreate the hierarchy using the encoding to provide a simple JSON.</li></li></ul><li>Acknowledgments?<br />Page 11<br /><ul><li>The following people we involved in bringing the solution to reality
  25. 25. Shantanu Deo
  26. 26. VinayMarda
  27. 27. Jay Chan
  28. 28. Rama Atmakur
  29. 29. Greg Taff
  30. 30. RupeshJha
  31. 31. Pratap Cheruvu</li></li></ul><li>Questions / Demo<br />Page 12<br />?<br />