nspcc-dev / neofs-sdk-go

Go implementation of NeoFS SDK
Apache License 2.0
6 stars 14 forks source link

Sync pool and client interfaces #434

Closed smallhive closed 1 year ago

smallhive commented 1 year ago

reference #380

smallhive commented 1 year ago
  1. Session management. As sessions are inherently tied to specific nodes we need to keep this logic of implicit session management by Pool. It should be configurable at the same time.

I thought we decided to sync client/pool interfaces and build some wrapper (high level client) to manage to sessions and other staff inside it. New pool implementations should be deadly simple and only manage Clients. Current/old implementation of Pool is going to be live for backward compatibility, until we complete these full circle. Have plans changed?

roman-khimov commented 1 year ago

Usually you can't create a session with one node and reuse it for another, that's the problem, it can be done transparently and it has to be managed by the Pool, at least in majority of cases. Waiting logic (or slicing, or SyncContainerWithNetwork) is a different thing entirely, it doesn't care about particular node/client, so it can reuse some common interface.

smallhive commented 1 year ago

What does pool: Sessions commit mean? Is it a draft PR?

Yes, after discussions some functions interfaces were changed, it was WIP commits. I should to mark them properly, PR as well

roman-khimov commented 1 year ago

Let's narrow down the scope of this PR, leaving #443, #444 and #445 as separate issues.

roman-khimov commented 1 year ago

Can/do we add a compile-time test that proves interfaces are the same?

As we've discussed previously, we don't want to add some monster interface that covers both implementations, it's not really needed. Packages using these functions (so-called "upper layer" like slicer) will just accept the part of the interface they need and that's where we could easily check that both in fact satisfy it.