Adding High Performance Search to your Grails App
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Adding High Performance Search to your Grails App

on

  • 3,228 views

These are slides from my presentation to the Grails Cafe Centro meetup in San Francisco on Aug 16th 2011. ...

These are slides from my presentation to the Grails Cafe Centro meetup in San Francisco on Aug 16th 2011.

Most of the session was practical, so the slides are brief and are mostly useful for the links they contain.

Statistics

Views

Total Views
3,228
Views on SlideShare
3,216
Embed Views
12

Actions

Likes
1
Downloads
25
Comments
0

3 Embeds 12

http://www.linkedin.com 6
https://www.linkedin.com 5
http://s.medcl.net 1

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Adding High Performance Search to your Grails App Presentation Transcript

  • 1. Adding High Performance Search to your Grails App  Adam @Creeger API Architect,Ticketfly  http://acree.gr Grails Cafe Centro Meetup, Aug 16th 2011 San Francisco, CA
  • 2. The next hour or so...
      • Light on the slides
      • Heavy on hands-on coding
      • Some audience participation!
      • Intro to ElasticSearch
      • Installing and using a local ElasticSearch instance
      • Adding basic search into a Grails app
      • Adding some more search functionality
      • Seeing the performance of ElasticSearch
      • ElasticSearch in the cloud (kind of)
  • 3. What is ElasticSearch?
      • High performance, distributed search server
      • Based on Lucene
      • Highly available
      • Schema optional
      • RESTful
      • Created by Shay Banon, author of Compass.
      • Very active open source project ( github impact graph )
      • Still in "beta"
  • 4. What isn't ElasticSearch?
      • Quite as mature as Solr
      • 100% stable
      • A replacement for your NoSQL layer
  • 5. My experience with ElasticSearch...
      • Ticketfly uses ElasticSearch to power our API and order search - about 1 million hits a day, 40ms average response time.
      • Small-ish indexes with a few million records
      • Not as intensive as many other uses of ElasticSearch.
  • 6. Hands on: Installing and Using ElasticSearch What you'll need: http://acree.gr/installing-es http://acree.gr/elasticsearch-head A unique ElasticSearch cluster name
  • 7. Demo: Adding ElasticSearch to a Grails Application What you'll see: Installing the Grails plugin (a custom fork for now) Implement basic, but useful search
  • 8. Demo: Making our Search more useful What you'll see: The power of the query string ElasticSearch's Groovy API Geo searching
  • 9. Demo: Performance What you'll see: Bulk Indexing The performance of ElasticSearch compared with MySQL/GORM
  • 10. Hands on: Using ES in the Cloud (kind of) What you'll need: The ElasticSearch installation you created earlier All be on the same network The same cluster name! Web App needs correct config: elasticSearch.cluster.name
  • 11. Some tips for using ElasticSearch
    • Use Aliases While Bulk Indexing
    • To avoid downtime while doing a Bulk Index:
    • 1. Create an index with a Timestamped name:
    • e.g. org.cafecentro_20110814_145500
    • 2. Once the indexing is complete, use the Alias API to normalize the          name
    • e.g Alias org.cafecentro ->  org.cafecentro_20110814_145500
    • which means:
    • http://localhost:9200/org.cafecentro/event/1234 
    • is equivalent to
    • http://localhost:9200/org.cafecentro_20110814_145500/event/1234
    • 3. Using the timestamp, clean up the old indexes
  • 12. Some tips for using ElasticSearch
    • Some General Tips
      • Include the version number in the name your cluster. This means you can create a new cluster for an upgrade - don't rely on indexes being backwards-compatible.
      • Test your upgrades thoroughly in a staging environment.
      • Many concepts are very similar to Lucene - plenty of great documentation available.
      • Before using in production, understand how "snapshots" work and how to configure them:  http://acree.gr/TQp3  and  http://acree.gr/fiVW  will help.
      • The Google Group/Mailing List is very active. Many questions answered by Shay himself.
  • 13. Useful Resources
      • http://elasticsearch.org/guide
      • http://elasticsearch.org/blog
      • http://groups.google.com/group/elasticsearch/  
      • http://www.grails.org/plugin/elasticsearch
      • http://mobz.github.com/elasticsearch-head/
    • From this presentation:
      • http://acree.gr/es-grails-creeger  - Fork of the grails elasticsearch plugin
      • http://acree.gr/es-demo - The demo app used during this session
  • 14. Thank you! Adam @Creeger API Architect,Ticketfly  http://acree.gr