A 1588x Render Speed Increase With Solr Caching on Rails to Solve All Your Performance Issues

23 August 2016

Powerful Rails Report and View Generation

Solr Saves Your Bacon. Again.

I’ve recently covered setting up and storing calculated functions and attributes using Sunspot and Solr in your Rails application. Today, I’m continuing on that with an insanely fast way to keep your reports up to date. A roll your own partial caching on Rails with Sunspot and Solr was pretty damn fun to build. The best part? It only takes a few lines of Ruby to give expensive, large reports an unbelievable performance boost. Quick, cheap, easy and bleedingly fast performance sound too good to be true? I thought so before today, too.

Read More...

Increase Your Rails Application Reporting Speed by 10x with Sunspot's Stored Values

22 August 2016

Storage

Intro

In my previous post I introduced Solr and Sunspot along with a basic use case to get up and running with Rails. Here, I’ll dive in to what originally brought me to Sunspot, stored attributes. Wouldn’t it be great if you could dynamically generate a field to save complex calculations on your models with having to add columns to your database, and be sure that these calculations are kept up to date? This would especially be helpful for generating reports or views where you have lots of complex data that would normally take long to both load and calculate. Look no further, Solr’s stored attributes on hits have you covered.

Read More...

How to Setup Solr on Rails with Sunspot

20 August 2016

Cache it, keep it updated.

Intro

It’s inevitable that as you develop applications, clients and users will want searching added. Completely inevitable. What happens when you need to extend beyond searching fields that are saved on your models? There’s also the ever present need to keep things scalable. Having a solution that grows with you and isn’t tied 100% to your schema can not only impress, but save you time in the long run. Check out Solr, the incredibly powerful search solution from Apache. In this article, I’ll show you how to set it up do a basic search.

Read More...

Rails: Multiple #joins on the Same Table and Avoiding Ambiguity

30 March 2016

Not a car. Or is it?

Ambiguous Column References in Rails

I was messing around on the console today, and ran into an interesting problem when joining a model to another model twice. An ambiguous column reference. Haven’t seen that one before; time to investigate.

Read More...

A Simple Pattern to Generate Reports in Rails

29 March 2016

Your users shouldn't have to wait 1.5 seconds for their report.

Intro

You’ve got an app that’s used for some function; over the course of time it’s collected tons of data, and now your customers want ways to see what’s going on within the app. You put together a simple reporting scheme, but once you load it up with production data, you get a timeout while the report generates. It’s that slow. Read on for how to use a pure ruby on rails approach to build reporting for your app and store historical reports.

Read More...

Previous Page: 8 of 10 Next