The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

Client server architecture

I'm just starting to get a feel for Remoting and Web services, so go easy on me please :)

Anyway, I've got the following: An application that has a client and a server in a Windows platform. I'm using .NET. The server can be deployed as a process or as a service.

I basically want an architecture that allows me to transparently deploy the server either on the same machine as the client or on a different machine from the client.

1) If I use remoting, it's got the following disadvantages:
a) No security (white papers on Microsoft site discuss how to get around this)
b) Requires a fast, reliable connection.
c) Requires the client and the server to be always up to date.

2) If I use web services, I've got the following disadvantages:
a) I require a web server on the client if I need to deploy the Web server to the same location.

Is there a way to get around the web server requirement? Is there any other way to do this? Bascially I should be able to switch between a client/server on the same machine and the client and server on different machines with a single change in a configuration file.
Praveen Angyan Send private email
Tuesday, June 12, 2007
I'm not sure what your data requirements are, and I've only done some R&D on this technology, but MSMQ (Microsoft Message Queue) might be something to consider.

Using C# we were able to serialize datasets and pump them into an outbound queue, and receive them somewhere else. We did this as a concept for transmitting sales and customer data from remote store locations to a central database.

We ran out of time on that R&D and didn't move on to implement it, we used web services instead, but it looked promising. It is reasonably available defacto and free of charge on all recent Windows versions, here is the FAQ:
I still code in Delphi
Tuesday, June 12, 2007
The other way is to have all your client calls go to a bridge layer that you write that does a local call if running in local mode or a web service call if running in remote mode.
Mike Stockdale Send private email
Tuesday, June 12, 2007
I'm using the MSMQ/Windows Service approach at the moment and it's pretty sweet.

If you can design your server methods to do stream-based I/O, it gives you a lot of flexibility for changing your mind about the server's design in the future.  A method with the signature

  public Stream Post(Stream request)

can be called inside a web service, inside a Windows service talking to MSMQ, inside a process doing socket-based I/O, wherever.
Robert Rossney Send private email
Tuesday, June 12, 2007
You might not need IIS to get web services. Not sure if this applies:
Thom Lawrence Send private email
Tuesday, June 12, 2007
package common;

interface Server { ... }
interface Security { ... }
interface Builder {
  Server createServer();
  Security createSecurity();

class Client {
  private Server server;
  private Security security;
  public Client(Server server, Security security) {
    this.server = server; = security;

  public static void main(String [] argc) {
      ClassLoader cl = (Client.class).getClassLoader();
      Class<? extends Builder> builderClass;
      if(local) {
        builderClass = cl.loadClass(local.BuilderImplementation);
      } else {
        builderClass = cl.loadClass(remote.BuilderImplementation);
      Builder builder= builderClass.newInstance();
      Client client = new Client(

  private void go() { ... }

package local;

class BuilderImplementationimplements Builder {
  public Server createServer() {
      return new LocalServerImplementation();
  public Security createSecurity() {
      return new SecurityForLocalImplementation();
class LocalServerImplementation implements Server {...}
class SecurityForLocalImplementation implements Security {...}


package remote;

class BuilderImplementation {
  public Server createServer() {
      return new RemoteServerImplementation();
  public Security createSecurity() {
      return new SecurityForRemoteImplementation();
class RemoteServerImplementation implements Server {...}
class SecurityForRemoteImplementation implements Security {...}
Dino Send private email
Tuesday, June 12, 2007
If you are using .Net you can use .Net 3.0 WCF to self-host web service endpoints, no web server needed.
Tuesday, June 12, 2007
I believe you can run a "server" web service using a Windows Service with WSE (Web Service Extensions).

Try that, or google Microsoft WSE.
Ben Dempsey Send private email
Wednesday, June 13, 2007

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
Powered by FogBugz