
Apple Open-Sources FoundationDB Record Layer - tiagocorrea
https://github.com/foundationdb/fdb-record-layer
======
iruoy
Announcement: [https://www.foundationdb.org/blog/announcing-record-
layer/](https://www.foundationdb.org/blog/announcing-record-layer/)

HN Announcement comments:
[https://news.ycombinator.com/item?id=18906341](https://news.ycombinator.com/item?id=18906341)

------
sjroot
I didn't expect this to be written in Java. Do they talk about this decision
anywhere? I didn't catch anything in the announcement.

~~~
ryanworl
FDB itself is written in Flow, which is 98% C++ with a few extra keywords
thrown on top that gets compiled to actual C++. This gives them actor model
concurrency in C++ that is completely deterministic by generating very ugly
code that uses callbacks instead of threads or coroutines.

The reason for Java being used here, if I had to guess, is they have
experience running Java in production and the Java bindings are the most
mature (in my opinion). Writing the record layer in C++ would probably be
overkill. The reason the Java bindings are the most mature is probably because
they needed to be to write this :)

~~~
teacpde
> Writing record layer in C++ would be overkill

Mind to elaborate on why C++ would be overkill? I understand the layered
architecture decouples data model from underlying storage so it can be
implemented in whatever language. To me, Flow and not having GC makes C++ a
good choice.

~~~
ryanworl
It would be a fine choice, (and the document layer is) but the most
performance sensitive parts of the entire system when you take it as a whole
are already written in Flow. Writing it in C++ entirely would take a lot
longer.

------
manigandham
Note that there's also a separate MongoDB compatible layer:
[https://github.com/FoundationDB/fdb-document-
layer](https://github.com/FoundationDB/fdb-document-layer)

And a copy of the original SQL layer: [https://github.com/jaytaylor/sql-
layer](https://github.com/jaytaylor/sql-layer)

------
miclill
When would we use this instead of a normal relational database? At which
scale?

------
SorryPhoneHere
Cool. Is anyone working on a graph layer?

------
jwildeboer
TL;DR to save y'all looking for it: Released under Apache 2.0 License, see
file ACKNOWLEDGEMENTS for licenses of included 3rd party code (some BSD style,
some more ASL 2.0)

------
SquareWheel
I'm surprised to see Apple using Github; particularly now that Microsoft owns
it. It is where the developers are though. And it certainly beats a hidden
download on opensource.apple.com.

~~~
zepto
I’d say Microsoft owning it makes it more attractive rather than less.

Less risk of it being acquired by some unknown company in the future or
collapsing through mismanagement.

~~~
neurobashing
I'd go one step further and say that to Apple, Microsoft is "the devil you
know". Apple uses Azure for some of its services, for example.

