locked
Programming Connecting to Server RRS feed

  • Question

  • Hi,

    I have written a C# program, and actually it is done, which is for geocoding different address. I want to distribute them to the clients. Since there is a total limit for Google geocoding, I will need to have a "switch", which is to confirm my program is ran one by one, even if there are 2 request.

    About my program, it is packaged as a setup file using installshield, while the core program is a windows application basically manipulating excel document while accessing google geocoding API. I am thinking that there maybe some code I can add on my core program, that it can access the company server, so the idea I am having is let say "A" openned the program, there will be a switch in the server, change from 0 to 1, and in the mean time, when "B" wants to run the program, it could detect the switch, and will not start, not until the switch change back to "0", which then can put it on a query, let say if there are more clients, like "C", "D", etc.

    Make sense?! Is this doable? If so, Is it called C# socket programming. Cause I am not a professional programmer and need to do research and look for reference where I could get help. If you understand what I am saying, and can let me know if there is any reference or any concept that could help on, on finishing up this step, I will be much appreciated.

    Thank you so much.

    Best Regards,

    Wilson

    Wednesday, April 17, 2013 7:46 AM

Answers

  • On 4/17/2013 9:59 PM, Wilson Chi Toeh Chan wrote:

    Ya its called client server architecture because of this requirement we have invented web services and applications have layers to communicate with central database server.

    so you will need central database somewhere on internet so you can contact it with web service. the switch you are talking abt is called flag.

    let say User1 is accessing the data right now so you can set the flag to 1 and once that User1 is done with work (or when he log off or set the time limit 60 sec) User2 can start using the data.

    i know you just need flag and i said central database because you may need to record timeentry of which users accessed which flag when.

    you can also read this article its not straight related but it can clear some concept,

    http://msdn.microsoft.com/en-us/library/cc917674.aspx

    let me know if you need more information on this.

    Hope this helps!

    Thanks for the reply. It really helps, cause my BOSS just told me that he comes up with an idea of designing a log in screen which is using password to connect to the server, and, the purpose is to identify each client with the exact time slot, so that they can run the program when their time come.

    I know that these are all based on the communication between the client side and the server side. But is this possible?! Yes, I will definitely see that page you have just referred. So I am right, it is called the socket programming, and it's belong to part of the communication between client side and server side?!

    It's called SOA (Service Oriented Architecture) where a service is presented to a client in a client/service application on the service/server side.

    <http://en.wikipedia.org/wiki/Service-oriented_architecture>
     Socket programming is a legacy solution.

    The more modern solution in .NET is WCF.
     <http://en.wikipedia.org/wiki/Windows_Communication_Foundation>
    <http://msdn.microsoft.com/en-us/library/ms731082.aspx>

    WCF Web Service over HTTP
    WCF Service over TCP/IP -- or socket programming
    WCF Service over Named Pipe
    WCF Service over MSMQ.
     And the database sits behind the WCF service and client makes request to the WCF services for CRUD operations with the database (Create, Read Update and Delete) operations.
     All .NET technology is centering around WCF is client/service technology and SOA.

    Thursday, April 18, 2013 2:39 AM

All replies

  • Ya its called client server architecture because of this requirement we have invented web services and applications have layers to communicate with central database server.

    so you will need central database somewhere on internet so you can contact it with web service. the switch you are talking abt is called flag.

    let say User1 is accessing the data right now so you can set the flag to 1 and once that User1 is done with work (or when he log off or set the time limit 60 sec) User2 can start using the data. 

    i know you just need flag and i said central database because you may need to record timeentry of which users accessed which flag when. 

    you can also read this article its not straight related but it can clear some concept,

    http://msdn.microsoft.com/en-us/library/cc917674.aspx

    let me know if you need more information on this.

    Hope this helps! 

    Wednesday, April 17, 2013 8:59 PM
  • Ya its called client server architecture because of this requirement we have invented web services and applications have layers to communicate with central database server.

    so you will need central database somewhere on internet so you can contact it with web service. the switch you are talking abt is called flag.

    let say User1 is accessing the data right now so you can set the flag to 1 and once that User1 is done with work (or when he log off or set the time limit 60 sec) User2 can start using the data. 

    i know you just need flag and i said central database because you may need to record timeentry of which users accessed which flag when. 

    you can also read this article its not straight related but it can clear some concept,

    http://msdn.microsoft.com/en-us/library/cc917674.aspx

    let me know if you need more information on this.

    Hope this helps! 

    Thanks for the reply. It really helps, cause my BOSS just told me that he comes up with an idea of designing a log in screen which is using password to connect to the server, and, the purpose is to identify each client with the exact time slot, so that they can run the program when their time come.

    I know that these are all based on the communication between the client side and the server side. But is this possible?! Yes, I will definitely see that page you have just referred. So I am right, it is called the socket programming, and it's belong to part of the communication between client side and server side?!

    Thanks again.

    Regards,
    Wilson

    Thursday, April 18, 2013 1:59 AM
  • On 4/17/2013 9:59 PM, Wilson Chi Toeh Chan wrote:

    Ya its called client server architecture because of this requirement we have invented web services and applications have layers to communicate with central database server.

    so you will need central database somewhere on internet so you can contact it with web service. the switch you are talking abt is called flag.

    let say User1 is accessing the data right now so you can set the flag to 1 and once that User1 is done with work (or when he log off or set the time limit 60 sec) User2 can start using the data.

    i know you just need flag and i said central database because you may need to record timeentry of which users accessed which flag when.

    you can also read this article its not straight related but it can clear some concept,

    http://msdn.microsoft.com/en-us/library/cc917674.aspx

    let me know if you need more information on this.

    Hope this helps!

    Thanks for the reply. It really helps, cause my BOSS just told me that he comes up with an idea of designing a log in screen which is using password to connect to the server, and, the purpose is to identify each client with the exact time slot, so that they can run the program when their time come.

    I know that these are all based on the communication between the client side and the server side. But is this possible?! Yes, I will definitely see that page you have just referred. So I am right, it is called the socket programming, and it's belong to part of the communication between client side and server side?!

    It's called SOA (Service Oriented Architecture) where a service is presented to a client in a client/service application on the service/server side.

    <http://en.wikipedia.org/wiki/Service-oriented_architecture>
     Socket programming is a legacy solution.

    The more modern solution in .NET is WCF.
     <http://en.wikipedia.org/wiki/Windows_Communication_Foundation>
    <http://msdn.microsoft.com/en-us/library/ms731082.aspx>

    WCF Web Service over HTTP
    WCF Service over TCP/IP -- or socket programming
    WCF Service over Named Pipe
    WCF Service over MSMQ.
     And the database sits behind the WCF service and client makes request to the WCF services for CRUD operations with the database (Create, Read Update and Delete) operations.
     All .NET technology is centering around WCF is client/service technology and SOA.

    Thursday, April 18, 2013 2:39 AM