Showing posts with label Tech. Show all posts
Showing posts with label Tech. Show all posts

Wednesday, December 16, 2009

Handling the Twitter Stream API with Ruby

I've been doing a lot of things with the Twitter API lately. More on that another time though. I started messing around with their stream API last night. It's pretty fun to play with and I wanted to put the code up somewhere so I can use it later. Right now it works, but it clearly isn't very robust. It needs retry logic and better error handling. Right now, it's just a toy :)

You'll need the json gem installed. Once you have that you can run the script like...
./twitter_stream.rb <username> <password>

Tuesday, September 29, 2009

Spymemcached Optimizations Followup

A couple days ago, Dustin Sallings, the other of the spymemcached Java client for memcached, posted an article on some optimizations done to the library. If you are currently using hibernate-memcached you may want to try out the latest spymemcached RC release.

If you combine the latest spymemcached RC release, with memcached 1.4 and the new binary protocol you should see significant performance increases. As Dustin didn't change anything about the spymemcached API it should be a drop in upgrade for you.

spymemcached Optimizations - Dustin Sallings

hibernate-memcached

Enjoy!

Friday, September 18, 2009

iPhone QR Code Readers


I was playing around with some QR code readers for the iPhone. If you don't know what a QR code is you might recognize it as a crazy looking square full of smaller squares. Apparently these things are on everything in Japan, and are used to market products as well as presenting URLs.

I tried two so far this morning based on what Jeff Judge and Doug Barth at Interactive Mediums were playing with. Of the two, "Beetagg" and "QR App", QR App is the clear winner.

In order to get Beetagg to read a code it requires 4 clicks. One to launch it, two to start the scanner, 3 to snap the picture, and 4 to "Use" the picture. Lame...

QR App only takes one click. Launch it and the camera comes up automatically, point it at a tag and it recognizes it on it's own and acts. Very cool.

Sunday, September 13, 2009

Windy City Rails 2009

Yesterday I attended the Windy City Rails 2009 conference. This is the first conference I've attended in a few years. More notably it was my first Ruby related conference. I have to say, I loved the format most of all. The conference was only $99 to attend, there were no tracks and therefor no session overlap. It was a quick one day in and out affair with great speakers and really good material. There were also AM and PM tutorials that did overlap with the conference itself. The tutorials were a deep dive into one particular subject each. They were great for those that wanted to go that route, and though I'm not an expert in the respective subjects, I decided to stick to the conference itself. Also, the tutorials cost extra and I'm a huge cheap ass, so $99 it is :P. There was also a "Coding Dojo". This was an interesting gathering of folks pairing up to work on various challenges. I didn't visit, but it sounded like a neat idea.

Better Ruby through Functional Programming - Dean Wampler


This was the first session of the morning to kick things off. Functional programming is something I battle with. One part of me wants to do more with it, the other part of me gets angry when the examples always devolve into convoluted math examples *yawn*. Dean avoided that (mostly) and covered more realistic topics. Overall the talk was very good, and showed how it is possible to follow a functional style with Ruby. Although, it seemed to me, that attempting to follow functional patterns leads to somewhat noisy and obtrusive Ruby code. Having to freeze things and boilerplate immutable classes seemed to add white noise.

Super-easy PDF Generation with Prawn and Prawn-to - John McCaffrey


Honestly I figured I wouldn't find this talk very interesting, but I was wrong. John was entertaining to listen to. He kept things moving at a fast pace and talked even faster; occasionally trailing off into these mumbles that we couldn't understand. He reminded me of Jim Gaffigan, I expected him to go into a "Hot Pockets" routine. Getting an overview of the different PDF generation tools and then taking a deep dive into Prawn was what kept me listening. Seeing the effect of combining the Google Charts API with Prawn PDF generation was very cool. It turns out my company currently does that and I didn't even know it :)

"Comics" is Hard: On Domains and Databases - Ben Scofield


This was a long road to an interesting topic. Ben broke into biology off the bat and then went into comic books. At first I had no idea where he was going with this. He was entertaining to listen to though, so I kept listening. He kept breaking down the subject to show that those subjects are far more complicated than they first seem. Also this lead into his real point. That these subjects are so complex, they're hard to map to the simple relational model simple SQL databases rely on. He then started into how other persistence mechanisms may hold the key. For example, key/value store systems like Tokyo Tyrant, Voldemort, and Redis. As well as more exotic graph databases like Neo4J.

LUNCH!


I'm making mention of lunch because it was awesome. Marinated steak, shrimp pasta, some kinda chicken rolled up in a noodle. It was all so good!

UI Fundamentals for Programmers - Ryan Singer


This talk had a bit of a buzz at the start. Ryan is, of course, a 37 Signals guy, that makes him a celebrity to the geeks (like me) in attendance. His talk did not disappoint. His initial example of a UI done by a programmer is exactly the kind of UIs I've always built for web applications. All function, no humanity. He talked about how interfaces need text, friendly text, that clues people into what it is they're doing. Fields and labels for every field on your model just doesn't cut it. He also talked a lot about how the eye and brain work together to scan a page and take in information. Providing the right levels of contrast can really make a huge difference.

How to Test Absolutely Anything - Noel Rappin


Noel had a tough job here. He got stuck following Ryan Singer. Noel covered a lot of interesting points on how to test some of the more difficult parts of a rails application. Things like views, email, and timestamps can be difficult to get some good tests around. Interesting material and it was covered well. Unfortunately his slides looked like a website from 1995. This effect was increased by his unfortunate position following Ryan as I mentioned. I think the corny background images and "comets" used for text transitions distracted a lot from the actual words on the screen. Sorry Noel :)

Optimizing Perceived Performance - David Eisinger


One word, hysterical. David's delivery reminded me of Steven Wright. His talk was focused changing the way your interface behaves to give the user the appearance of improved performance. He showed off the power of JQuery to give this effect. He demonstrated several techniques and even uploaded it all to Github. Great talk, I really enjoyed it.

Dojo Retrospectives - Jake Scruggs & Dave Hoover


Like I said at the start, I didn't visit the dojo at all. If I had, I might have gotten more out of this. It seems the organizers knew this would be tough to make it interesting for those that never stuck their head in and kept it to 10 minutes.

Rails 3 Update - Yehuda Katz


This really seemed to be less of a Rails 3 update and more of a Rails retrospective with a bit of a rally cry built in. Yehuda got into Rails 3 at the end of his talk, but by then he was rushing due to time constraints. Don't get me wrong though, what he had to say about Ruby and Rails and the community was incredibly interesting.

Awesomeness Achieved


The Wisdom Group and Chicago Ruby folks really did a great job putting this together. It was well organized, simple, and had a great price. I will definitely attend next year. Oh, and I won a free copy of "The Ruby Way", so I got to get some free exercise lugging home a big ass book :P

Monday, August 10, 2009

Hibernate-memcached 1.2.1 Released

I released 1.2.1 this morning to fix an NPE that was brought up in the group this morning. The NPE only comes up under an error condition so it really shouldn't be affecting too many people. Either way, it was crappy code and it needed to get fixed.

You can download the 1.2.1 from the site, or just update your maven pom.
http://code.google.com/p/hibernate-memcached/

Enjoy!

Friday, July 17, 2009

Hibernate-memcached 1.2 Released

Earlier this week I released hibernate-memcached 1.2. Hibernate-memcached is a simple library that enables the use of Memcached as a second-level cache in Hibernate.

The 1.2 release updates the Maven dependencies to spymemcached 2.3.1, which includes some bug fixes and reduces the dependencies by one jar (spy.jar is gone). The main purpose of the hibernate-memcached release is to add support for the new binary protocol released with memcached 1.4. Previous versions of memcached only supported the ascii protocol. This has always performed well in it's own right; but the binary protocol reduces CPU compute time and can decrease response time as well.

The hibernate-memcached release also includes a minor tweak to use getMulti in Memcached when DogpilePrevention is enabled. Not a big deal, but someone pointed out an opportunity for it; so I added it.

You can download hibernate-memcached here. Or you can setup your maven project by following these instructions. As always, the source is available via github.

Enjoy!
-Ray Krueger

Sunday, May 17, 2009

Rails Authentication: restful_authentication vs. authlogic

I've been spending a bit of time comparing Rails authentication mechanisms. The two main frameworks out there are the "restful-authentication" and "authlogic" libraries. The two provide the same general purpose functionality; users, sessions, cookies and emails.

The Restful authentication library is the current popular choice. I believe this is due to it being one of the first real options, as well as coverage in books like "Advanced Rails Recipes". The library is incredibly complex and opaque though. It relies heavily on generators and hidden code to produce its functionality. The install instructions are an exercise in command line arguments rather than code.

Authlogic has proven to be far simpler to digest. No real magic involved. One of the stated goals of the library is to be able to treat sessions as you would an active record model. You create a session, save a session and destroy a session like you would any other model. There are no generators you write the code yourself, and there is very little of it. The basic set of columns you need for a "User" show you that the library is well thought out with regards to security and usefulness. There are a number of columns though and this leads to a heavy initial copy & paste though. I felt a bit dirty having to do that, but I'll get over it. The rest of the code I have to write is transparent and understandable, a big plus. Oh, and do not assume that because "restful" isn't in the title that it lacks there. It doesn't, follow the tutorial and you'll produce a very restful solution.

You can probably tell from the above two paragraphs that I'm favoring Authlogic at this point. I definitely like the transparency and simplicity of it. To learn more about Authlogic you can follow along with the README in the main repository as well as the fantastic tutorial app. There are also a few extra tutorials on Ben Johnson's blog around password resets and openId.

Thursday, April 16, 2009

Follow up to the AbstractHibernateDao

In my writing about the AbstractHibernateDao here I mention that you no longer need to extend HibernateDaoSupport class. You do lose one thing though. Your new AbstractHibernateDao based DAO will now throw HibernateExceptions, not Spring DataAccessExceptions. Now, to me, this isn't the end of the world. In a Hibernate 3.2+ world Hibernate does have a clear exception hierarchy. Not like the old days where there was just "HibernateException". That sucked.

If you do want your DAOs to throw Spring DataAccessExceptions there are two simple things to do.
  1. Add the @Repository annotation to your DAO impl.
  2. Add a PersistenceExceptionTranslationPostProcessor bean to your Spring setup.

What this does is tell Spring to wrap an interceptor around your DAO bean that handles the exception translation.

Looking at the UserDaoImpl from the past article...

@Repository
public class UserDaoImpl extends AbstractHibernateDao<User> implements UserDao {

public UserDaoImpl(SessionFactory sessionFactory) {
super(User.class, sessionFactory);
}
...
}

Then in your Spring application context.xml you simply add one line...




Now, this pattern I present is somewhat old school. There is all this fancy component scanning stuff you can do with the Spring 2.5 XML namespaces. Honestly the amount of voodoo that goes on there freaks me out a bit. You can study that on your own if you'd like. A good place to start is here.

Thursday, April 02, 2009

Amazon Elastic MapReduce

Amazon announced an Elastic MapReduce service in the AWS environment. This service combines S3, EC2 and the Hadoop MapReduce framework to provide a powerful distributed processing engine. This is pretty awesome stuff. Too bad I have no use for it right now, maybe I should make one up :P

Amazon Elastic MapReduce

Thursday, March 12, 2009

Announcing Tiny VH

My Buddy Sean got angry about is.gd going down the other day, so he wrote his own URL shortening service. I'm gonna use it for everything, and you should too :P

Announcing Tiny VH

Thursday, December 18, 2008

Simple Maven Archetype

I've been doing more and more with Maven lately. We're currently beginning the effort to migrate some of our stuff to Maven at work. A new feature of the archetype plugin was introduced a bit ago to generate java projects from a menu. This is done using mvn archetype:generate. This provides you with a (hideous) menu of options to begin a new project from a template.

The problem I have with this (besides the menu being hideous) is that Maven still defaults the compiler to use source/target settings for java 1.4. Every project I do that uses Java 1.5 needs to have the compiler config settings tweaked to allow the use of 1.5. It is really annoying, so I created my own simple archetype that I can use and uploaded it to github for easy access. http://github.com/raykrueger/simple-archetype/tree/master

This new archetype generates an empty project with compiler settings for 1.5, includes the dev.java.net maven repository and has dependencies for slf4j and junit.

I may move this archetype project in the future into a collection of archetypes. So I can have a simple java one, a webapp one, and whatever else I come up with. If I do move them, I'll update this blog :)

Sunday, December 07, 2008

Hibernate-memcached 1.1.0 Released!

After a bit of trial and error with the maven release plugin, the latest release of hibernate-memcached is available. This release includes a few new features:
  • Support for the Whalin memcached client
  • New Key strategies: Md5KeyStrategy, Sha1KeyStrategy for reducing the length of keys
  • Better Exception handling during cache failure scenarios

This is the first release after moving the source to github.

I need to do some wiki work to get documentation up for how to enable and configure the Whalin/Danga memcached client. I hope to get to that some time this week.

The new KeyStrategy implementations for Md5 and Sha1 are there to reduce the size of the keys. Raymond He emailed me to point out that the obnoxiously long keys that Hibernate generates take up a lot of memory in memcached. Many records + ~250 char keys = a lot of wasted space. The new Md5 and Sha1 keys strategies simply take the fully qualified key name generated by hibernate-memcached and hash them up to take a lot less space.

The improved exception handling revolves around the addition of a new MemcachedExceptionHandler interface and a default LoggingMemcacheExceptionHandler implementation. Essentially the Spy and Danga memcached clients are wrapped up to eat any exception that comes out of them. There's really no reason for the cache layer to throw exceptions at Hibernate. Errors are logged as Errors, and a null is returned.

Enjoy!

Monday, October 13, 2008

Using JRuby and ActiveRecord Migrations to Manage Database Change

Managing change to your application databases is a very common requirement for any development team. The usual approach seems to consist of piling scripts into some "db/changes" folder in your project. This is probably fine for the most part, but when you have multiple databases in multiple environments, managing that across multiple developers can be a problem. If have the usual minimum of three environments (dev, test, prod) you have to remember to apply the right scripts in the right order in each environment. If you are doing iterative development you may be making small database tweaks here and there over a period of a week or two. The difficulty comes in trying to remember what script you applied last and which script you need to apply today.

Following our first instinct of storing sql scripts in source control, let's add another complication into the mix. What if you have to support multiple database engines, say MySQL and Postgres. There will be subtle differences in statements, and database specific properties that need to be set. Managing two sets of scripts becomes a huge pain pretty quickly. Now, as as Java developer, we get to use Hibernate to maintain database portability. Hibernate is a fantastic ORM library, and it comes with tools to generate the DDL needed to create your database from scratch. Unfortunately, it does not include any tools for managing incremental updates to that schema.

The Ruby on Rails folks came up with a solution to the issues above; ActiveRecord Migrations. Migrations are small, incrementally versioned Ruby classes that are designed to bring your database up to date in a controlled fashion. The basic concept is very simple. Store a "version" in the database and maintain a set of Ruby classes that can bring your database up to the latest version. The Ruby classes are numbered using the version they represent and include an "up" and "down" operation. So, let's say we have a current version in the database of "6" and Ruby classes numbered up through "10". When we execute the "migrate" command ActiveRecord will see the current version and see we have scripts that go beyond that and begin to execute their "up" methods in order 7.up, 8.up, 9.up, 10.up. If we wanted to bring our database down to version 8 ActiveRecord would in-turn run the "down" methods. Executing 10.down, 9.down; leaving us at version 8. ActiveRecord Migrations also address our second issue of portability. Your individual migration classes are written in a database agnostic "Domain Specific Language", which allows for the SQL to be generated at runtime for your specific database. Note that you can also execute arbitrary SQL if needed as well.

I intend to show how to do this from the perspective of a Java developer, deploying these changes into a Java deployment environment. This is where JRuby comes in. At my company we already have Java on all of our servers and development machines, but not Ruby (except maybe on dev boxes). Using JRuby allows us to run Ruby on top of the installed JVM without having to worry about installing Ruby. So, let's get crackin' here and do something.


Install JRuby

Download Jruby (1.1.4 as I write this) and extract it somewhere. For me I've dumped it in "~/dev/jruby-1.1.4". Set an environment variable called JRUBY_HOME that points to this location; EX: in .bash_profile: export JRUBY_HOME="~/dev/jruby-1.1.4". Add JRUBY_HOME/bin to your path and you're good to go; EX: in .bash_profile: export PATH=$PATH:$JRUBY_HOME/bin


Install Required Gems

Ruby has a library distribution mechanism called ruby-gems. A gem is a library, every gem has a version and some dependencies. JRuby comes with ruby-gems pre-installed, all you need to do is tell it to install the other libraries you want. We'll need a few of them to get started. Note that I'm going to use mysql via jdbc in this example. You can use the native Ruby drivers for your database of choice, or one of the supported jdbc adapters.

  • jruby -S gem install jruby-openssl (we won't use this, but JRuby will complain when installing gems without it)
  • jruby -S gem install activerecord
  • jruby -S gem install rake
  • jruby -S gem install activerecord-jdbcmysql-adapter

Since we're using the jdbcmysql adapter we'll need to throw the mysql jdbc driver into our JRUBY_HOME/lib directory.


Configure the Project

Let's start by creating a directory structure to work with. Let's create a folder called "activerecord" with a subfolder named "db" and a subfolder inside "db" named "migrate". Executing "mkdir -p activerecord/db/migrate" will do the trick. In our "activerecord" folder create a file named "database.yml". The .yml file extension means this is a yaml file, Yaml stands for "YAML Ain't Markup Language"; cute right? We're not going to get into yaml much, suffice to say our use of it here is like a properties file. We'll stick to name/value pairs. Our "database.yaml" file will have the following contents...

adapter: jdbc
driver: com.mysql.jdbc.Driver
url: jdbc:mysql://localhost/test
username: root
password: whatever
Note that I am assuming mysql running on the localhost with a database called test. Adjust this file accordingly for whatever your database settings are.


Prepare Your Rakefile

Again, in our "activerecord" folder we're going to create a file named "Rakefile.rb". If you are familiar with Ant then you're familiar with the concept of Rake. Rake is the defacto build tool for Ruby and Rails applications. The Rakefile.rb file is equivalent to the Ant build.xml file, except that it's written in Ruby not XML. As a straight up copy and paste operation, your "Rakefile.rb" will have the following contents...

require "active_record"
require "yaml"

task :default => :usage

task :usage do
print "Executing \"rake migrate\" will bring the databse up to date\n"
print "To upgrade/downgrade to a specific version use: \"rake migrate VERSION=X\"\n"
end

task :migrate => :configure do
ActiveRecord::Migrator.migrate("db/migrate", ENV["VERSION"] ? ENV["VERSION"].to_i : nil )
end

task :configure do
ActiveRecord::Base.establish_connection(YAML::load(File.open("database.yml")))
ActiveRecord::Base.logger = Logger.new(File.open('migrate.log', 'a'))
end
If you look at it this file you can see how it is similar to an Ant build.xml file. The "task" blocks (the block is denoted by the do/end) are like "targets" in Ant. Here we've got a task named "migrate" that depends on the "environment" task. The "environment" task sets up our database connection using our Yaml file, and configures a log file to write to. Our migrate task simply tells the ActiveRecord Migrator where the classes are and optionally a specific VERSION to move to. Specifying a version is commonly used for rolling back to some point in the past.


Write Your First Migration

I'll put together the migration classes necessary to build a "user" table, and a "messages" table, with a cross-reference table joining users to messages in a one-to-many relationship. I'll do this in small steps so we can see it as a serious of migration steps. Let's start right off with the User table. In the "db/migrate" folder create a file named "001_create_user_table.rb". The name of this file is important and significant. The first part represents our version, in this case "1". Everything after that is actually ruby standard class file naming. We're defining a class named "CreateUserTable", which therefore means it should be in a file named "create_user_table". Why the swich from camel to case to underscores? I haven't a clue...

class CreateUserTable < ActiveRecord::Migration
def self.up
create_table :user do |t|
t.string :username, :null => false, :limit => 15
t.string :fullname, :null => false, :limit => 30
end
end

def self.down
drop_table :user
end
end
The migration above is a Class that extends ActiveRecord Migration, it defines two instances methods named "up" and "down". The "up" method calls a method (on Migration) called create_table and passes it a block. When create_table executes the block it will pass it a "TableDefnition" instance, which we named "T". We then call the "string" method on the TableDefinition and pass it "symbols" stating the name and a map (the comma-delimited name/value pairs) containing the options for the column. The "down" method just calls the "drop_table" method. If I have to explain what that does, you're in way over your head :)

OK, let's try it! Bring open a terminal to your "db" folder and run "jruby -S rake migrate". The "-S" I keep using tells Jruby to execute one of command from JRUBY_HOME/bin. If all goes well you should see the following output:

(in C:/source/activerecord)
== 1 CreateUserTable: migrating ===============================================
-- create_table(:user)
-> 0.0031s
-> 0 rows
== 1 CreateUserTable: migrated (0.0036s) ======================================
Once we've executed this migration we should be able to see our new table in mysql:
mysql> show tables;
+-------------------+
| Tables_in_test |
+-------------------+
| schema_migrations |
| user |
+-------------------+
The user table is our new table and the schema_migrations table was created by ActiveRecord to track the current version essentially. ActiveRecord actually keeps track of all the migrations applied to it as of ActiveRecord 2.0. If you see a schema_versions, table then you weren't following along very well as you have a really old version of ActiveRecord :)


Migrating the Rest of the Way

W'e're now going to push through our last migration; that message table I mentioned. First create file in "db/migrate" named "002_create_message_table.rb". That file will have the following:

class CreateMessageTable < ActiveRecord::Migration
def self.up
create_table :message do |t|
t.references :user
t.text :message
end
end

def self.down
drop_table :message
end
end
The new feature we're seeing here in the message table migration is the use of "t.references". Our create_table operation will always create an "id" column for us to represent the surrogate primary key for our table. In doing so ActiveRecord can follow some conventions here. Using "t.references" tells ActiveRecord to setup a foreign key to our user table id column. After that we tell ActiveRecord to create a text (clob) column named "message".

We're ready to execute our next migration. Again, ActiveRecord will look at the versions on our scripts we have provided and compare that with the schema_migrations table to decide what needs executing. Once that decision is made it will walk through them in order...

Executing "jruby -S rake migrate" should give the following output...

(in C:/source/dbupdate/activerecord)
== 2 CreateMessageTable: migrating ============================================
-- create_table(:message)
-> 0.0061s
-> 0 rows
== 2 CreateMessageTable: migrated (0.0085s) ===================================
Now let's have a look at what's in mysql...
mysql> show tables;
+-------------------+
| Tables_in_test |
+-------------------+
| message |
| schema_migrations |
| user |
+-------------------+
We should also see that our schema has been migrated up to version 2 by looking at our schema_migrations table...
mysql> select * from schema_migrations;
+---------+
| version |
+---------+
| 1 |
| 2 |
+---------+
2 rows in set (0.00 sec)


Downgrading

Our Rakefile.rb was looking for a VERSION parameter to read from to force our migration to go to a specific version. Generally speaking you use that to downgrade to a prior version for whatever reason. Let's try that now, execute the "jruby -S rake migrate VERSION=1" command to tell ActiveRecord to step us back to version 1. You should get the following...

== 2 CreateMessageTable: reverting ============================================
-- drop_table(:message)
-> 0.0044s
-> 0 rows
== 2 CreateMessageTable: reverted (0.0067s) ===================================

As you might have guessed ActiveRecord executed our CreateMessageTable.down method, at which point we executed the drop_table method to undo that version. And, again, if we look at the "schema_migrations" table we'll see that it too has been stepped down to version 1.

mysql> select * from schema_migrations;
+---------+
| version |
+---------+
| 1 |
+---------+
1 row in set (0.00 sec)


The Right Tool for the Job

By trade, I am a Java guy. I dabble in Groovy and Ruby and fun stuff like that, but still, I'm paid to be a Java guy. Sometimes you have to know when to use the right tool for the job. Even if you're not familiar with Ruby you really don't need to think of it that way. Ruby is used to provide you with the domain specific language used to handle portable database migrations. You don't need to concern yourself with learning the full extent of the Ruby libraries, or all of the fancy dynamic language features. You just need to pay attention to what values you're passing to these methods and in some cases (maps/hashes) their funky syntax. Honestly I've been looking at doing an article like this for a long time. I'm glad I finally sat down and right it. Hopefully this helps some folks see the power in stepping out from behind our Java comfort zone.


References

If you'd like to see what a large sampling of ActiveRecord migrations take a look at the ones in Trisano.

Sunday, October 05, 2008

Hibernate-memcached moved to github

I just completed moving the source for the hibernate-memcached project from subversion at GoogleCode to GitHub. There's a great guide at GitHub about importing a project from subversion. The only notes I'd add is that you pretty much have to do the authors file trick or your history won't accurately show you as the person making the changes. Also, I had to push using "-f".


git svn --authors-file=/home/ray/.authors clone http://hibernate-memcached.googlecode.com/svn/tags/hibernate-memcached-1.0 hibernate-memcached
cd hibernate-memcached
git remote add origin git@github.com:raykrueger/hibernate-memcached.git
git push -f origin master
git tag hibernate-memcached-1.0
git push --tags


I probably could have tagged it initially, but I didn't think of it :P

Monday, September 01, 2008

Selling Git to the Business

An interesting article from Josh Symonds on selling Git to the business.
http://www.pathf.com/blogs/2008/08/selling-git-on-the-business-end/

Wednesday, August 27, 2008

Note to Self: Read About Automating Ubuntu Installs

The Ubuntu documentation mentions using preseeding files to automate the Ubuntu 8. I may end up having the Ubuntu installs be automated into VMWare anyway, so maybe just a clean VM is the way to go.

Wednesday, August 20, 2008

Hibernate-memcached 1.0 released into the wild!

This evening I decided it was time to release hibernate-memcached 1.0. It has all the features I intended for it to have and I haven't seen any problems come up with it at all, so it must be time. Please, spend some time checking it out, even if you don't think you're going to use it right now. I'd really love to get some feedback and see if there is anything folks would like to see it do in a future release.

If you have any questions or comments please drop a line here or even use the hibernate-memcached Google group.

So, what next?

Tuesday, August 19, 2008

Hibernate 3.3 and Hibernate-memcached

I spent some time looking over the new Cache SPI released in Hibernate 3.3.0.GA. Definitely a much more in-depth API compared to the old CacheProvider/Cache interfaces. Following the new interfaces (RegionFactory, Region) you can be much more aware as to your specific responsibilities in the caching system.

I have tested that hibernate-memcached remains compatible with hibernate-3.3.0 and everything looks fine. I am going to hold off on implementing a RegionFactory/Region based implementation for now and do that as a post 1.0 release. It will require some refactoring to the current code base to get it to play nice with both APIs (I'd like to stay compatible with 3.2 for a while).

So, look forward to a hibernate-memcached 1.0 release tonight, or maybe tomorrow.

P.S. Hello China! According to Google analytics, a link from javaeye.com is generating 250+ hits a day to the hibernate-memcached project site right now.

Wednesday, August 06, 2008

Maven: The Definitive Guide

An informative book about Maven2, free, online, and straight from the source (the guys at Sonatype. Thanks Tim et al!