
Google Badwolf: Temporal graph store abstraction layer - espeed
https://github.com/google/badwolf
======
trishume
This sounds like it might be similar to an open source
[http://www.datomic.com/](http://www.datomic.com/), which also stores temporal
quads.

I'd have to read more to know how they really compare.

~~~
wslh
I think using the term open source alone can be a little bit misleading:
[https://my.datomic.com/downloads/free](https://my.datomic.com/downloads/free)

~~~
lsb
"similar to an open-source [version of] datomic, which also stores quads"

------
thwd
If the author is reading:

> Covariant: Given two types A and B, A covariant B if B is a A. In other
> word, A covariant B if B is a prefix of A.

Taken from here:
[https://github.com/google/badwolf/blob/master/docs/temporal_...](https://github.com/google/badwolf/blob/master/docs/temporal_graph_modeling.md)

Co(ntra)variance only makes sense if you define a subtype relation first. And
I think that's what you wanted to define here.

After skimming through the docs I think what you want is: A is a subtype of B
if B's path is a prefix of A's.

~~~
xllora
@thwd Thanks for the comments. I (author) have filled
[https://github.com/google/badwolf/issues/6](https://github.com/google/badwolf/issues/6)
to revisit the defintion.

------
baq
for everyone who doesn't understand the 'temporal' part - it's something you
want in a lot of places but haven't done it because it's fiendishly tricky to
get right. read
[https://en.wikipedia.org/wiki/Temporal_database](https://en.wikipedia.org/wiki/Temporal_database)
for a good intro.

------
zellyn
Anyone know how this compares with Cayley?
[https://github.com/google/cayley/](https://github.com/google/cayley/)

~~~
barakm
Cayley author here. Reached out here:
[https://github.com/google/badwolf/issues/4](https://github.com/google/badwolf/issues/4)

I've been doing graphs for a long time, and I'm not quite sure I get what a
'temporal triple' is exactly (or what its use case is) from the docs. But I'm
willing to learn!

~~~
xllora
BW author here. Ack. Will get back to you on the GH issue asap.

------
devit
Why is this better than just using any SQL database?

Also, considering that only in-memory storage is shipped here, is this an
internal Google project that was only partially released? Or a work in
progress?

~~~
JPKab
It's a triple store that doesn't suck.

If you want to know the advantages of triple stores, there's a lot out there.

One key strength is that triple stores have a "schema as data" approach,
meaning that schemas can be made to follow rules on the fly based on the data
contained within them. Nothing that application code can't do, of course, but
the entire purpose of these kinds of databases is to find a way to have data
be as self-descriptive as possible.

~~~
dragonwriter
> One key strength is that triple stores have a "schema as data" approach

Schema as data is historically a fairly important element of the relational
model.

~~~
BinaryIdiot
> Schema as data is historically a fairly important element of the relational
> model.

Not really. You derive a schema from data already stored in a relational
database by looking at multiple, non-data places. I'm not sure I would
necessarily consider that "schema as data" especially since many of the things
you would need to automatically derive a schema may not be present in an
optimally performing RDMS. For instance you need foreign keys to understand
relationships but I've seen many times where performance is improved through
handling foreign key integrity through the application versus at the database
level.

~~~
dragonwriter
> You derive a schema from data already stored in a relational database by
> looking at multiple, non-data places.

No, the schema is itself stored in tables; conceptually, while the structure
of those control tables needs to be immutable (that is, the data in the
control tables that also relates to the control tables needs to be protected
against modification), in an ideal DB following the model, schema changes that
can be done through DDL are logically equivalent to executing DML against the
control tables and can be done that way, as well; in practice, several RDBMS's
do allow this, though typically they only allow superusers to use DML against
system tables, even though normal users may have permission to make equivalent
changes through DDL.

~~~
BinaryIdiot
Fair enough but when you consider internal structures as "data" I think the
phrases loses some of its power; you could effectively make this argument
about any type of meta data system at that point.

------
andylei
whats a "temporal" graph store?

~~~
cowardlydragon
It appears to be triples qualified with timestamps, possibly to expire them.

... I only looked at the github for 20 seconds

~~~
andylei
> ... I only looked at the github for 20 seconds

your explanation wasn't good...

~~~
packetslave
I think you meant "thank you for trying to explain, since I was too lazy to
Google it for myself"

~~~
andylei
no, i didn't. i got as much as that explanation from reading the github. i
just didn't understand what a temporal graph store is used for.

thanks for offering a productive contribution to the discussion!

