Posts

Testing with Rails

A hint with writing tests with Ruby on Rails.  If you are using fixtures, the name of the fixture is the name of the database table, not the name of the model under test. For instance, this code: class TaskTest < Test::Unit::TestCase   fixtures :tbl_task The symbol :tbl_task is the name of the database table.

ActiveOntology

ActiveOntology is a library, written in Ruby, for easy manipulation of RDF and RDF-Schema models, thru a dynamic DSL based on Ruby idiom. example = RDF::Resource.new "http://www.example.org/index.html" example.namespaces < "http://purl.org/dc/elements/1.1/" example.dc_creator = RDF::Resource.new "http://www.example.org/staffid/85740"

Adjust Log Level in Ruby on Rails

To adjust your log level for a Rails project, you have two options. Edit config/environment.rb and set a global log level. This will override all environments (development, production, etc). Edit config/environments/production.rb , for instance to change production's log level. This is recommended. Simply add the line config.log_level = :warn to set WARN level. This will greatly decrease the amount of logging performed.

Why Not a New Format?

Thinking about what is keeping RDF from wider adoption, I keep coming back to the fact that the serialization is, well, too complex. Why hasn't anyone stepped up to propose a XML syntax that plays well with the thousands of XML tools out there? Let the XML folk say, "I can for the simple syntax, I stayed for the powerful model." The RDF people out there always chant, "It's the model, stupid!" Yes, indeed, and what a simple, powerful, and scalable model it is. It's certainly why people latch onto RDF. The model is RDF's selling point. However, to get it adopted, it's the serialization that must be refactored. People are used to "Right click, view source", and the only way that will work in the semantic web is if the XML for RDF is simple and consistent and predictable . The fact that the same RDF model can be serialized into numerous different, yet semantically equivalent, is enough to drive anyone away. This is a serious bug w...

Oracle 10g Support for RDF

My new job is a lot of "decision support" and "knowledge assessment". This means I can pull out my bag of RDF tricks again to see how I can help the company with metadata models and inferencing. To that end, I began poking and proding the RDF landscape again to see if any viable products pop up. Being an Oracle shop, the first thing I did was try Oracle 10g with its support for RDF on top of Oracle Spatial and their Network Data Model. After a few days of playing with it, here's what I know. It allows me to store RDF as triples directly in the database. It does this by providing a set of procedures and views that extend their Oracle Spatial functionality. Oracle Network Data Model already knows how to store graphs, so it was a logical extension to support RDF (which is a directed graph). There are procedures provided to search the RDF models with a language that looks like a bit like SPARQL. However, only the graph pattern matching parts ( (?x :parentOf ?y...

Web Application Description Language

Marc Hadley has developed a Web Application Description Language (WADL) . It is similar in scope and implementation to WSDL, but is targeted to RESTful web applications and the HTTP verb set. It's very XML centric, but it does make an effort to handle non-XML responses. I'd be curious to see if a response can have different MIME type representations. This can aid clients and servers with content negotiation.

HTTP Reliable Messaging

Image
I have been studying Bill de Hora's HTTPLR Specification for Reliable Messaging using HTTP . All in all I think it's a great start to a somewhat complicated situation. It doesn't address issues like Once-and-only-Once delivery (as multiple clients could download the same message) or ordering of the messages. It does talk about reconciling the message deliveries between client and server, in both directions. The specification makes good use of the HTTP verbs and HTTP status codes, which I love. If they're there, and they apply, use 'em! I'm going to jump into my questions about the specification, so please bear with me. If you have the time, go ahead and read the specification. I'm a little concerned about the use of DELETE when reconciling message upload (as specified in section 8.3 ). The HTTP spec reads "The DELETE method requests that the origin server delete the resource identified by the Request-URI." To me, that says we're deleting ...