views:

796

answers:

4

I'm taking a Masters capstone course early and doing my project in C# while everyone else is doing theirs in Java. The project has 4 services and requires a name server that maps service names to sockets. The instructor is suggesting that the students use RMI to build this registry. Since I'm not very familiar with Java, and the instructor is not very familiar with .NET, we weren't able to come up with an equivalent in C#. Anyone out there aware of one?

Update:

I'm looking for a way to discover a WCF service without explicitly knowing its socket.

Update 2:

I will be demoing the project on my XP laptop using VS 2008/WebDev server.

+2  A: 

You can use the UDDI server that comes with Windows Server 2K3/8. This will give you discovery of your services. Other than that you would need a 3rd party package or roll your own.

Adam Fyles
I will be presenting on my XP laptop using VS 2008/WebDev server, so don't think it will be an option to use UDDI. Not really sure how to roll my own without hard-coding some config variables then reading those in the name server (10% will be docked). Advice on how to do it?
Aaron
you can install it onto virtual OS
abatishchev
+1  A: 

I am no expert on Java Remoting.

I think what you are looking for is called in WCF terms Service Endpoint. This can be done either in a config file or via code .

For an overview on WCF I would refer you to this link:Windows Communication Foundation Architecture

weismat
A: 

Read about TCP Port Sharing, new technology in Windows Server 2008, it could helps you

abatishchev
+1  A: 

RMI Registery in java works as a container where you can lookup services by a key. This mechanism is similar to resolving services/objects via ServiceLocator (e.g. ServiceLocator pattern) where you use a dependency injection engine, and ask it to resolve an instance of the service (i.e. by a known name, by interface, etc.):


    IMyService service = ServiceLocator.Resolve<IMyService>();

or


    IMyService service = (IMyService)ServiceLocator.Resolve(typeof(IMyservice));

WCF works only in a single service vs. single service host fashion, meaning each single service requires a separate service host. You can write a service container that aggregates the service hosts, opens the port, and registers them in DI container, and later simply ask for an instance of the service as mentioned above.

Hadi Eskandari