Intridea's Scalr on TechCrunch and AWS

Posted by on April 3rd, 2008.

Since open sourcing Scalr late yesterday we've been mentioned on TechCrunch and the Amazon Web Services Blog

We're extremely happy with the response so far. If anyone is interested in contributing to the project, please visit the Scalr Project on Google Code.

Share:

Comment on this post (3 comments)


Open-sourcing Scalr

Posted by on April 2nd, 2008.

Intridea is officially open-sourcing Scalr - a redundant, self-curing, and self-scaling hosting environment build on top of Amazon's EC2.

Scalr utilizes EC2 to provide a multi-tiered hosting environment with pre-built images for load balancers, database servers, and application servers. Designed with flexibility in mind, users can further customize each type of machine to use as nodes in their server farm or customize a generic base image for any number of purposes. The application monitors and maintains the server farm by reconfiguring the entire cluster when machines fail or when new machines are inserted. Additionally Scalr can be setup to replace failed machines and scale up and down based on user configured thresholds. The application provides a simple web-based interface for configuring and monitoring your server farms.

The system was initially designed for MediaPlug, a white label audio, video, and image transcoding service that needed to scale based on customer demand.

The project can be found at http://scalr.intridea.com

The project is still very young, but we're hoping that by open sourcing it the AWS development community can turn this into a robust hosting platform and give users an alternative to the current fee based services available.

Share:

Comment on this post (14 comments)


acts_as_community private beta

Posted by on February 28th, 2008.

Today Intridea launched the private beta of acts_as_community, a community site for Ruby and Rails developers.

acts_as_community is a place for Rubyists and Rails developers to gather and interact. Our hope is to bring the community closer together in collaboration and communication so that everyone can benefit from others' experiences.

If you would like to join email us at aac@intridea.com for the beta key.

Share:

Comment on this post (0 comments)


Social Matchbox DC Event on January 28th

Posted by on January 17th, 2008.

Intridea is sponsoring the Social Matchbox DC Event on January 28th.

This is an open event that will bring together DC startup community members to discuss jobs, ideas and collaborative opportunities. Participation is free. Registration is required.

Visit jobmatchbox.com for more information.

Share:

Comment on this post (0 comments)


Presenting at acts_as_conference

Posted by on January 16th, 2008.

Josh Owens and Dave Naffis will be presenting at the upcoming acts_as_conference February 8th and 9th in Orlando Florida.

Adding Media to Your Rails Application

Adding media such as audio and video to a web application can be costly and time consuming. In this talk we'll cover the fundamentals and break down several solutions for uploading large files and transcoding audio and video in Rails.

Share:

Comment on this post (0 comments)


Amazon Web Services Start-Up Challenge

Posted by on October 29th, 2007.

Intridea is excited to participate in the AWS Start-Up Challenge.

We've entered three of our applications:

Scalr is a self-curing and auto-scaling environment built on EC2 and S3. Scalr makes it dead simple to create, configure, and maintain a custom server farm for your application that's fully redundant, self-curing and scales automatically based on load averages.

MediaPlug allows site operators, developers, and entrepreneurs to add images, audio and video to their websites at a fraction of the cost. It's a white-label plug-and-play solution that provides image, audio and video transcoding to dozens of popular formats.

SocNet is an extensible and fully customizable full-featured white-label social networking platform.

All three products will officially be beta launched November 5.

Share:

Comment on this post (0 comments)


Campfire SVN and email notification

Posted by on October 5th, 2007.

Here's a quick way to add Subversion notification for Campfire using Tinder.

Create svn-campfire.rb with the correct username and password:

Add this to your SVN post-commit hook:

/usr/local/bin/ruby /path/to/svn-campfire.rb "$1" "$2"

Here's a quick way to send emails to campfire. Create an email address to use for sending messages to campfire and then create mailer-campfire.rb with your domain, usernames and passwords:

Then create a cron job to fire this off every minute:

* * * * * /usr/local/bin/ruby /home/path/to/mailer-campfire.rb

We also use it to remind us of daily standups:

Our cron job fires it off every weekday at 2pm.:

0 14 * * 1-5 /usr/local/bin/ruby /home/path/to/status-campfire.rb

Next step, create a Jabber gateway for Campfire using Tinder.

Share:

Comment on this post (1 comment)


with_scope is protected

Posted by on August 10th, 2007.

I've seen a lot of people run into trouble using with_scope on edge. It's now a protected method Ticket: http://dev.rubyonrails.org/ticket/8524.

The solution? Don't use it or use it sparingly. They made it protected for a reason - to protect people from abusing it - but if you absolutely must have at it then you can do something like this:

So say you want to scope your finders to retrieve only MyModel objects of type 'super':

Using self.class.send is a way to get around public and private checking in ruby 1.8. Use with caution.

Share:

Comment on this post (0 comments)


Tag Type-Ahead with Multiple Items

Posted by on August 6th, 2007.

If you've ever implemented type-ahead functionality and wondered how to get it to work when users are entering multiple items, like a list of comma delimited tags, here it is.

You can, of course, roll your own Javascript and Ajax calls but why bother when Rails gives us a nice Javascript helper to handle this. The helper is text_field_with_auto_complete but this defaults to the current controller. For my purposes tags can be entered on different areas of the site for different models so I used text_field_with_auto_complete with one modification:

Note: text_field_with_auto_complete is deprecated and will be moved to a plugin in Rails 2.0.

The third parameter is now a hash of optional url arguments (action, controller, etc). You can also monkey patch the original method or better use some alias/alias_method_chain trickery in your own app. In your view call the newly created helper with your arguments.

Include the necessary javascript libraries (prototype and scriptaculous):

You can set the controller and action to whatever you like but it defaults to a method in the form of auto_complete_for_object_method. Going with that your action could look something like this:

And your view (auto_complete_for_tag_names.html.erb):

That's all there is to it. The magic comes from providing a token to Ajax.Autocompleter which we provided in the argument hash to text_field_with_auto_complete_with_custom_url ( { :tokens => ','} ). You can use any delimiter you like. You can also customize the UI in your view and CSS.

Here's a demo http://www.naffis.com/demos/tagging_demo

Share:

Comment on this post (0 comments)


Automatically Expiring Sessions

Posted by on June 3rd, 2007.

SessionExpiration is plugin that allows you to expire sessions after X seconds of inactivity. Useful for when you want to automatically log out users if they're idle.

Installation:

script/plugin install http://svn.intridea.com/svn/public/session_expiration

OR

cd vendor/plugins
svn co http://svn.intridea.com/svn/public/session_expiration

Specify when to expire session in your ApplicationController to do it site wide or you can do it for specific controllers:

class ApplicationController
  expire_session_in 5.minutes
end

If you want to run a method when the session expires use this:

class ApplicationController
  expire_session_in 5.minutes, :after_expiration => :some_method
	
  def some_method
    flash[:notice] = "You have been logged out due to inactivity"
  end
end
Share:

Comment on this post (2 comments)


Tracking Views in Rails

Posted by on June 3rd, 2007.

ActsAsViewable is plugin that allows you to track page and asset views in your Rails application. For example, you can use it to track how many times a page is visited or how many times a particular image is viewed.

Installation:

script/plugin install http://svn.intridea.com/svn/public/acts_as_viewable

OR

cd vendor/plugins
svn co http://svn.intridea.com/svn/public/acts_as_viewable

Create the tables where views will be tracked:

class CreateViewings < ActiveRecord::Migration
  def self.up
    create_table :viewings do |t|
      t.column :viewable_type,  :string
      t.column :viewable_id,    :integer
      t.column :views,          :integer,   :default => 0
      t.column :created_at,     :datetime, :null => false
      t.column :updated_at,     :datetime
    end
  end

  def self.down
    drop_table :viewings
  end
end

Set the objects you want to track views for:

class SomeAsset < ActiveRecord::Base
  acts_as_viewable
end

Now you can increment views for these objects wherever you need to. For example in the show action of our SomeAssetController:

class SomeAssetController < ApplicationController
  def show
    @some_asset = SomeAsset.find(params[:id])
    @some_asset.increment_views
  end
end

To get the number of views:

@some_asset.views
Share:

Comment on this post (0 comments)