![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
| |
| | #1 (permalink) |
| | 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 |
My System Specs![]() |
| | #2 (permalink) |
| | 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 > |
My System Specs![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Hosting | .NET General | |||
| top web hosting service hosting reviews rank | Virtual Server | |||
| web hosting | Vista General | |||
| Need help on hosting | Virtual Server | |||