p2p

对SEDA,SOA 与 P2P 的哲学分析

久未见 提交于 2019-12-01 20:39:04
SOA,WEB SERVICE, CORBA, EJB, 工作流,面向对象的局部性与面向服务的全局性和松耦合性。 松耦合性的需要来源于对业务变更的灵活性需求。 软件系统应用之初,人们认为软件使得电脑可以象人一样工作。于是把所有的权力都给了它。后来在使用过程中,才逐渐发现,软件其实并不能胜任所有的工作。它也许真的可以拥有智能,但却永远也不可能取代人的决策者地位。这一点是由两个重要因素决定的: 一,软件能接收与理解的信息是有限的。基于有限的信息,很难做出正确的决策。一个不能做出正确决策的行为主体,当然很难赢得信任。所以说,信任是第一个问题; 二,一个在能力上不能被信任的人,当然就不能担当太重大的责任。所以,当软件最终被发现是个白痴的时候,人们要求收回它做决定的权力。 更重要的是,即使软件有朝一日真的能拥有人的智慧,我们仍然需要掌握一定程度上的决策权。因为这个原因,工作流被从以往被认为是万能的软件系统中抽取出来,以使人们重新掌握对业务的控制能力。 在SPRING里面,也有个相似的东西叫做“控制反转”即IOC。与工作流的产生背景一样。人们喜欢权力。 在编程方法中,要求尽量将定义与实现分离。这样的目的是为了提高系统的应变能力。这种方法其实也是最初的SOA思想来源。 与软件的可变性相似的一个概念为可扩展性。 可扩展性与可变性意思是不同的。可变性是针对现有系统而言的

Non blocking IO for Android

三世轮回 提交于 2019-12-01 18:36:00
I'm currently trying to assess whether a project can be realised for Android. One major problem I see it that, since it's a P2P client, we'd have to keep a considerable amount of connections open when running. Now the connections do not transfer large amounts of data, it's more of a messaging system, so having a thread for each connection creates a useless overhead if we're reading a single message of 64 bytes every now and then. So I was wondering whether there is support for non blocking IO such as select() or poll() on Linux. Any suggestion? mchang Check out java.nio Sockets, Selectors, and

WiFi Direct status

怎甘沉沦 提交于 2019-12-01 13:06:55
问题 Is it possible to specifically check that whether WiFi Direct is On or Off ? I wrote a code which can only update about the wifi status that whether it is connected or not,no matter it is Access point or WiFi Direct ConnectivityManager connManager = (ConnectivityManager) getActivity().getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo mWifi = connManager.getNetworkInfo(ConnectivityManager.TYPE_WIFI); if (mWifi.isConnected()) { } if (!mWifi.isConnected()) { } I want to specifically

什么是P2P?

北慕城南 提交于 2019-12-01 09:47:22
P2P网贷它的全称是(person-to-person),通俗一点就是一个人借钱给另一个人; 这个其实跟银行的日常业务差不多,银行的日常业务一般都是客户存钱,然后银行给2到3个点年化,然后银行在通过把钱借给银行有需求的优质贷款客户,收取的年华估计5个点以上之类的,银行赚取的就是这么个差价。 对于存钱的客户来说,银行的优缺点非常明显:优点就是背靠政府稳定安全,缺点就是利息低;相对于P2P网贷反之亦然; 对于借钱的客户来说,借钱门槛高,需要有抵押物,贷款审批流程时间长等等; 所以这样显现去p2p网贷的优势。 P2P网贷 P2P网贷就是通过互联网理财,即个人对个人,又称点对点网络借贷 ,是指以公司为中介机构,把借贷双方对接起来实现各自的借贷需求。借款方可以是无抵押贷款或是有抵押贷款, 而中介一般是收取双方或单方的手续费为盈利目的或者是赚取一定息差为盈利目的的新型理财模式。 P2P目前市面上比较火的理财产品类型一般有:房贷,车贷,供应链,小微贷等等产品 P2P网贷劣势: 资金池是什么 意思? 所谓资金池,就是指把资金汇集到一起,资金池相当于蓄水池,只不过流入流出的是钱。简单来说,就是一个大池子放钱,一边存进来,一边 *** 。不管是张三的钱、李四的钱、还是王五的钱,只要进到池子里,就都叫池子的钱。大家可能会说,这不就是银行吗?没错,银行就是一个大资金池。但银行有国家这棵大树

peerjs/webrtc iceConnectionState failed

梦想与她 提交于 2019-12-01 06:25:25
I've been trying to figure this out for a while. I'm trying to establish a simple connection using peerjs. I can connect successfully to the peer with id USER_ID . However, they are unable unable to connect to me. I receive the following log when they try to connect. iceConnectionState is changed to failed eventually and no data can be recieved. The application is using the peerjs cloud server I'm using the latest version of Chrome. They have tried using latest versions of Chrome and Firefox They have switched off any firewalls Have even tried the peerjs chat example and it fails with the same

peerjs/webrtc iceConnectionState failed

旧时模样 提交于 2019-12-01 04:35:27
问题 I've been trying to figure this out for a while. I'm trying to establish a simple connection using peerjs. I can connect successfully to the peer with id USER_ID . However, they are unable unable to connect to me. I receive the following log when they try to connect. iceConnectionState is changed to failed eventually and no data can be recieved. The application is using the peerjs cloud server I'm using the latest version of Chrome. They have tried using latest versions of Chrome and Firefox

android socket programming behind a router

五迷三道 提交于 2019-12-01 03:59:55
Hey guys I have a question or problem. I am trying to make a p2p connection between two android phones. I have each phone connect to my server and I get their private (192.168.1.1) and public (76.123.288.22) IP and along with the ports that they connect to my server. I send a response when the phone connects to the server to open a server socket with a specific port. I also send the other phone the public IP and port of the open socket, but it does not connect. I have read multiple threads on here that it is not possible to do p2p connection if both phones or computers are behind two different

Non blocking IO for Android

元气小坏坏 提交于 2019-12-01 03:34:08
问题 I'm currently trying to assess whether a project can be realised for Android. One major problem I see it that, since it's a P2P client, we'd have to keep a considerable amount of connections open when running. Now the connections do not transfer large amounts of data, it's more of a messaging system, so having a thread for each connection creates a useless overhead if we're reading a single message of 64 bytes every now and then. So I was wondering whether there is support for non blocking IO

互联网应用的两种工作模式:客户/服务器模式与P2P模式

妖精的绣舞 提交于 2019-12-01 03:10:46
《智慧的物联网——感知中国和世界的技术》第3章互联网:物联网的运行环境,本章在系统介绍计算机网络与互联网基本概念的基础上,深入讨论了“三网融合”,以及物联网与互联网的区别与联系。本节为大家介绍互联网应用的两种工作模式:客户/服务器模式与P2P模式。 AD: WOT2014课程推荐:实战MSA:用开源软件搭建微服务系统 3.3.3 互联网应用的两种工作模式:客户/服务器模式与P2P模式 从互联网应用系统的工作模式角度看,互联网应用可以分为两类:客户/服务器(C/S)模式与对等(P2P)模式。 1.客户/服务器模式的基本概念 从应用层的应用程序工作模型的角度看,应用程序分为客户端程序与服务器程序。以Email应用程序为例,Email应用程序分为服务器端的邮局程序与客户端的邮箱程序。用户在自己的计算机中安装并运行客户端的邮箱程序,就能够成为电子邮件系统的客户端,发送和接收电子邮件。而安装邮局应用程序的计算机就成为了电子邮件服务器,它为客户提供电子邮件服务。 互联网应用系统采用客户/服务器模式的主要原因是网络资源分布的不均匀性。网络资源分布的不均匀性表现在硬件、软件和数据三个方面。 1)网络中计算机系统的类型、硬件结构、功能都存在着很大的差异。它可以是一台大型计算机、高档服务器,它也可以是一台个人计算机,甚至是一个PDA或家用电器。它们在运算能力

区块链100讲:详解区块链之P2P网络

别说谁变了你拦得住时间么 提交于 2019-12-01 01:19:42
1 P2P网络 如果我们简单来看 P2P 技术,它的应用领域已经非常广泛了,从流媒体到点对点通讯、从文件共享到协同处理,多种领域都有它的身影出现。 同样的,P2P 的网络协议也有很多,比较常见的有 BitTorrent、ED2K、Gnutella、Tor 等,也就是我们常说的 BT 工具和电驴。 比特币、以太坊等众多数字货币都实现了属于自己的 P2P 网络协议,但是这种模式并不同于以上讨论的 P2P 网络协议,所以本讲重点主要是区块链技术的 P2P 技术,也就是比特币和以太坊的 P2P 网络。 2 网络连接与拓扑结构 1. 网络连接 除去少数支持 UDP 协议的区块链项目外,绝大部分的区块链项目所使用的底层网络协议依然是 TCP/IP 协议。 所以从网络协议的角度来看,区块链其实是基于 TCP/IP 网络协议的,这与 HTTP 协议、SMTP 协议是处在同一层,也就是应用层。 在“区块链的常见误区”这篇文章中,我们提到了“区块链是否会颠覆互联网”这一说法,如果要是认真分析的话,它颠覆的层面其实最多只到 HTTP 协议,不能再多了。 以 HTTP 协议为代表的、与服务端的交互模式在区块链上被彻底打破了,变更为完全的点对点拓扑结构,这也是以太坊提出的 Web3.0 的由来。 比特币的 P2P 网络是一个非常复杂的结构,考虑到矿池内部的挖矿交互协议与轻节点。我们仅仅讨论全节点这种场景下的