29 April 2009

Clojure on Google AppEngine

Last night, I went with a co-worker to an Atlanta Clojure User Group meeting about Clojure on Google AppEngine given by John Hume. I'd watched a few videos on AppEngine and read up a little on Clojure beforehand but still ended up with more questions than answers. Thus:

  • Even though they use JDO, GoogleAppEngine's approach to data seems informed more by its MapReduce/massive data access approach and is sorta schema-less. My first thought was that relational databases manage statically typed data and GAE's datastore manages dynamically typed data. Dunno. Someone at the meeting compared it to CouchDB.
  • Afterwards the discussion of the value of stored procedures came up and it seemed to have some relevance to datastore issues. Many design decisions hinge on where you draw the line between data type and data manipulation. At its simplest: a type is a number or string or somesuch, but type systems can also define mutability or basic validation, etc. At what point does the definition of a type stop being type and start being business logic? (Answer: depends on your tools.) I'm currently working on a defect at work where the SQL DDL puts restrictions on a field, but code "has to" exist in both the HTML and Servlet layers to perform similar validation. This seems to me to be a type system defined across three domains, although it may be poor design. Considering how often I see this, I suspect it's a limitation of the languages involved.
  • After you use your application, GAE will generate an XML file that describes what indexes you'll need. Neat.
  • Middleware: Ring (Clojure), WSGI (Python), Rack (Ruby). Trying to map their similarities/differences with Servlets (Java).
[ posted by sstrader on 29 April 2009 at 9:40:38 AM in Programming ]