This message was deleted.
# general
s
This message was deleted.
f
The interface should be user-friendly and contain the bare minimum number of functions that are necessary to make the solution work… This might be something along the lines of:
Copy code
interface CustomStorageEngine<K, V> {
  void put(Lazy<K> key, Lazy<V> value, int partition);
  void delete(Lazy<K> key, int partition);
}

interface CustomStorageEngineFactory<E extends CustomStorageEngine> {
  E createEngine();
  void setCurrentVersion(E engine);
  void retireVersion(E engine);
}
Or something like that. We might want to add a third one for a per-partition engine but I’m not sure if that’s leaking too much implementation details or not… We also pivoted somewhat away from this towards the end of the meeting so it might land in a completely different place… anyway, maybe @Nisarg Thakkar or @Zac Policzer have other input.
e
Ok ya sounds good. This is what I was originally thinking. I will work on this today.
@Zac Policzer When you were talking about the Object Cache you were suggesting using it as a reference for these interfaces right?
n
My understanding was Zac would update the doc and put up some reference interface on there, but we can have that interface discussion on the PR too
z
Yeah, I was talking about Object Cache and how it's used as a rough example of what we we'd like to implement here.
e
I just created a draft pull request with some initial added interfaces to the codebase. We can discuss more of the details of exactly what we want to put in and so forth there if you guys would like.
Hey I did some more looking into getting a custom storage engine compatible with DaVinci, and from my understanding if we let the user pass a custom storage engine when creating a davinci client we would need to have the storage service interface support this new factory. Should I start trying to implement making the client compatible with this approach or do you guys want to discuss the plan more first?
@Felix GV @Zac Policzer @Nisarg Thakkar
z
That is correct
e
I just made a new commit where I added the option to pass a CustomStorageEngine for now. I tried to follow the same convention you guys had established. If you guys can check it out when you have time let me know things I should improve.