473,394 Members | 1,778 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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 2816
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ali | last post by:
I'm trying to write a really basic chat program that allows 2 client programs to send messages to each other via a server. I've managed to write the code so that both clients can connect to the...
0
by: DotNetJunkies User | last post by:
I am writing a distributed transaction code. My current scenario include a client database(Suppose client- having 4 main database) which can be installed anywhere which would connect to a public...
4
by: M O J O | last post by:
Hi, I'm developping a chat/client/server program, but I can't figure out how to do this. I've tried severeal chat examples, but no good and fully working examples. I've spend too much time...
3
by: John Wright | last post by:
I am trying to create a very simple chat program using UDP through a web page. I am having problems getting this going. All the examples I've seen deal with remoting or application variables, or...
2
by: jason.m.ho | last post by:
Hello! I am trying to build an ajax chat system. Currently I have it so that when you chat, you upload your message to the database, and each client is polling that database to see if he/she has...
1
oll3i
by: oll3i | last post by:
how do i run this example ? with openjms package com.ociweb.jms; import java.io.*; import javax.jms.*; import javax.naming.*;
4
by: Gandalf | last post by:
I wrote a chat width AJAX. In my home wampserver apache it works just fine. The problem starts when I trying to upload the chat in to my real server. The chat prints error 403 in places which it...
1
eyeofsoul
by: eyeofsoul | last post by:
i have build the gui but i am having problem with implementing the tcp/udp. can somebody help me. i have server and client. the server can chat with the client. when i tried to to use the udp of tcp...
3
by: John Dalberg | last post by:
I am looking for an asp.net based chat software. I have looked at some (asp.net and php based) and they consist usually of a javascript piece where the web user (visitor) initiates a chat from a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.