Thursday, May 25, 2006

We're in alpha!

Monday, May 22, 2006

Hype and comments

A comment in Gibu's blog:

Enought blogging and constant hyping, how about launching this product that is apparently no different than www.vizrea.com?

Thanks for the criticism. Really, we're working on it; it's difficult to pull off. Come in for a demo and we'll try to change your mind.

Wednesday, May 17, 2006

Server configuration, #2

Capistrano looks good. Simple, clean. Perhaps I'll try it out when I have a bit more time.

Is that the only URL? The Rails wiki is rather empty about this tool.

Tuesday, May 16, 2006

Server configuration

Server configuration is a pain, especially for distributed systems. My problem? I want n A processes running on m boxes talking to p B processes on q boxes, where a m-box can also be a q-box. One issue is each process needs to use its own ports and other processes need to know those ports.

There are so many ways to have one level of indirection, but all require a central bootstrap/lookup.

I suppose something like zeroconf would help, as each process would broadcast its info to the others, but is that too heavyweight?

I looked briefly at Puppet since I'm on a Ruby kick, but it seems too abstract. Why should I have to define a class/object system inside a domain-specific language inside Ruby, when I have Ruby itself? What I mean is, I don't think systems configuration engineers think in terms of inheritance, they think in terms of processes and ports and configuration strings and policies. I get a bad feeling whenever there is a keyword 'class' intended for downstream users.

Friday, May 12, 2006

Too many things

Recompiling for 64-bit architecture.
Performance testing.
Installing application monitoring system at the data center. (wishing centos had a newer Ruby; have to install via rpm ick)
Bug-a-thon #2.
Company going to MI-III.
Going to Santa Cruz for birthday #31.

Wednesday, May 10, 2006

Lines of code

I wanted to know if I have been productive, so I looked at the lines of code I've been writing for the monitoring system. Here it is:
339 Metrics.rb
62 ScMetrics.rb
42 sc_poller.rb
194 webmetrics.rb
637 total

The web site (using Camping) is still less than 200 lines. sc_poller.rb gets metrics from machines. Metrics.rb is a little large, but contains the code generation code and generous comments in case I get hit by a bus and someone needs to read Ruby for the first time. ScMetrics.rb is where I use the code generation and contains the graph definitions; it's the file that tells me how productive I am, since if I want to add a new kind of graph I should only have to add a new definition to this file. 62 lines isn't bad for 10 graph definitions.

Tuesday, May 09, 2006

Today is Bug-a-thon day

Today is a Sharpcast Bug-a-thon day, where we take a release candidate and play with it, that is, we try to break it.

I'm anxious to see how all the pieces--desktop, mobile, and web--fit together for this release, and of course what kind of graphs my monitoring system pumps out when we're using the app simultaneously.

Monday, May 08, 2006

Grokking Ruby metaprogramming

I finally grok metaprogramming in Ruby and am happily generating methods into my subclasses. The trick I had to realize is that I need to view the generated methods as template methods available to "normal" methods. For example, if I have a graph method, it can call a generated filter method to filter what to graph. My monitoring system for the backend of Sharpcast is so much cleaner now.

Another way of describing Ruby metaprogramming--one of many styles--is that you avoid the cost of overriding methods in subclasses by generating the methods you want from the base class into the subclass.

Saturday, May 06, 2006

One reason I like my job

This week I've been writing monitoring and analysis tools in Ruby, adding features and fixing bugs in C++, and reviewing Java APIs. Being able to code in the most appropriate language, using the features of those particular languages, is one reason I really like my job at Sharpcast.

Thursday, May 04, 2006

Camping and microframeworks

I'm loving Camping, a web framework that's 4k in size written in Ruby. I just learned it yesterday. All I need is a simple dynamic web site and I can wrote the whole thing in--let me look--146 lines with comments.

It's great because it's set up to be URL/controller-friendly. What do I mean by that? Most web frameworks force you into some limited URL scheme. Especially Java servlet containers. But I love the REST style and want my URLs to name resources, not actions. (Use HTTP people!)

Boiled down to the actual program, this means that URLs need to map to model objects, the M in MVC. In Camping, you do this:
class Provider < R(/(\d+)/)    
def get provider_id
provider = Provider.find provider_id
# do something with provider object
end
end
This says the URL /3 maps to a Provider object with id 3.

In Java I created an interface called ResourceMapping that mapped between URLs and a Map of objects. I haven't found a Java web framework that provides this kind of emphasis on resources.

Tuesday, May 02, 2006

Yay, graphs!

Sometimes it's those little syntax errors that really bite your butt.

Monday, May 01, 2006

rrdtool

I love it. I hate it. If you are an rrdtool wizard, please email me. COUNTERs are really f'd up with whatever parameters I'm using.