Forum: JRuby embedded db for Jruby

2d1b64aaf61046ad166db3009fa8c7dc?d=identicon&s=25 Charles Monteiro (Guest)
on 2013-05-17 19:31
(Received via mailing list)
hi all,

I'm looking for an embedded database that I would use for jrubyfx
desktop app. Ideally it would be the same database that I would use for
a common repository  but it probably wont' be since I want to use Heroku
add ons or other PaaS.  I guess push come to shove I can do Amazon.

I went back to the Jruby book and that basically was about using rdms
via ActiveRecord which is ok but not ideal. If I went down that path I
know I could use Derby which is embeddable and can be run also in
network mode. Packaging Derby with the app is painless. There's of
course sqllite and given that every OS out there basically supports it
including iOS and Android it might make a great choice but again
ActiveRecord. Yes, there's a mobile component as well to my effort so
that context is a consideration.

Coming from a strong Object Db background an object db with tranparent
semantics  would be great but I can't seem to find one. I don't want a
in-memory db strategy. The datasets locally will be large enough that
you would not want to load the entire db into memory.

I have looked at TouchDB which has CouchDB and Couchbase Server as
network counterparts but that seems to be a bit up in the air and not
sure how much that buys me. Frankly, ActiveRecord looks cleaner.

As I write this i bump into db4o by Versant which had a Smalltalk OODMS,
looks great, its Java based so hooking it up to JRuby should be do-able.
but its GPL which is a problem because the project is a low priced app
for sale and making the licensing costs will be well probably impossible
for a few years if lucky.

Anyhow I'm getting stuck looking for the perfect fit, I figured some
here may have gone done the same path. Of course JRuby integration is
key. Any feedback is appreciated.

thanks




Charles Monteiro
jruby@smallruby.com
8bc8621ef6a6d981a4a41c5069f530cf?d=identicon&s=25 Steven McCraw (Guest)
on 2013-05-17 19:46
(Received via mailing list)
For relational, Derby is nice because it actually ships with java 7
out of the box now.  Lately I've been using Titan with Cassandra
embedded on the back end (accessed through the pacer gem), and it has
been awesome stuff so far. I'm not qualified to weigh the pros and
cons of graph vs relational across the board, but coming from a
relational background, I'm really happy with graph at the moment. Hope
this helps!

Mark

Sent from my mobile device. Apologies for brevity.
C983ad33b47479f17a28e083e1bb3d8b?d=identicon&s=25 Eric West (edubkendo)
on 2013-05-17 20:37
(Received via mailing list)
I've recently come across https://github.com/Softmotions/ejdb which
looks
like it could be worth exploring, it's based on TokyoCabinet. You'd
probably want the java binding and not the ruby binding. I've been
thinking
about using https://github.com/andreasronge/neo4j , which shouldnt be
hard
to embed . I've not yet tried either.

Another possibility is trying to get
http://open-dolphin.org/dolphin_website/Home.html working with jrubyfx.
Here the idea is that you have a desktop app with views written in
javafx
on the client and the controllers, database, etc running in a seperate
process or on a server.

Anyways, just thought I'd toss a few more possibilities at you.
Eric
13313ac2ec7ba7c43b1b952db034ff3b?d=identicon&s=25 Thomas E Enebo (Guest)
on 2013-05-17 20:40
(Received via mailing list)
I don't know how suited neo4j is for embedded development but it is a
graph
database.  So perhaps it might be closer to being able to model
OODBMS-like
constructs an RDBMS.

-Tom
2c0c4cf3ccc8da22f7c3b9586ce1cd70?d=identicon&s=25 Christian MICHON (Guest)
on 2013-05-17 20:45
(Received via mailing list)
I would suggest H2 database in embedded mode (google for h2database,
no white space) if you're looking for a SQL database.

We've used it with many jruby based applications as it is a native
java library, and it's really more powerful and complient than sqlite
(where you'd need os dependent bindings).

Lastly, I would suggest to use sequel as ORM instead of activerecord.

If you're looking for NoSQL database, I would suggest Neo4j (graph),
OrientDB (graph+document) or Akiban Persistit (key-value store): again
all 3 are pure java libs.

Good luck.


On 5/17/13, Charles Monteiro <jruby@smallruby.com> wrote:
> Packaging Derby with the app is painless. There's of course sqllite and
> counterparts but that seems to be a bit up in the air and not sure how much
> feedback is appreciated.
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>
>


--
Christian
2d1b64aaf61046ad166db3009fa8c7dc?d=identicon&s=25 Charles Monteiro (Guest)
on 2013-05-17 21:07
(Received via mailing list)
thanks, they claim its highly suitable , and yes graphs are better than
document dbs in modeling natural object relations , the querying is not
natural looking at all but overall I can't do their license

Charles Monteiro
jruby@smallruby.com
2d1b64aaf61046ad166db3009fa8c7dc?d=identicon&s=25 Charles Monteiro (Guest)
on 2013-05-17 21:16
(Received via mailing list)
I actually do use Sequel for a separate project and its a nice
framework.

I had seen OrientDB before I'll give it further thought, a nice combo of
graph and document , however I did not like the sql querying semantics

Charles Monteiro
jruby@smallruby.com
8bc8621ef6a6d981a4a41c5069f530cf?d=identicon&s=25 Steven McCraw (Guest)
on 2013-05-18 03:19
(Received via mailing list)
Neo4j looks great, but I couldn't use it for the same reason
(licensing).
Titan/Cassandra has filled that gap nicely for me, though, and pacer has
proved to be a great framework (even if a tad under documented). They
both
seem to have smart, supportive people behind them.

Sent from my mobile device. Apologies for brevity.

On May 17, 2013, at 3:04 PM, Charles Monteiro <jruby@smallruby.com>
wrote:

thanks, they claim its highly suitable , and yes graphs are better than
document dbs in modeling natural object relations , the querying is not
natural looking at all but overall I can't do their license

Charles Monteiro
jruby@smallruby.com



On May 17, 2013, at 2:36 PM, Thomas E Enebo <tom.enebo@gmail.com> wrote:

I don't know how suited neo4j is for embedded development but it is a
graph
database.  So perhaps it might be closer to being able to model
OODBMS-like
constructs an RDBMS.

-Tom
2d1b64aaf61046ad166db3009fa8c7dc?d=identicon&s=25 Charles Monteiro (Guest)
on 2013-05-21 05:05
(Received via mailing list)
I briefly looked at Titan and then at Neo4j whose license is to onerous
to risk. I'll check it out again, graph dbs are the closest I guess to
OO although their query api is not natural feeling  i.e. not Ruby but I
will also check out the pacer gem , perhaps it deals with that as well

thanks

Charles Monteiro
jruby@smallruby.com
2d1b64aaf61046ad166db3009fa8c7dc?d=identicon&s=25 Charles Monteiro (Guest)
on 2013-05-21 06:03
(Received via mailing list)
thanks, I actually talked to Neo4j , again onerous license, you better
have VC if you want to do anything commercial although they did say that
"they would look the other way" , contractually you on the hook .


Dolphin is actually quite interesting , i had studied building something
along those lines using memory pipes for local interchange

Charles Monteiro
jruby@smallruby.com
Da7e5a2c5b1bd8139704db94b37e068d?d=identicon&s=25 Joshua Ballanco (Guest)
on 2013-05-26 14:23
(Received via mailing list)
I'm guessing that your needs will exceed its capabilities… but have you
looked at PStore? Its major plus is that it's included with the Ruby
standard library by default.

--
Joshua Ballanco
Chief Scientist
Burnside Digital
1771 NW Pettygrove Street, Suite 140
Portland, OR 97209

P  +1.866.863.7365
F  +1.877.658.6313
M +1.646.463.2673
C +90.533.085.5773
2d1b64aaf61046ad166db3009fa8c7dc?d=identicon&s=25 Charles Monteiro (Guest)
on 2013-05-28 20:53
(Received via mailing list)
I have used PStore  and probably not , from what I can tell PStore
relies on loading the entire file into memory, so I think that a Derby
under something like DataMapper should work well enough at least for
local personal data

Charles Monteiro
jruby@smallruby.com
A0115f55013f69b2d8286ac655478cf8?d=identicon&s=25 H. Sasse (Guest)
on 2013-05-28 23:03
(Received via mailing list)
I'm not sure if this will meet your requirements, but there is
Kirbybase

https://github.com/manveru/KirbyBase

Pure ruby flat file
database. I've used it before, but not for a while: I thought it had
vanished.

On 28.05.2013 19:47, Charles Monteiro wrote:

> I have used
PStore and probably not , from what I can tell PStore relies on loading
the entire file into memory, so I think that a Derby under something
like DataMapper should work well enough at least for local personal data

>
> Charles Monteiro
> jruby@smallruby.com [11]
>
> On May 26,
2013, at 8:21 AM, Joshua Ballanco <jballanco@burnsidedigital.com [12]>
wrote:
>
>> I'm guessing that your needs will exceed its capabilities…
but have you looked at PStore? Its major plus is that it's included with
the Ruby standard library by default.
>>
>> --
>> Joshua Ballanco
>>
Chief Scientist
>> Burnside Digital
>>
>> 1771 NW Pettygrove Street,
Suite 140
>> Portland, OR 97209
>>
>> P +1.866.863.7365
>> F
+1.877.658.6313
>> M +1.646.463.2673
>> C +90.533.085.5773
>>
>> On
Friday, May 17, 2013 at 10:01 PM, Charles Monteiro wrote:
>>
>>>
thanks, I actually talked to Neo4j , again onerous license, you better
have VC if you want to do anything commercial although they did say that
"they would look the other way" , contractually you on the hook .
>>>

>>> Dolphin is actually quite interesting , i had studied building
something along those lines using memory pipes for local interchange
>>>

>>> Charles Monteiro
>>> jruby@smallruby.com [9]
>>>
>>> On May 17,
2013, at 2:33 PM, Eric West <esw9999@gmail.com [10]> wrote:
>>>
>>>>
I've recently come across https://github.com/Softmotions/ejdb [5] which
looks like it could be worth exploring, it's based on TokyoCabinet.
You'd probably want the java binding and not the ruby binding. I've been
thinking about using https://github.com/andreasronge/neo4j [6] , which
shouldnt be hard to embed . I've not yet tried either.
>>>> Another
possibility is trying to get
http://open-dolphin.org/dolphin_website/Home.html [7] working with
jrubyfx. Here the idea is that you have a desktop app with views written
in javafx on the client and the controllers, database, etc running in a
seperate process or on a server.
>>>> Anyways, just thought I'd toss a
few more possibilities at you.
>>>> Eric
>>>>
>>>> On Fri, May 17,
2013 at 12:44 PM, Steven McCraw <smmccraw@gmail.com [8]> wrote:
>>>>

>>>>> For relational, Derby is nice because it actually ships with java
7
>>>>> out of the box now. Lately I've been using Titan with
Cassandra
>>>>> embedded on the back end (accessed through the pacer
gem), and it has
>>>>> been awesome stuff so far. I'm not qualified to
weigh the pros and
>>>>> cons of graph vs relational across the board,
but coming from a
>>>>> relational background, I'm really happy with
graph at the moment. Hope
>>>>> this helps!
>>>>>
>>>>> Mark
>>>>>

>>>>> Sent from my mobile device. Apologies for brevity.
>>>>>
>>>>>
On May 17, 2013, at 1:29 PM, Charles Monteiro <jruby@smallruby.com [1]>
wrote:
>>>>>
>>>>> > hi all,
>>>>> >
>>>>> > I'm looking for an
embedded database that I would use for jrubyfx desktop app. Ideally it
would be the same database that I would use for a common repository but
it probably wont' be since I want to use Heroku add ons or other PaaS. I
guess push come to shove I can do Amazon.
>>>>> >
>>>>> > I went back to
the Jruby book and that basically was about using rdms via ActiveRecord
which is ok but not ideal. If I went down that path I know I could use
Derby which is embeddable and can be run also in network mode. Packaging
Derby with the app is painless. There's of course sqllite and given that
every OS out there basically supports it including iOS and Android it
might make a great choice but again ActiveRecord. Yes, there's a mobile
component as well to my effort so that context is a consideration.
>>>>>
>
>>>>> > Coming from a strong Object Db background an object db with
tranparent semantics would be great but I can't seem to find one. I
don't want a in-memory db strategy. The datasets locally will be large
enough that you would not want to load the entire db into memory.
>>>>>
>
>>>>> > I have looked at TouchDB which has CouchDB and Couchbase
Server as network counterparts but that seems to be a bit up in the air
and not sure how much that buys me. Frankly, ActiveRecord looks
cleaner.
>>>>> >
>>>>> > As I write this i bump into db4o by Versant
which had a Smalltalk OODMS, looks great, its Java based so hooking it
up to JRuby should be do-able. but its GPL which is a problem because
the project is a low priced app for sale and making the licensing costs
will be well probably impossible for a few years if lucky.
>>>>> >
>>>>>
> Anyhow I'm getting stuck looking for the perfect fit, I figured some
here may have gone done the same path. Of course JRuby integration is
key. Any feedback is appreciated.
>>>>> >
>>>>> > thanks
>>>>> >
>>>>>
>
>>>>> >
>>>>> >
>>>>> > Charles Monteiro
>>>>> > jruby@smallruby.com
[2]
>>>>> >
>>>>> >
>>>>> >
>>>>> >
>>>>> >
---------------------------------------------------------------------
>>>>>
> To unsubscribe from this list, please visit:
>>>>> >
>>>>> >
http://xircles.codehaus.org/manage_email [3]
>>>>> >
>>>>> >
>>>>>

>>>>>
---------------------------------------------------------------------
>>>>>
To unsubscribe from this list, please visit:
>>>>>
>>>>>
http://xircles.codehaus.org/manage_email [4]



Links:
------
[1]
mailto:jruby@smallruby.com
[2] mailto:jruby@smallruby.com
[3]
http://xircles.codehaus.org/manage_email
[4]
http://xircles.codehaus.org/manage_email
[5]
https://github.com/Softmotions/ejdb
[6]
https://github.com/andreasronge/neo4j
[7]
http://open-dolphin.org/dolphin_website/Home.html
[8]
mailto:smmccraw@gmail.com
[9] mailto:jruby@smallruby.com
[10]
mailto:esw9999@gmail.com
[11] mailto:jruby@smallruby.com
[12]
mailto:jballanco@burnsidedigital.com
0e6ac58dab6125c1cd2e7ac645076b6f?d=identicon&s=25 Joel VanderWerf (Guest)
on 2013-05-29 00:29
(Received via mailing list)
On 05/28/2013 11:47 AM, Charles Monteiro wrote:
> I have used PStore  and probably not , from what I can tell PStore
> relies on loading the entire file into memory, so I think that a Derby
> under something like DataMapper should work well enough at least for
> local personal data

Another suggestion: my FSDB gem:

https://rubygems.org/gems/fsdb

It's an file-backed object database. You can use marshal, yaml, or other
serialization. Each file is loaded entirely, so this may work for you if
you can break up your data into many smaller files.
2cda9758c673339fc208518b9756479b?d=identicon&s=25 Colin Surprenant (Guest)
on 2013-05-29 15:03
(Received via mailing list)
If you can live with a key/value store, take a look at LevelDB
https://code.google.com/p/leveldb/ - it is an embeddable DB library. See
excellent post by Ilya Grigorik on the subject:
http://www.igvita.com/2012/02/06/sstable-and-log-s...

Note that the listed gem in that post will not work with JRuby since it
contains C extensions but you can look into these alternatives for Java:
https://github.com/dain/leveldb
https://github.com/fusesource/leveldbjni

Looking at the leveldb-ruby gem, it shouldn't be that hard to rewrite
the
bindings to use FFI.

Colin


On Tue, May 28, 2013 at 6:28 PM, Joel VanderWerf
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.