Mojolicious and NoSQL

135 views
Skip to first unread message

Scott

unread,
Nov 7, 2010, 11:53:40 PM11/7/10
to Mojolicious
What are some of the NoSQL databases being used by different
Mojolicious users. I seen CouchDB mentioned on the wiki and Riak
hinted at on Twitter. Any users of MongoDB? Is any a better fit for
Mojolicious?

Thanks, Scott

lenz

unread,
Nov 8, 2010, 12:17:37 AM11/8/10
to mojol...@googlegroups.com
hi,

i use mojolicious only with couchdb, never tried it actually running
with anything else :-)

i mentioned it in here here briefly:
http://www.slideshare.net/norbu09/mojolicious-4055266 but couch is a
very natural fit never mind if you query it directly or with a
library.

what use case do you have? riak is nice as well as mongodb but they
both really start showing their strength only if you have multiple
servers and somewhat larger setups.

cheers
lenz

> --
> You received this message because you are subscribed to the Google Groups "Mojolicious" group.
> To post to this group, send email to mojol...@googlegroups.com.
> To unsubscribe from this group, send email to mojolicious...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/mojolicious?hl=en.
>
>

--
twitter: @norbu09
current project: iWantMyName.com

Sebastian Riedel

unread,
Nov 8, 2010, 4:34:39 AM11/8/10
to mojol...@googlegroups.com
> What are some of the NoSQL databases being used by different
> Mojolicious users.

I'm a fan of Riak and Riak-Search.

--
Sebastian Riedel
http://blog.kraih.com
http://mojolicious.org
http://twitter.com/kraih

Gabriel Vieira

unread,
Nov 8, 2010, 10:12:17 AM11/8/10
to mojol...@googlegroups.com

And I used Mojolicious with MongoDB.


--
Gabriel Vieira

Scott

unread,
Nov 8, 2010, 2:19:41 PM11/8/10
to Mojolicious
> what use case do you have?

I was looking at doing a custom CMS. A Mojolicious app connecting to
a different DB per web domain (or same DB with documents named after
the web domain). The DB does not need to have relational logic. I
would also like to store photos in the DB, so I was looking at MongoDB
(GridFS). I need to read more about the REST interfaces of Couch and
Riak, it seems intriguing. Sebastian's interest in Riak has got me
intrigued. He seems pretty smart. :)

What are some of the reasons for your choices?

Scott

lenz

unread,
Nov 8, 2010, 3:56:10 PM11/8/10
to mojol...@googlegroups.com
hi,

On Tue, Nov 9, 2010 at 8:19 AM, Scott <keen...@gmail.com> wrote:
>
> What are some of the reasons for your choices?
>

when i started with NoSQL CouchDB was pretty much the only "production
ready" option ... i am stuck with it since then and even though i
looked at several others i love it for projects from small to large.
we use it in production since more than two years with several
projects and never looked back.

i run the local NoSQL user group and we had quite some discussions
about several databases and from the looks many of them are really
interesting but so far CouchDB is the only one serving a very broad
usage pattern from small projects to larger ones.

i love riak and the ideas behind it and it is a very likely option for
some projects i am looking at in the moment but for a simple CMS i
think it might be a bit overkill :-)

cheers
lenz

Ulrich Habel

unread,
Nov 18, 2010, 6:35:20 AM11/18/10
to mojol...@googlegroups.com
I just saw your mail - and started to experiment with some NoSQL
databases. I used memcache at my site before I started with Mojolicious
and I found memcache an incredible key/value store.

Membase is a persistent layer to memcache so you can store key/value pairs
in memory and on disk. So if you put a key into membase it's stored on the
disk and kept in memory. Once the information is no longer needed (after a
certain time when memcache fills) it comes to the point where your
key/value is being flushed from the cache. Once it's accessed - it will be
fetched from the disk and being kept in memory again - just like memcache
will do it.

So - it's not a database style like CouchDB with cool query options and
map_reduce, it's just a key/value store.

Hej, I like bdb from former times - so it seems to be natural to me :)

Regards
Uli

Scott

unread,
Dec 16, 2010, 1:34:06 PM12/16/10
to Mojolicious
Thanks for all the feedback. I have spent a good amount of time
researching and I'm forging ahead with CouchDB through CouchDB::Client
at this time. I noticed the wiki stated on the Database-support page
that there were examples on the wiki regarding CouchDB and
Mojolicious, but I cannot find them. Do they exist?

Thanks,
Scott

lenz

unread,
Dec 16, 2010, 2:39:29 PM12/16/10
to mojol...@googlegroups.com
just because this thread came up again ... i write a AMQP endpoint in
Mojolicious in the moment that caches data to redis. once the whole
thing works well enough to share it i'll post it on github. it will
work as a websocket/ajax server for asynchronous AMQP requests from
our main catalyst app.

... no couchdb in that one but NoSQL :-)

cheers
lenz

> --
> You received this message because you are subscribed to the Google Groups "Mojolicious" group.
> To post to this group, send email to mojol...@googlegroups.com.
> To unsubscribe from this group, send email to mojolicious...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/mojolicious?hl=en.
>
>

--

Ulrich Habel

unread,
Dec 16, 2010, 5:49:14 PM12/16/10
to mojol...@googlegroups.com

> Mojolicious, but I cannot find them. Do they exist?


Unfortunatelly - there are no examples about using CouchDB with Mojo
inside the wiki. lenz (I think) made a presentation and he made one slide
about querying CouchDB from Mojo.

The code snippet looks like this:

my $client = Mojo::Client->new;
my $url = $couch_user_url.
"=key="'.$self->session->{'name'}.'"';

my $view = $client->get($url)->success->json->{rows}->[0]->{doc};


Does that help you to get an idea?

Regards

Uli


lenz

unread,
Dec 16, 2010, 6:20:13 PM12/16/10
to mojol...@googlegroups.com
On Fri, Dec 17, 2010 at 11:49 AM, Ulrich Habel <rh...@cpan.org> wrote:
>
>> Mojolicious, but I cannot find them.  Do they exist?
>
>
> Unfortunatelly - there are no examples about using CouchDB with Mojo
> inside the wiki. lenz (I think) made a presentation and he made one slide
> about querying CouchDB from Mojo.

i can publish some more code in the coming days, just have to clean up
all my stuff :-)

cheers
lenz

Ulrich Habel

unread,
Dec 16, 2010, 6:40:49 PM12/16/10
to mojol...@googlegroups.com

> i can publish some more code in the coming days, just have to clean up
> all my stuff :-)
>

ah :) There you are! Yes, that would be awesome. Could you open a nice wiki page for the couchdb things? I refactored my ORLite stuff recently, I know it's horrible to polish old code. However, we really have a need for some more documentation especially on the data storage side of things. As sri managed to publish a 1.0xx as release candidate Mojolicious might get more attention soon.

I'll work on the membase stuff, I promise!

Thanks for your help!
Uli

lenz

unread,
Dec 16, 2010, 7:20:40 PM12/16/10
to mojol...@googlegroups.com
i created a stub in the wiki ... please keep pushing me in case i
don't update it any time soon.

cheers
lenz

> --
> You received this message because you are subscribed to the Google Groups "Mojolicious" group.
> To post to this group, send email to mojol...@googlegroups.com.
> To unsubscribe from this group, send email to mojolicious...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/mojolicious?hl=en.
>
>

--

Reply all
Reply to author
Forward
0 new messages