Closed ping86 closed 11 years ago
Redis seems easier than implementing the IRC server to server protocol
The problem is you have to change all the functions that access to information,
For example:
Deop a user from a channel with redis
deop: function(channel) {
var client = this;
channelUtil.userExists(channel, this.nick , function(exists) {
if(exists) {
//redis logic
redisPub.hdel("Set:" + channel.normalizeChan, client.nick.toLowerCase());
redisPub.hmset("Set:" + channel.normalizeChan, client.nick.toLowerCase(), client.nick);
}
});
},
now:
deop: function(channel) {
if (this.channelModes[channel])
this.channelModes[channel] = this.channelModes[channel].replace(/o/, '');
},
I have a small example running redis, we could make a new branch and continue with the system.
I'd like to help with this if the two of you decide you want to go down that path. Seems like this would also make services easier to implement.
I work in this feature, I have some code. In a few days I publish it.
We need more people for this proyect. I will invited some friends.
@alexyoung @neiltron
I create a experimental proyect. Used redis to balance messages between multiple servers.
The code is not right, it's just a prototype, it would be necessary to do well.
https://github.com/ping86/ircd.js
What do you think?
I've been doing some research on messaging systems. I think all commands commands can be replicated to multiple servers whit a messaging system like redis or rabbitmq.
You can also keep a table of nicks, channels, users in a room, and all the information that needs to be shared among multiple servers in a key-value memory database distributed (http://redis.io/)
I think it would be the simplest way to load balance.
Any more ideas?