473,563 Members | 2,635 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to write two server programs handling many clients

1 New Member
hi.....

I wrote one server program handling many clients in java...........

If the server fails, how to handle the clients....

I want to write two server programs handling many clients... If one falis, another should act as server.....

Thanks....
Apr 26 '10 #1
1 1366
Dheeraj Joshi
1,123 Recognized Expert Top Contributor
There should be some way to detect the the primary is still up or is it down?
Your secondary server should come up once the primary is down. And the connection with the clients need to be handled now by the secondary(actin g primary).

When primary is up(acting secondary) you need to start checking whether secondary(actin g primary) is up or down.

Basically high Availability. Also if you use database, you need to take care of periodic replication of data between servers. :)

Regards
Dheeraj Joshi
Apr 26 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
2107
by: Frank | last post by:
Hello. In the early stages of developing a server application that will be required to send events to multiple client applications that will be running on different PC's. I'm wondering what the best technology for doing this is. At the moment, I'm looking at MSMQ. The server PC and client PC's will be running Windows 2000 (most likely in...
2
1202
by: Rob | last post by:
What are some pros and cons associated with running a vb.net app from a server and from a workstation ? When run from the server, I assume that each instance that is executed is "its own instance" i.e., variables are not shared ? Also, when run from the server, how could you ensure that the same workstation does not have more than 1...
3
1527
by: Dan | last post by:
Does the COM server created with python have to be compiled? I have the need to integrate database access but, I can not have any proprietary software. Meaning no compiled programs built by me. So, if python can do com clients and servers without compiling, Im good. But I don't know if that is possible. The ctypes example implies that it must...
8
3213
by: swell | last post by:
I would like to write a server with the low level API of python ( socket+select and/or socket+thread ) that allow me to register client and update them every X seconds ( could be the time, the temperature, a stock quote, a message , ... ). How to write the server that keep hot connections with clients and update them when events are...
2
6937
by: Jobs | last post by:
Download the JAVA , .NET and SQL Server interview with answers Download the JAVA , .NET and SQL Server interview sheet and rate yourself. This will help you judge yourself are you really worth of attending interviews. If you own a company best way to judge if the candidate is worth of it. http://www.questpond.com/InterviewRatingSheet.zip
3
1991
by: dharmdeep | last post by:
Hi Friends I am using socket programming in C in which there is one server and multiple clients. I am using thread for handling multiple clients but whenever two clients run simultaneously a memory error reflects as "The instruction at 0x00422e46 reference memory at 0xdf909004. The memory could not be written" along with debug assertion ...
7
1944
by: David | last post by:
i think i just realized i'm an idiot. again. (not syntactically correct code... just pieces to illustrate) class StateObject { members like socket, receiveBuffer, receiveBufferSize, StringBuilder etc.. }
0
1568
by: perdoname | last post by:
Hello, I urgently need help, im trying to complete a class which will be able of multiple - clients but is not doing the required puprose. Can anyone be assistance of what is needed to add for handling the clients ?? Thanks in advance!! import java.util.ArrayList;
1
1835
by: kurrachaitanya | last post by:
Lecture Saying that: I am generally expecting most of you to work n java.If you prefer to use c/c++ version of the programs,you may,but the assistance in the lab sessions will be very much geared towards java user. compile both the client and the server programs.open two shell windows on different machines(using e.g ssh or putty to log into...
0
7659
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7882
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7634
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7945
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6244
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5208
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3618
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1194
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
916
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.