Remove `isConnected` property requirement from `RedisClient` protocol
In !95 (merged), an isConnected: Bool { get}
requirement was added to RedisClient
with the following justification:
Motivation:
It it pretty common as a developer when working with connections and "database" clients to want to know if the connection is currently open before doing any work.
Modifications:
Add
var isConnected: Bool { get }
requirement to theRedisClient
protocolResult:
Developers should now have access to the connectivity state of any
RedisClient
In hindsight this was not a well-motivated change which is causing downstream libraries to have to make awkward "guarantees" about a connection's isConnected
state in order to conform to RedisClient
.
After talking to the library authors, it was agreed that isConnected
is a unique guarantee property from RedisConnection
that not all clients can make.
For example, Vapor/RedisKit and Vapor/Redis both promise that their clients are "always valid" by nature of the objects existing, due to the underlying connection pooling implementation that handles checking for valid connection states - which isn't expressed as a simple Bool
property.
So the deciding belief is that each individual RedisClient
is responsible for how they want to express any sort of connected
state to users, which may wildly differ between implementations.
To fix this, !95 (merged) will be reverted.