Blog Posts tagged with: datomic

Oct 01 2013

Comments

Robert Stuttaford - Cognicast Episode 041

cover art

On this - our first post-merger episode! - we talk to Robert Stuttaford of Cognician about their use of Clojure, ClojureScript, Pedestal, and Datomic.

Listen to or download this episode.

Read More »

Sep 16 2013

Comments

Cognitect - Podcast Episode 040

cover art

In this landmark episode, Craig interviews Justin Gehtland and Rich Hickey as they discuss the merger of Relevance and Metadata Partners (the company behind Datomic) to form a new company: Cognitect. They discuss why they made the decision to join forces, what will stay the same with the products and services that Relevance and Rich currently provide, and what will be different and better. They discuss the choice of the name, and how it reflects the new company's philosophy of craftsmanship and considered design.

This is the final episode of ThinkRelevance: The Podcast; happily, it is also the first episode of The Cognicast.

Listen to or download this episode.

Read More »

Aug 13 2013

Comments

Brenton Ashworth - Podcast Episode 037

cover art

On episode 27, Tim Ewald gave us an overview of Pedestal, Relevance's open source framework for building web applications. We spent most of our time talking about the server side of that technology, but I think the app side of Pedestal is in many ways even more fascinating. Because it contains so many new ideas, it's also something people have had a harder time getting started with.

To help people understand the concepts in Pedestal App, Brenton Ashworth recently authored the Pedestal App Tutorial. I highly recommend people check it out - it's a great resource. On this episode, Brenton does a great job of explaining the concepts in Pedestal App. I'm sure you'll come away with a better understanding of the library. I definitely did. I thank Brenton for taking the time to talk to me!

Download this episode.

Read More »

Jul 26 2013

Comments

Neal Ford of ThoughtWorks - Episode 036

cover art

Those of you lucky enough to have heard Neal Ford speak on anything know that he is one smart, funny, and perceptive dude. It was my great pleasure to have him on the show, where we talked about Evolutionary Architecture, Clojure, Datomic, the poetry of Donald Rumsfeld, the ThoughtWorks Radar, and the role of fake LinkedIn profiles in software development. I thank Neal for joining me on this episode!

Download this episode.

Read More »

Jun 12 2013

Comments

Kurt Zimmer of Room Key - Podcast Episode 033

cover art

Download this podcast episode.

I've said it before: one of the few downsides to working at Relevance is getting to hear all sorts of cool customer success stories that we can't talk about. Which is why Justin and I were thrilled to record an episode with Kurt Zimmer from Room Key, one of our clients and an enthusiastic user of both Clojure and Datomic. We talked about Relevance's relationship with Room Key, and about Kurt's experience successfully selling cutting-edge technologies into extremely large, conservative organizations.

Kurt is a sharp guy, and it was a pleasure to have him as a guest.

While I've got your attention, I'd also like to mention a few things:

Read More »

Oct 12 2012

Comments

Rich Hickey - Podcast Episode 019

cover art

The Datomic team created a bit of a splash this past Wednesday when they released codeq, an open source project built on top of Datomic that lets you import a git repository. You can then run queries against it to find out all sorts of interesting things...at the level of individual functions! Very cool stuff, and I thought our listeners might want to hear more about it. Fortunately, Rich Hickey was kind enough to take a few minutes to enlighten me about the project.

Download the episode here. Hopefully you'll find it as interesting as I did!

Read More »

Sep 21 2012

Comments

Using Datomic from Ruby

We are all very jazzed at Relevance about Datomic. But so far, the people working on JVM projects have had all the fun, as Datomic's peer capabilities are exposed as a JVM library.

That changed a few weeks ago when the REST API for Datomic was announced. Suddenly, we have client access to Datomic from any language we choose. We quickly came up with a Ruby client for Datomic and an edn data reader and writer for Ruby. (edn is the data format Datomic uses for input and output, and by implementing edn in Ruby, we get to use native Ruby data to talk with Datomic.

Over the last two days, I've created a sample application using Ruby and Datomic. It is a wiki which saves all its data in Datomic and can read the history of pages from there, using only a few simple queries. The really interesting part is how easily we were able to use Ruby data structures in the place of edn to make easy-to-manipulate and easy-to-read schemas and queries. Here's the DB schema in Ruby:

[{:"db/id" => id(:"db.part/db"),
  :"db/ident" => :"page/name",
  :"db/valueType" => :"db.type/string",
  :"db/cardinality" => :"db.cardinality/one",
  :"db/fulltext" => true,
  :"db/doc" => "The name of a page.",
  :"db/unique" => :"db.unique/value",
  :"db/index" => true,
  :"db.install/_attribute" => ":db.part/db"
},
{:"db/id" => id(:"db.part/db"),
 :"db/ident" => :"page/text",
 :"db/valueType" => :"db.type/string",
 :"db/cardinality" => :"db.cardinality/one",
 :"db/fulltext" => true,
 :"db/doc" => "The text of a page.",
 :"db.install/_attribute" => ":db.part/db"
}]

There are only a few differences between edn and this: mainly, edn keywords allow more characters than Ruby symbol literals, so we have to quote the symbols in Ruby.

Queries are even more fun:

datomic.query(dbname, [:find, ~"?id", ~"?name", ~"?text",
                       :in, ~"$db", ~"?name",
                       :where,
                         [~"$db", ~"?id", :"page/name", ~"?name"],
                         [~"$db", ~"?id", :"page/text", ~"?text"]],
                      :args => [{:"db/alias" => "example/wiki"}, name])

Given a variable name, this will pull back the DB id, name, and text for the page named that in Datomic. In this data structure, you'll notice one thing that probably isn't familiar to most Rubyists. The tilde (~) is used as a unary operator on strings to create edn symbols, which don't have an analog in Ruby. This capability is added by edn-ruby, our edn reader and writer.

To see the entire history of a page, we can write this query:

datomic.query(dbname, [:find, ~"?v", ~"?time", ~"?tx",
                       :in, ~"$cur", ~"$hist", ~"?uniq-attr", ~"?uniq-val", ~"?hist-attr",
                       :where,
                         [~"$cur",  ~"?e",  ~"?uniq-attr", ~"?uniq-val"],
                         [~"$cur",  ~"?tx", ~":db/txInstant", ~"?time"],
                         [~"$hist", ~"?e",  ~"?hist-attr", ~"?v", ~"?tx", true]],
                      :args => [
                        {:"db/alias" => dbalias},
                        {:"db/alias" => dbalias, :history => true},
                        :"page/name",
                        name,
                        :"page/text"])

Is this particularly Ruby-ish right now? No, not yet. Is it very cool? Yes, definitely. Datomic queries are built out of data structures: arrays, hashes, and other primitive data types, which allows us to easily use map, inject, and other Enumerable methods with them. A significant source of power and concision in queries comes from the use of not one, but two distinct data types for identifiers: symbols and keywords. Most languages cannot come close to this expressiveness, but Ruby handles it with ease. Ruby symbols can act as both identifier types, with the sly introduction of a unary operator "~" to distinguish them.

We have just begun to see what kind of amazing applications we can build with Datomic. Follow the Ruby Datomic client and the sample Ruby/Datomic wiki on Github to see what we come up with next.

Jul 31 2012

Comments

Rich Hickey - Podcast Episode 014

cover art

I recently found myself in Durham at the same time as Rich Hickey. Obviously, Rich has quite a few major accomplishments under his belt, including creating Clojure, ClojureScript, and Datomic, three technologies I personally use and love. Understandably, I think, I've wanted to have him on the podcast since the show started.

As it happens, Rich is also a super nice guy, and was therefore kind enough to sit down for a few minutes and indulge me. I really enjoyed our conversation about Clojure, music, Datomic, the fascinating question of whether our ears have a "focus" mechanism, how to design things by taking them apart, and a variety of other topics. I'm sure you'll enjoy listening to this episode as much as I enjoyed recording it!

Download the episode here.

Read More »

Apr 26 2012

Comments

ThinkRelevance: The Podcast - Episode 010 - Stu Halloway

cover art

One of the hardest things about working at Relevance over the last couple of years has been keeping quiet about Datomic. So when we heard that Datomic was being released, I immediately sent an email to Stuart Halloway asking if he'd be willing to do a podcast episode, not just because he had such a big hand in Datomic, but because as one of the founders of Relevance and as an all-around interesting guy I knew it would make for a great show.

I don't think I was wrong. So have a listen as we talk about Datomic, simulation testing, a capella music, and what makes Stu want to drop-kick a gorilla, and see if you agree. Thanks for listening!

Download the episode here.

Read More »

Mar 29 2012

Comments

Datomic services

For almost two years, we've been working with Rich Hickey to realize his vision for a next generation database: Datomic. If you haven't looked into Datomic yet, check out the videos at the end of this post, and read the whitepaper.

Now that Datomic has launched, we are excited to make it an option for our customers. We have a limited number of development teams available as they roll off other projects; two slots are currently available, on April 30th and May 21st. Our teams can help you get started, or take your project all the way to the finish line (read more about how we work). If you think you have a project that Datomic is a fit for, and you would like to apply for one of these slots, contact us at datomic@thinkrelevance.com.

Read More »

Popular Tags