
ObjectBox: Fast object-oriented database for Go - thomaslewis
https://github.com/objectbox/objectbox-go
======
zydeco
I don't like how it's a closed source binary that's downloaded as part of the
install process. Realm used to be like this too, but they open sourced their
core later, I wonder if ObjectBox has similar plans.

~~~
lawlessone
Looks like it

[https://objectbox.io/faq/](https://objectbox.io/faq/)

" We will open source more components later, but first we need to figure out
some things with ObjectBox. Please give us time on this. We’re currently
putting all our efforts in advancing the product. Please contact us if you
have questions about this (email contact [at] objectbox.io.). Thank you."

------
whalesalad
The docs are so light on details. The example code is weak. The website
doesn’t share any examples on how this is used.

~~~
greenrobot
Do you refer to [https://golang.objectbox.io](https://golang.objectbox.io) ?
Check [https://docs.objectbox.io/](https://docs.objectbox.io/) for what is
available for Java.

~~~
sdinsn
Are you affiliated with ObjectBox?

~~~
greenrobot
[https://github.com/greenrobot](https://github.com/greenrobot)

------
trevor-e
A bit off-topic but it's interesting to see the name greenrobot pop up again
after all these years. :)

Early Android developers may remember greenrobot/greenDAO and
greenrobot/EventBus libraries from back in the day, both very helpful at the
time.

~~~
greenrobot
Good old days... :)

------
znpy
How does this compare to, say, Versant OODBMS ?

~~~
greenrobot
Not sure if Versant supports Go. Anybody knows Versant's pricing? Don't think
they come for free.

~~~
znpy
Definitely not free and definitely no support for go. I was actually wondering
how objectbox compares to versant but I quickly answered myself: objectbox is
designed for low-end loads and iot stuff while versant is more geared towards
big databases (ie millions of objects) and concurrent, networked access.

Anyone willing to correct me or add to this is welcome (and please do).

------
sdegutis
> ObjectBox object oriented database - up to 10x faster than SQLite

How does it achieve this?

~~~
Strom
Most likely by not providing data safety and a bunch of features. The classic
example with databases is that the super fast ones will report your writes are
finished even before the database starts thinking about writing the data to
disk, not to mention flushing it.

~~~
bobwaycott
According to this comment[0], it is ACID-compliant. What other data safety
features are you thinking might be sacrificed?

0:
[https://news.ycombinator.com/item?id=18569031](https://news.ycombinator.com/item?id=18569031)

More info on ACID & transactions here:
[https://golang.objectbox.io/transactions](https://golang.objectbox.io/transactions)

~~~
Strom
Based on safety research [1][2] I’ve read on numerous databases, I’ve learned
that there is almost always a big difference between vendor promises and
reality. Thus when reading claims of order of magnitude performance gains
against one of the most well tested databases in the world, I lean towards the
assumption that the gains are due to shortcomings, whether intentional or not.

—

[1] [https://aphyr.com/tags/jepsen](https://aphyr.com/tags/jepsen)

[2] [https://jepsen.io](https://jepsen.io)

------
asdkhadsj
Does this use the FS or is it purely in memory?

I've got GBs of CSV data that I'm managing manually and due to response times,
need solutions that reduce wire trips. This means that traditional databases
have proven difficult due to the distance between process and DB. Something
designed for local usage (SQLite/etc) is an area I want to research, so
ObjectBox sounds interesting on that front as well. Though, it looks like its
goals are mainly IoT, so I'm not too hopeful on this front.

~~~
module0000
SQLite is pretty bulletproof and tested in this area. Lots of examples for
your project to take advantage of, and very high performance for in-memory
data sets.

~~~
greenrobot
SQLite is a very nice embedded DB indeed. If you like SQL. ObjectBox enables
you to work with Go structs and gives you additional performance.

------
wmu
Are there any benchmarks that show how fast this db is?

~~~
thomaslewis
There's some general info here, including a comparison to SQLite:
[https://objectbox.io/dev-get-started/](https://objectbox.io/dev-get-started/)

For Android, there's even a repository to test it yourself:
[https://github.com/objectbox/objectbox-
performance](https://github.com/objectbox/objectbox-performance)

~~~
b2ccb2
Comparing a RDBMS with an object database is pretty useless for benchmarking.

I'd be more interested to see comparison to, for example, Realm[1].

[1]
[https://en.wikipedia.org/wiki/Realm_(database)](https://en.wikipedia.org/wiki/Realm_\(database\))

~~~
greenrobot
There's a open source benchmark here: [https://github.com/objectbox/objectbox-
performance](https://github.com/objectbox/objectbox-performance) \- last time
I checked ObjectBox was several times faster than Realm.

~~~
ken
I only see Java source code here. Is ObjectBox Java the same database code as
ObjectBox Go?

EDIT: I see the 'objectbox-go' repo has a separate set of perf tests, but only
for ObjectBox Go -- not either of the unnamed "NoSQL" competitors, nor for
SQLite.

~~~
greenrobot
The initial question was about Realm, thus the link to Java. The core of
ObjectBox is the same on every platform (C/C++ for maximum speed). We haven't
finished the other benchmarks yet. Sorry for teasing with those. We'll be done
with those soon and they will be open source.

------
polskibus
Is this something like couchdb/couchbase?

~~~
greenrobot
Not really, ObjectBox is an object DB and emphasizes performance (no JSON but
FlatBuffers for example).

------
networkimprov
If this uses os.File.Sync, it's not safe on MacOS.

Also it would benchmark artificially fast on MacOS.

[https://github.com/golang/go/issues/26650](https://github.com/golang/go/issues/26650)

Many storage libraries are affected, including Bleve.

~~~
greenrobot
Interesting. ObjectBox does NOT use os.File.Sync. This stuff is done by a low-
level C layer. We'll verify next week, thank you!

~~~
networkimprov
The method used in the fix to the bug above is easy to apply in C.

------
oldgregg
I serialize into grpc and dump into badger.. excellent performance, no cgo
kludge

~~~
greenrobot
You probably don't do a lot of queries? Badger is a K/V store and has no
knowledge about the value. Thus querying sucks and if you want indexing, you
are on your own. Relations? Anyway, for simple caching that's probably fine.

------
CyberDildonics
What does 'object oriented' database mean? A relational database is already an
interface to data. Is it just storing serialized binary data with a key?

~~~
greenrobot
The FAQ covers this: [https://golang.objectbox.io/faq#how-is-objectbox-
different-f...](https://golang.objectbox.io/faq#how-is-objectbox-different-
from-boltdb-bolt-bbolt-or-badger)

------
erulabs
“Fast”, “database” and “Go” are three of the scariest words to put together
when viewed thru SRE eyeballs...

