This generic P2P architecture tutorial was brought to you by Planet API � Searching thousands of ASPX / ASP.NET Public Webmethods / Public Webservices, Search Engine APIs, Novelty APIs, B2B APIs, Game APIs, P2P APIs, Fun APIs, AI Chatbot APIs, etc.

Overview of P2P Culture

P2P (Peer To Peer) is when multiple computers think collectively towards a shared objective. Computer programs that use less central servers and rely on a collection of computers such as Gnutella, distributed media streaming, networks of DCC based IRC fservers etc. tend to be referred to as being more P2P. Computer programs where many end-users communicate with few central services tend to be referred to as being less P2P or not P2P. To fully understand and leverage P2P technology, one must separate his or her self from the dogma that our computer programs must be united by servers in our physical possession to synchronize activities. Rather, think of our computer programs from a more digital-life oriented perspective and break the computer software up over multiple machines and make no single part of the software critical to the collective objective.

P2P Philosophy

�Single servants are less powerful then a single server but the collective of many servants is more powerful then any single server� - Daniel Stephen Rule.

For example, a large software company gives each employee a very small amount of responsibility. Even if this means you get your month�s coding done in a few days, it is more beneficial to the company as a whole to not rely on any single employee too much and allows the company more overall stability and to ultimately write larger more complex software packages than any single person is capable of. Your software is more P2P if you leverage this same principle to achieve more bandwidth and computing speed.

Basic P2P Terminology

Peer or Servant

A computer program that acts as both a client and a server for the entire P2P network.

Connection Manager

A light server application that provides a starting point for applications which enter a P2P network. The less the connection manager is involved in the objective of your overall application, the more P2P your application is. The more P2P your application is, the less strain on your own hardware.

 

Simple P2P Chat Example

This example demonstrates a very simple but highly P2P application. This example consists of two fundamental P2P parts: a connection manager and a servant. The connection manager should be compiled and executed once. The servant should be compiled and its config.xml�s connectionmgr tag should be set to the IP address or domain name of the computer that is running the connection manager. Make multiple copies of the servant�s executable and config.xml and place them on multiple computers. Execute each servant on a different machine and they will contact the connection manager to resolve each other�s location and network with each other. Each servant will frequently ask the connection manager who is on the P2P network and keep their own publish list up to date. When a servant leaves the network, an updated list is published to all the other servants and they discontinue attempting to communicate with the servant who left.

Can I still try this out if I only have one computer to work with?

Yes. The connection manager assigns a new port number to each servant so each servant listens on a unique port number. You can run the servant executable as many times as you want on a single machine. For your first test, I would suggest running the connection manager once and then run the servant a couple of times on the same machine as the connection manager. Then chat in the servant windows to verify that the P2P network has been constructed on your computer. If you have other computers to work with, simply execute the servant on the other computers and chat to verify that they successfully joined the P2P network.

1、资源项目源码均已通过严格测试验证,保证能够正常运行; 2、项目问题、技术讨论,可以给博主私信或留言,博主看到后会第一时间与您进行沟通; 3、本项目比较适合计算机领域相关的毕业设计课题、课程作业等使用,尤其对于人工智能、计算机科学与技术等相关专业,更为适合; 4、下载使用后,可先查看REAdMe.md或论文文件(如有),本项目仅用作交流学习参考,请切勿用于商业用途。 5、资源来自互联网采集,如有侵权,私聊博主删除。 6、可私信博主看论文后选择购买源代码。 1、资源项目源码均已通过严格测试验证,保证能够正常运行; 2、项目问题、技术讨论,可以给博主私信或留言,博主看到后会第一时间与您进行沟通; 3、本项目比较适合计算机领域相关的毕业设计课题、课程作业等使用,尤其对于人工智能、计算机科学与技术等相关专业,更为适合; 4、下载使用后,可先查看REAdMe.md或论文文件(如有),本项目仅用作交流学习参考,请切勿用于商业用途。 5、资源来自互联网采集,如有侵权,私聊博主删除。 6、可私信博主看论文后选择购买源代码。 1、资源项目源码均已通过严格测试验证,保证能够正常运行; 2、项目问题、技术讨论,可以给博主私信或留言,博主看到后会第一时间与您进行沟通; 3、本项目比较适合计算机领域相关的毕业设计课题、课程作业等使用,尤其对于人工智能、计算机科学与技术等相关专业,更为适合; 4、下载使用后,可先查看READme.md或论文文件(如有),本项目仅用作交流学习参考,请切勿用于商业用途。 5、资源来自互联网采集,如有侵权,私聊博主删除。 6、可私信博主看论文后选择购买源代码。
1、资源项目源码均已通过严格测试验证,保证能够正常运行; 2、项目问题、技术讨论,可以给博主私信或留言,博主看到后会第一时间与您进行沟通; 3、本项目比较适合计算机领域相关的毕业设计课题、课程作业等使用,尤其对于人工智能、计算机科学与技术等相关专业,更为适合; 4、下载使用后,可先查看README.md文件(如有),本项目仅用作交流学习参考,请切勿用于商业用途。 、 1资源项目源码均已通过严格测试验证,保证能够正常运行; 2、项目问题、技术讨论,可以给博主私信或留言,博主看到后会第一时间与您进行沟通; 3、本项目比较适合计算机领域相关的毕业设计课题、课程作业等使用,尤其对于人工智能、计算机科学与技术等相关专业,更为适合; 4、下载使用后,可先查看READmE.文件(md如有),本项目仅用作交流学习参考,请切勿用于商业用途。 1、资源项目源码均已通过严格测试验证,保证能够正常运行; 2、项目问题、技术讨论,可以给博主私信或留言,博主看到后会第一时间与您进行沟通; 3、本项目比较适合计算机领域相关的毕业设计课题、课程作业等使用,尤其对于人工智能、计算机科学与技术等相关专业,更为适合; 4、下载使用后,可先查看README.md文件(如有),本项目仅用作交流学习参考,请切勿用于商业用途。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值