-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Labels
enhancementNew feature or requestNew feature or request
Description
It would be interesting to attempt to reduce the number of Redis connection in a given controlled ecosystem. If one or many engines are instantiated on the same node process, there is no point of having multiple Redis connection since they are both single threaded.
Hanging connection like those sued to subscribe to Redis commands or events should not share that connection for obvious reason.
class NucleusDatastore {
constructor (datastoreName = 'Untitled', options = {}) {
const {
$logger = console,
$$server,
index: datastoreIndex = 0,
port: datastorePort = 6379,
URL: datastoreURL = 'localhost'
} = options;
this.name = datastoreName;
this.index = datastoreIndex;
this.$$handlerCallbackListByChannelName = {};
this.scriptSHAbyScriptName = {};
this.$$server = $$server || redis.createClient({
db: datastoreIndex,
host: datastoreURL,
port: datastorePort
});
// ...
}
}
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request