kirilltitov / FDBSwift

FoundationDB client for Swift
MIT License
44 stars 4 forks source link

Implement Directory layer #66

Open kirilltitov opened 4 years ago

kirilltitov commented 4 years ago

That's an oof, because I don't really understand how to port it from Python or Go, because it utilizes [blocking, obviously] mutexes heavily, and it's not quite clear

  1. Why use them
  2. How to use them [in Swift-NIO context]

Appendix:

  1. High-level documentation: https://apple.github.io/foundationdb/developer-guide.html#directories
  2. Python implementation: https://github.com/apple/foundationdb/blob/master/bindings/python/fdb/directory_impl.py
  3. Go implementation: https://github.com/apple/foundationdb/blob/master/bindings/go/src/fdb/directory/allocator.go
dimitribouniol commented 4 years ago
  1. Why use them

It seems like the primary reason they would be used is so that if you have a large subspace prefix, that can be abstracted away to a short prefix instead via indirection.

kirilltitov commented 4 years ago

No, the question was about mutexes, not dictionary layer :)