Halcyon

Notice: The website is currently being udpated. Sorry for any inconvenience.

Introduction

Halcyon is a JSON Web App Framework built on Rack for speed and light weight.

Halcyon has several aims and goals, including:

  • Be fast — easy with Rack and Mongrel or Thin
  • Be small — also not a problem with Rack and Mongrel
  • Be cross-platform — communications are flexible with JSON transport layer
  • Be flexible — since it uses HTTP, it’s very simple to be flexible
  • Be easy to implement — also easy since we’re developing in Ruby here

Simply put, Halcyon is a web application framework with a twist. The twist is simply that Halcyon applications communicate solely through JSON, both incoming and outgoing.

What Is Halcyon For?

This is the question most often asked about Halcyon, what is Halcyon for? If Rails (and Merb et al) is for quickly developing web applications, Halcyon aims to provide a framework for developing service-oriented applications (SOAs) such as APIs or other non-interfaced services.

The Twitter API is a great example of a SOA where tweets can be submitted without needing any web interface. The power of this type of application is that other client-side applications can be developed to provide an interface to the web service.

Halcyon aims to make writing these types of application interfaces and other similar services trivial.

Functionality & Performance

With Mongrel leading the pack and Rack holding things up, JSON doing the fast talking and with plenty of room to spare, how could you not be interested, even about this new framework? Still not convinced? OK, fair enough, here’s some code for you.

 1 class Message < Sequel::Model; end
 2 class Messages < Application
 3   def new
 4     # respond with fields acceptable
 5     ok Message.columns
 6   end
 7   def create
 8     msg = Message.create(params)
 9     msg.save
10     ok msg.id
11   end
12   def read
13     ok Message[params[:id]]
14   end
15   def update
16     Message.filter(:id => params[:id]).update(params)
17     ok
18   end
19   def delete
20     Message.filter(:id => params[:id]).delete
21     ok
22   end
23 end

You can then run it with:

$ halcyon start -p 4647

That’s all it takes to open up the door to let you communicate with your applications that implement or use the simple client.

Read the Docs.

Supported Platforms

Halcyon is primarily written in Ruby, but Halcyon also supports multiple platforms due to the fact that it communicates via HTTP and packages its messages in JSON. Halcyon currently has Ruby, PHP, and Java clients available, with more clients planned.

You can see the various client implementations at the GitHub project (except for the Ruby client, which is part of the Halcyon gem).

Top 3 Requested Features

Here are some popular user-submitted requests for functionality for Halcyon. Feel free to contribute your own!

Metrics

Ohloh’s pretty cool and we use it to track the development metrics of Halcyon. Check out some of the more interesting details on our project page. You can find the link at the top of the page.

For your viewing pleasure, here are some of the Ohloh project factoids: