469,610 Members | 2,449 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,610 developers. It's quick & easy.

Distributed chat server

Hi,

I have this theoretical problem: Say that I need a chat server that
also has a database where it saves all conversations. However, I need
several servers for availability and load balancing.
Now arises the problem of how to synchronize the servers in the
shortest interval (synchronize databases that is). I'm not sure that
merge or peer-to-peer replication in sql 2005 is the best solution for
synchronization (because it still has a 6-10 seconds latency).

Suggestions anyone?

Thanks in advance,
R. Green

Apr 16 '07 #1
4 2632
Ronald,
If you need to have several servers, why can't the all talk to the same
database?
if you use Sql Server and your code is written well, I doubt you would ever
have the need for more than one database server.
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"Ronald Green" wrote:
Hi,

I have this theoretical problem: Say that I need a chat server that
also has a database where it saves all conversations. However, I need
several servers for availability and load balancing.
Now arises the problem of how to synchronize the servers in the
shortest interval (synchronize databases that is). I'm not sure that
merge or peer-to-peer replication in sql 2005 is the best solution for
synchronization (because it still has a 6-10 seconds latency).

Suggestions anyone?

Thanks in advance,
R. Green

Apr 16 '07 #2
Why can't the servers share a single database?

That's certainly the most common option, and how the majority of IM servers
that support load balancing work - some examples of servers that work this
way are Jabber's XCP, Coversant's SoapBox Server, and Adobe's (previously
Antepo's) OPN server, and eJabberD.

If you need geographic isolation, or cannot share a database, you're going
to need some careful architecture work to properly partition your database.

(I build XMPP based systems such as this for a living...)

--
Chris Mullins, MCSD.NET, MCPD:Enterprise, Microsoft C# MVP
http://www.coversant.com/blogs/cmullins

"Ronald Green" <zz****@gmail.comwrote in message
news:11*********************@l77g2000hsb.googlegro ups.com...
Hi,

I have this theoretical problem: Say that I need a chat server that
also has a database where it saves all conversations. However, I need
several servers for availability and load balancing.
Now arises the problem of how to synchronize the servers in the
shortest interval (synchronize databases that is). I'm not sure that
merge or peer-to-peer replication in sql 2005 is the best solution for
synchronization (because it still has a 6-10 seconds latency).

Suggestions anyone?

Thanks in advance,
R. Green

Apr 16 '07 #3
Stay as far a way from relplication if latency is an issue.

I would suggest you look at the cluster version of SQL Server.
Basically, you program your application to refer to a single SQL Server.
However, the cluster "server" is actually several SQL Servers which do the
load balancing and fail-over availability for you.

"Ronald Green" <zz****@gmail.comwrote in message
news:11*********************@l77g2000hsb.googlegro ups.com...
Hi,

I have this theoretical problem: Say that I need a chat server that
also has a database where it saves all conversations. However, I need
several servers for availability and load balancing.
Now arises the problem of how to synchronize the servers in the
shortest interval (synchronize databases that is). I'm not sure that
merge or peer-to-peer replication in sql 2005 is the best solution for
synchronization (because it still has a 6-10 seconds latency).

Suggestions anyone?

Thanks in advance,
R. Green

Apr 17 '07 #4
Hi,

Thanks for all of your answers!

I checked SQL Server Cluster and it doesn't support load balancing -
only failover clustering (so in a SQL cluster only one of the nodes
handling the same database is active).

I also thought of having only a single database and many application
servers (IIS or something else), but that still leaves the database
server a bottleneck and a single point of failure.

So the idea I came up with is to have several SQL servers with
replication for high availability, and do the load balancing via the
application - every two parties that initiate a chat will be
associated with one of the SQL servers so indeed every chat takes
place in one database, but if something fails, the application will be
able to switch to another SQL server.

What is your take on that? Am I missing anything?

Best regards,
R. Green
On Apr 17, 4:27 pm, "nospam" <bradtkeS...@veriSPAMzon.netSPAMwrote:
Stay as far a way from relplication if latency is an issue.

I would suggest you look at the cluster version of SQL Server.
Basically, you program your application to refer to a single SQL Server.
However, the cluster "server" is actually several SQL Servers which do the
load balancing and fail-over availability for you.

"RonaldGreen" <zzz...@gmail.comwrote in message

news:11*********************@l77g2000hsb.googlegro ups.com...
Hi,
I have this theoretical problem: Say that I need a chat server that
also has a database where it saves all conversations. However, I need
several servers for availability and load balancing.
Now arises the problem of how to synchronize the servers in the
shortest interval (synchronize databases that is). I'm not sure that
merge or peer-to-peer replication in sql 2005 is the best solution for
synchronization (because it still has a 6-10 seconds latency).
Suggestions anyone?
Thanks in advance,
R.Green- Hide quoted text -

- Show quoted text -

Apr 18 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by M O J O | last post: by
3 posts views Thread by John Wright | last post: by
2 posts views Thread by jason.m.ho | last post: by
oll3i
1 post views Thread by oll3i | last post: by
4 posts views Thread by Gandalf | last post: by
reply views Thread by devrayhaan | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.