Need some Aqua?

1 view
Skip to first unread message

Rue the Ghetto

unread,
Nov 18, 2009, 5:47:46 PM11/18/09
to couc...@googlegroups.com
Hi,

Working with CouchRest (on a couple production apps) got me thinking that it would be relatively easy to go from a Ruby object to the kind of hash that CouchRest stores. So, I started spiking a library where the database abstraction layer (CouchRest) was nearly transparent. The gem is called Aqua, and right after I did that small amount of proof-of-concept work on it, I wrote a proposal to RubyConf. So, I am speaking this Friday at RubyConf about Aqua ... which is still very alpha release.

In addition to giving a heads up and a nod of thanks for inspiration, I wanted to see if the work that I did on creating a CouchDB ruby adapter could help with CouchRest. Although I originally created Aqua using the CouchRest core, I ended up writing my own library to connect Ruby with CouchDB. Mostly I did this to get everything in the core API tested and a super clean. 

So if CouchRest gets a gung-ho maintainer and wants to share a core CouchDB API base, I would be happy to do the extraction work on Aqua. I think it would benefit both projects to have a core library that handles all the CouchDB API essentials.

At any rate, if you find yourself at RubyConf, check out my talk or come grab me for a conversation. I would love to talk with other CouchDB enthusiasts.  

Urls for the talk and code are 
Talk: http://www.rubyconf.org/talks/127-aqua-a-cool-clear-drink-of-ruby-object-persistence
Code: http://github.com/baccigalupi/aqua

Kane

Matt Aimonetti

unread,
Nov 18, 2009, 5:49:36 PM11/18/09
to couc...@googlegroups.com
I'm speaking on Saturday (MacRuby stuff), let's try to catch up and discuss your project, it sounds very interesting.

- Matt

--

You received this message because you are subscribed to the Google Groups "CouchRest" group.
To post to this group, send email to couc...@googlegroups.com.
To unsubscribe from this group, send email to couchrest+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/couchrest?hl=.

Paul Campbell

unread,
Nov 18, 2009, 8:34:08 PM11/18/09
to couc...@googlegroups.com
This looks awesome. Will definitely check out the talk. If this "just
works" then there's potential for a nice paradigm shift (or at least
realign)! Looking forward to it!
> --
>
> You received this message because you are subscribed to the Google Groups
> "CouchRest" group.
> To post to this group, send email to couc...@googlegroups.com.
> To unsubscribe from this group, send email to
> couchrest+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/couchrest?hl=.
>



--


Paul Campbell
pa...@rushedsunlight.com
- - - - - - - - - - - - - - - - - - -
blog http://www.pabcas.com
twitter http://www.twitter.com/paulca
github http://www.github.com/paulca
phone +353 87 914 8162
- - - - - - - - - - - - - - - - - - -

Nicholas Orr

unread,
Nov 18, 2009, 9:47:00 PM11/18/09
to couc...@googlegroups.com
The idea is sound and I like it in "theory".

My current production app [1] has information stored in different databases on purpose to facilitate simple moving of related info to some other couchdb instance if required.

Looking briefly at the docs I don't see how I can do this in Aqua.

So when it comes to applying the theory to real world - I don't know how to go about "making the leap" so to speak. Specifically how to set which db to use [2]

Other than that I like the idea of working with regular objects, it does make sense.

Thanks,

Nick

[1] MagnitudeCMS.com

--

Rue the Ghetto

unread,
Nov 18, 2009, 11:23:43 PM11/18/09
to couc...@googlegroups.com
Nick,

You definitely shouldn't start using Aqua for a production application. It is uber alpha. Along with its new born status is a generous lack of documentation, although I did write a lot of rdocs already.  

The CouchDB layer definitely allows for easy setting of the class database. It really isn't that far away from the CouchRest core layer in terms of functionality. In Aqua-land it is almost implemented, but not quite there. 

The way it should work is like this:

class User
  aquatic :database => 'my_database_name' # plus whatever other options are needed
end

Aqua's CouchDB server object acts as a namespacing device, so an application could have a series of databases all with the same prefix, without much effort. By default all the objects are dumped into a database named 'aqua'.

Matt, we should definitely connect at the conference.

-- Kane

Nathan Stott

unread,
Nov 19, 2009, 10:01:59 AM11/19/09
to couc...@googlegroups.com
Why in the Ruby world is it so popular to put static methods on classes in order to perform data access?  This seems very limiting for situations like Kane described.  Why not have a service class that is responsible for retrieving instances of the model?  If that were the architecture then you could have User models retrieved from multiple databases just by retrieving them with service instantiated with different parameters.

Nicholas Orr

unread,
Nov 19, 2009, 3:50:11 PM11/19/09
to couc...@googlegroups.com
Thanks Kane,

I wouldn't use Aqua in production, I am mearly looking at how would I apply Aqua to a working application, how do the ideas presented in Aqua work in the real world, etc

Like I mentioned the theory is sound. My limiting factor is translating theory into real world practicality :)

So right now I get the basics, however the basics are usually way off when it comes to real applications and functionality.

Regards,

Nick 

Matt Aimonetti

unread,
Nov 24, 2009, 1:37:22 AM11/24/09
to couc...@googlegroups.com
Kane, sorry I missed you on Friday. Maybe we should start a new thread on how to get Aqua and CouchRest to work together.

- Matt
Reply all
Reply to author
Forward
0 new messages