473,385 Members | 1,848 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,385 software developers and data experts.

C code for multiple servers

15
I have this class project which requires me to demonstrate service availability using active and backup servers with the following conditions and requirements:

A Name Server (say NS) to keep track of all the servers.
One TCP connection between each client and the server. There will be one active server (say AS) and two backup servers (say BS1 and BS2).
Heartbeat between the active server and client.
If AS fails, BS1 should handle the requests and it becomes the active server and same with BS2 if BS1 fails.
When AS comes back, BS1 or BS2 should relinquish the service and AS should be the active server

Can somebody give me an idea of how do I develop a client-server program in C to implement the above service.
Mar 22 '08 #1
5 2658
sicarie
4,677 Expert Mod 4TB
I have this class project which requires me to demonstrate service availability using active and backup servers with the following conditions and requirements:

A Name Server (say NS) to keep track of all the servers.
One TCP connection between each client and the server. There will be one active server (say AS) and two backup servers (say BS1 and BS2).
Heartbeat between the active server and client.
If AS fails, BS1 should handle the requests and it becomes the active server and same with BS2 if BS1 fails.
When AS comes back, BS1 or BS2 should relinquish the service and AS should be the active server

Can somebody give me an idea of how do I develop a client-server program in C to implement the above service.
Google 'client server c program' ?
Mar 22 '08 #2
plomon
15
Google 'client server c program' ?
i don't need a simple client-server c program.....i already have one.....i want to implement the above mentioned service using client-server c programming.....please read the requirements of the service......in order to implement that kind of service, i think we need socket programming and multi-threading concepts in c......so, please help me with these two concepts.
Mar 22 '08 #3
sicarie
4,677 Expert Mod 4TB
The experts on this site are more than happy to help you with your problems but they cannot do your assignment/program for you. Attempt the assignment/program yourself first and post questions regarding any difficulties you have or about a particular function of the code that you don't know how to achieve.

Please read the Posting Guidelines and particularly the Coursework Posting Guidelines.

Then when you are ready post a new question in this thread.

MODERATOR
Mar 22 '08 #4
plomon
15
can u tell me whether i should use threads or not to achieve the goal.....if yes.....please provide details of some good websites or e-books to learn about the following:

1.) multi-threading in c
2.) usage of threads in socket programming

my intention was never to dump my work on somebody else's shoulders.....i'm trying my best to develop my own code....i'm in the learning phase of this project....sorry if my posts sounded against the rules....
Mar 22 '08 #5
kky2k
34
can u tell me whether i should use threads or not to achieve the goal.....if yes.....please provide details of some good websites or e-books to learn about the following:

1.) multi-threading in c
2.) usage of threads in socket programming

my intention was never to dump my work on somebody else's shoulders.....i'm trying my best to develop my own code....i'm in the learning phase of this project....sorry if my posts sounded against the rules....
This will help you..
Dave Link

Gud Luck
Mar 22 '08 #6

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

Similar topics

1
by: Chris Strobel | last post by:
Hi, What's the best way to deploy an ASP.NET site to multiple servers at the same time. We will be doing a web farm with a couple of servers (DNS round-robin). We were using FTP to do it for 1...
3
by: Henrik Dahl | last post by:
Hello! From default, the ASPNET user is giving the process identity for the ASP.NET runtime environment of IIS, however it's possible to change the user by modifying the <processModel> element...
4
by: Dave Edwards | last post by:
I understand that I can fill a datagrid with multiple queries, but I cannot figure out how to fill a dataset with the same query but run against multiple SQL servers, the query , table structure...
1
by: windsurfing_stew | last post by:
Hi, We have a website which is deployed to multiple web servers by robocopy across a WAN. In visual studio 2005 if you choose to publish the site to a directory it regenerates all of the dlls...
15
by: Neo | last post by:
Hello All, I found that ASP.net website only accepts code withing site directory. This creates big hurdle in shairng code. How to share code between two websites, like the way share between two...
3
by: breeto | last post by:
If you've configured .NET Remoting to use more than one channel of the same type, for example two TcpClientChannels with unique names, when you want to create a proxy to a remote object how do you...
3
by: Ben Holness | last post by:
Hi all, I have a php/mysql website where people can upload their own graphics for the buttons and background of pages on the website. This used to run on one server, but I have now been asked...
35
by: keerthyragavendran | last post by:
hi i'm downloading a single file using multiple threads... how can i specify a particular range of bytes alone from a single large file... for example say if i need only bytes ranging from...
13
by: Samir Chouaieb | last post by:
Hello, I am trying to find a solution to a login mechanism for different domains on different servers with PHP5. I have one main domain with the user data and several other domains that need...
1
by: sirfsaif | last post by:
I have three servers and each server has separate MySQL and DB. For instance I have common DB i.e. store on all the three servers i.e web1, web2 and web3. I m running a query in DB store on...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.