![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest
Posts: n/a
| Hosting Multiple NetPeerTcpBinding Clients Hi, Contextual Information ------------------------ I'm creating a Distributed Hash Table (DHT) implementation to be used in a commercial application. Currently, I use the TcpClient and UdpClient classes in my membership and routing layer. I've decided to modify the routing layer to use WCF. Without going into much detail, the routing layer is implemented as a class library so I can simulate many nodes in a single process. The node class' ctor accepts a URL, which allows me to monotonically increment the TCP port on each node (i.e. "net.tcp://localhost:5001/someUri", "net.tcp://localhost:5002/someUri",..., "net.tcp://localhost:n/someUri"). I use the URI in my EndpointAddress. In addition to the net.tcp binding, I'd like each node joins P2P mesh (duplex) to "listen" for join and leave events. Scenario -------------------------- To simplify the scenario assume I have a console application that creates 10 nodes. After creation of all nodes, each node issues a join request over the net.p2p channel, which is a OneWay call per the service contract. Let's go with the "join" request for now. Upon receipt of a join request, the receiving node will issue a net.tcp request to the sender. Questions --------------------------- I have the following questions: [1] Am I able to define the net.p2p endpoint mentioned above in my app.config file such that all node instances (10 in the process) work as expected or must I programmatically create the broadcast channel for each node? Basically, *think* I want to simulate the Basic/Binding/Net/PeerTcp WinFx sample except that instead of having two separate console applications (one for each receiver) and another console application for the sender, I want to have one console application where all nodes function as both sender and receiver. Another option is to model each node as in the Chat example (duplex channel). [2] As related to the Basic/Binding/Net/PeerTcp example and the /Scenario/PeerChannel/Chat sample, how do they differ in terms of WCF? It seems the PeerTcp sample is a one way P2P mesh and the Chat sample is two-way P2P mesh. Kindest regards, Michael |
| | #2 (permalink) |
| Guest
Posts: n/a
| SOLVED: Hosting Multiple NetPeerTcpBinding Clients Please disregard my below email. The answers to my below questions are: [1] No. I ended up having to programmatically create the WCF ServiceEndpoint. [2] The Chat sample is a duplex channel and the PeerTcp sample is not. "Michael Primeaux" <mjprimeaux@msn.com> wrote in message news:us1vCL$bGHA.1856@TK2MSFTNGP03.phx.gbl... > Hi, > > Contextual Information > ------------------------ > > I'm creating a Distributed Hash Table (DHT) implementation to be used in a > commercial application. Currently, I use the TcpClient and UdpClient > classes in my membership and routing layer. I've decided to modify the > routing layer to use WCF. Without going into much detail, the routing > layer is implemented as a class library so I can simulate many nodes in a > single process. The node class' ctor accepts a URL, which allows me to > monotonically increment the TCP port on each node (i.e. > "net.tcp://localhost:5001/someUri", > "net.tcp://localhost:5002/someUri",..., "net.tcp://localhost:n/someUri"). > I use the URI in my EndpointAddress. > > In addition to the net.tcp binding, I'd like each node joins P2P mesh > (duplex) to "listen" for join and leave events. > > Scenario > -------------------------- > To simplify the scenario assume I have a console application that creates > 10 nodes. After creation of all nodes, each node issues a join request > over the net.p2p channel, which is a OneWay call per the service contract. > Let's go with the "join" request for now. Upon receipt of a join request, > the receiving node will issue a net.tcp request to the sender. > > Questions > --------------------------- > > I have the following questions: > > [1] Am I able to define the net.p2p endpoint mentioned above in my > app.config file such that all node instances (10 in the process) work as > expected or must I programmatically create the broadcast channel for each > node? Basically, *think* I want to simulate the Basic/Binding/Net/PeerTcp > WinFx sample except that instead of having two separate console > applications (one for each receiver) and another console application for > the sender, I want to have one console application where all nodes > function as both sender and receiver. Another option is to model each node > as in the Chat example (duplex channel). > > [2] As related to the Basic/Binding/Net/PeerTcp example and the > /Scenario/PeerChannel/Chat sample, how do they differ in terms of WCF? It > seems the PeerTcp sample is a one way P2P mesh and the Chat sample is > two-way P2P mesh. > > Kindest regards, > Michael > |
| |
| |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| bug in the PS hosting API... | graycats | PowerShell | 4 | 06-16-2008 10:57 AM |
| Need Hosting? - Best selling hosting providers listed here | HostingFreakzz@gmail.com | Avalon | 0 | 08-17-2006 01:04 PM |