C code for multiple servers

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • plomon
    New Member
    • Mar 2008
    • 15

    C code for multiple servers

    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.
  • sicarie
    Recognized Expert Specialist
    • Nov 2006
    • 4677

    #2
    Originally posted by plomon
    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' ?

    Comment

    • plomon
      New Member
      • Mar 2008
      • 15

      #3
      Originally posted by sicarie
      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.

      Comment

      • sicarie
        Recognized Expert Specialist
        • Nov 2006
        • 4677

        #4
        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

        Comment

        • plomon
          New Member
          • Mar 2008
          • 15

          #5
          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....sorr y if my posts sounded against the rules....

          Comment

          • kky2k
            New Member
            • May 2007
            • 34

            #6
            Originally posted by plomon
            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....sorr y if my posts sounded against the rules....
            This will help you..
            Dave Link

            Gud Luck

            Comment

            Working...