Embedded db for Jruby

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 M.
[email protected]

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.

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

I’ve recently come across GitHub - Softmotions/ejdb: 🏂 EJDB2 — Embeddable JSON Database engine C library. Simple XPath like query language (JQL). Websockets / Android / iOS / React Native / Flutter / Java / Dart / Node.js bindings. Docker image. 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 GitHub - neo4jrb/activegraph: An active model wrapper for the Neo4j Graph Database for Ruby. , 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

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 M.
[email protected]

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 M. [email protected] 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

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 M. [email protected]
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 M.
[email protected]

On May 17, 2013, at 2:36 PM, Thomas E Enebo [email protected] 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

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 M.
[email protected]

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 M.
[email protected]

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 M.
[email protected]

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 M.
[email protected]

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 B.
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

I’m not sure if this will meet your requirements, but there is
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 M. 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 M.
[email protected] [11]

On May 26,
2013, at 8:21 AM, Joshua B. <[email protected] [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 B.

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 M. 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 M.
[email protected] [9]

On May 17,
2013, at 2:33 PM, Eric West <[email protected] [10]> wrote:

I’ve recently come across GitHub - Softmotions/ejdb: 🏂 EJDB2 — Embeddable JSON Database engine C library. Simple XPath like query language (JQL). Websockets / Android / iOS / React Native / Flutter / Java / Dart / Node.js bindings. Docker image. [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 GitHub - neo4jrb/activegraph: An active model wrapper for the Neo4j Graph Database for Ruby. [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 <[email protected] [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 M. <[email protected] [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 M.
[email protected]
[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:[email protected]
[2] mailto:[email protected]
[3]
http://xircles.codehaus.org/manage_email
[4]
http://xircles.codehaus.org/manage_email
[5]
GitHub - Softmotions/ejdb: 🏂 EJDB2 — Embeddable JSON Database engine C library. Simple XPath like query language (JQL). Websockets / Android / iOS / React Native / Flutter / Java / Dart / Node.js bindings. Docker image.
[6]
GitHub - neo4jrb/activegraph: An active model wrapper for the Neo4j Graph Database for Ruby.
[7]
http://open-dolphin.org/dolphin_website/Home.html
[8]
mailto:[email protected]
[9] mailto:[email protected]
[10]
mailto:[email protected]
[11] mailto:[email protected]
[12]
mailto:[email protected]

On 05/28/2013 11:47 AM, Charles M. 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.

If you can live with a key/value store, take a look at LevelDB
GitHub - google/leveldb: LevelDB is a fast key-value storage library written at Google that provides an ordered mapping from string keys to string values. - it is an embeddable DB library. See
excellent post by Ilya G. on the subject:
SSTable and Log Structured Storage: LevelDB - igvita.com

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:

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