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

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 Messages < Application
 2   def new
 3     # respond with fields acceptable
 4     ok [:body, :title, :tags]
 5   end
 6   def create
 7     case method
 8     when :post
 9       DB[:messages] << params
10       ok
11     else
12       raise NotImplemented
13     end
14   end
15   def read
16     ok DB[:messages][params[:id]]
17   end
18   def update
19     case method
20     when :post
21       DB[:messages].filter(:id => params[:id]).update(params)
22       ok
23     else
24       raise NotImplemented
25     end
26   end
27   def delete
28     DB[:messages].filter(:id => params[:id]).delete
29     ok
30   end
31 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.

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:

Note: It says that Halcyon is mostly written in Java because we include the client libraries in the code base, each of which can have their own extensive dependencies, including the Java one. Since Ruby’s syntax is much leaner, Java’s line count overtakes the Ruby line count even though the Java code is only for the client library.