Your SlideShare is downloading. ×
0
Adding High Performance Search to your Grails App
Adding High Performance Search to your Grails App
Adding High Performance Search to your Grails App
Adding High Performance Search to your Grails App
Adding High Performance Search to your Grails App
Adding High Performance Search to your Grails App
Adding High Performance Search to your Grails App
Adding High Performance Search to your Grails App
Adding High Performance Search to your Grails App
Adding High Performance Search to your Grails App
Adding High Performance Search to your Grails App
Adding High Performance Search to your Grails App
Adding High Performance Search to your Grails App
Adding High Performance Search to your Grails App
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Adding High Performance Search to your Grails App

2,712

Published on

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.

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,712
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
26
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

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

×