How to read/Write FDB Record layer using Golang

I was reading about FDB record layer and so far it looks like only JAVA application can use the FDB record layer as it is a JAVA library. Please correct me if wrong.

Is it possible to read/write FDB record layer using golang? Any such support will be available in near future?

Like you correctly said, the record layer is currently a Java library, so it’s limited to jvm languages.

I’m not aware of any efforts to make the record layer available in other languages (which would be probably a completely new implementation).

Also checkout this blog post by @damienleroux.

Bigblue’s multi-model database on FoundationDB

It talks about a layer implementation using Golang.

1 Like

thanks for the info . I will take a look …

Is it possible to use record layer to design parent-child table relationship and update in one transaction .Any article/sample code for the same. I have read few articles such as FoundationDB Record Layer Overview but still it is not clear

The Record Layer has support for transactions with an arbitrary set of changes in it (up to FDB limits like the transaction size limit: Known Limitations — FoundationDB 7.1). So, it can support parent-child relationships with transactional updates. I’m not sure there’s sample code anywhere for that specific data model, though you can see a bit of that in the sample code here where there are Vendor records and Item records, and the Item records all have Vendor IDs: fdb-record-layer/Main.java at 2f0b6e7de2fdabee1579f9969a958e145852c003 · FoundationDB/fdb-record-layer · GitHub

The Record Layer doesn’t have any built-in support for validating foreign key relationships, which is probably the biggest missing piece in a parent-child data model. The suggestion there would be to build it on top of the Record Layer, by validating the presence of the parent when adding a new child (for example) by looking it up by ID. But more in-depth foreign key support is also a feature the Record Layer team has been thinking about how to properly push down as well

thanks … i will read on the link you have shared. Currently creating monitoring using golang and New relic API (we use New Rerlic API for custom metrics). Still new to FDB so thanks for the help