Data Replication and partitions in Badger


(Sohi) #1

Hi,

We are planning to use Go as programming lang and Badger as data store for Profile Data . It would be helpful to get some pointers to Replications and partitioning of data in Badger based on id .

Regards
Sohi


(Manish R Jain) #2

Badger is an embedded DB. It does NOT do replication or partitioning of data. That’s something you’d have to do at your end.


(Sohi) #3

Hi Manish,

Thanks a lot for replying .

Understood . I was wondering to get some ideas or pointers how dgraph is using synchronous replication and key Distribution .

Sorry for dumb questions .:slight_smile:

-Sohi


(Manish R Jain) #4

There’s slightly outdated information here:

https://docs.dgraph.io/master/design-concepts/


(Sohi) #5

Hi Manish,

Thanks for response .

Can you please help with following points in badgerdb source code . (if code pointers that will be great)

  1. write ahead logs
  2. Write path for key and value

Thanks and Regards
Sohi


(Pawan Rawal) #6

Badger has a value log which also acts as a WAL, here is the code that writes to that https://github.com/dgraph-io/badger/blob/master/value.go#L752:23. This is also the code which writes values.

The code for writing the keys is at https://github.com/dgraph-io/badger/blob/master/db.go#L615