rpc

Why does NFS use UDP by default?

限于喜欢 提交于 2019-12-03 01:17:20
I'm sure there's some ancient legacy reason for it, but what is it? It seems like a service that's geared towards reliable data delivery. NFS was originally designed to be used on a LAN where loss rates are very low. UDP is faster, and has less overhead NFS is stateless, so it's simple for clients to retry Note that NFS v3+ can use TCP. UDP is the default for NFSv2 (which nobody should really use these days) but NFSv3 use TCP by default. TCP mounts are more reliable and you know you have a network problem much faster than with UDP. My guess is that it's probably for legacy (historical) reasons

Nameko - invoking RPC method from another service

匿名 (未验证) 提交于 2019-12-03 01:09:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to understand how nameko works for basic RPC. I am looking to define microservices in separate files and being able to run them from command shell. With this structure service2 is not being able to invoke service1's RPC method. What is missing to get this working? I have the following file structure: -rwxrwxr-x 1 user user 240 Dec 15 01:49 nameko.sh* -rw-rw-r-- 1 user user 251 Dec 15 01:46 service1.py -rw-rw-r-- 1 user user 305 Dec 15 01:47 service2.py Content of files are: $ cat nameko.sh #!/bin/bash /usr/local/bin/nameko run

RPC Client gives Can't encode arguments

匿名 (未验证) 提交于 2019-12-03 01:02:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I'm trying to write the simpliest client in RPC with this code: #include <stdio.h> #include <stdlib.h> #include <rpc/rpc.h> int main ( int argc , char * argv []){ int stat ; char out ; char in = 'f' ; if ( stat = callrpc ( argv [ 1 ], 0x20000001 , 1 , 1 , ( xdrproc_t ) xdr_void , & in , ( xdrproc_t ) xdr_char , & out )!= 0 ){ clnt_perrno ( stat ); exit ( 1 ); } exit ( 0 ); } It compiles, but when I try to run it, it gives me a "RPC: Can't encode arguments" EDIT: Actually the server do not recieve any argument neither it send back

RPC机制之AMQP协议

匿名 (未验证) 提交于 2019-12-03 00:43:02
openstack RPC通信 Openstack 的主要组件有 Nova、Cinder、Neutron、Glance 等,分别负责云平台的计算、存储、网络资源管理。OpenStack 各组件之间是通过 REST 接口进行相互通信,而各组件内部则采用了RPC通信。 什么是RPC RPC即Remote Procedure Call(远程方法调用),是Openstack中一种用来实现跨进程(或者跨机器)的通信机制。Openstack中同项目内(如nova, neutron, cinder…)各服务(service)均通过RPC实现彼此间通信。Openstack中还有另外两种跨进程的通信方式: 数据库和Rest API 。 Openstack中服务主要以进程的形式实现。也可以以线程的形式实现,但是Python中的线程是协作模型,无法发挥系统中多CPU(或多CPU核心)的能力。RCP只定义了一个通信接口,其底层的实现可以各不相同。目前Openstack中的主要采用AMQP的实现满足组件内部的松耦合性。 什么是AMQP AMQP即Advanced Message Queuing Protocol()是一种基于队列的可靠消息服务协议,具体可参考 http://en.wikipedia.org/wiki/Advanced_Message_Queuing_Protocol 。作为一种通信协议

Aria2 配置和使用

匿名 (未验证) 提交于 2019-12-03 00:43:02
Aria2 是一款多协议的命令行下载工具。可以结合 RPC 来使用图形界面。 ArchLinux 安装很简单,其他平台自行查找。 sudo pacman -S aria2 Aria2 是需要配合自行配置的规则。默认规则在该用户目录的 .aria2 目录,只需要在这个文件夹中创建配置文件 aria2.conf 即可。 ## 文件保存相关 ## # 文件的保存路径(可使用绝对路径或相对路径), 默认: 当前启动位置 dir=/home/ouyangsong/downloads # 启用磁盘缓存, 0为禁用缓存, 需1.16以上版本, 默认:16M #disk-cache=32M # 文件预分配方式, 能有效降低磁盘碎片, 默认:prealloc # 预分配所需时间: none < falloc ? trunc < prealloc # falloc和trunc则需要文件系统和内核支持 # NTFS建议使用falloc, EXT3/4建议trunc, MAC 下需要注释此项 #file-allocation=none # 断点续传 continue=true ## 下载连接相关 ## # 最大同时下载任务数, 运行时可修改, 默认:5 #max-concurrent-downloads=5 # 同一服务器连接数, 添加时可指定, 默认:1 max-connection-per

error: RPC failed; HTTP 502 curl 22 The requested URL returned error: 502 Proxy Error fatal: 报错

匿名 (未验证) 提交于 2019-12-03 00:38:01
错误消息: error: RPC failed; result=22 HTTP code = 413 …. fatal: The remote end hung up unexpectedly. error: 无法推送一些引用到 ‘https:…..something.git’ 如果你遇到了错误: in ‘connect’: SSL_connect returned=1 error=0 state=SSLv3 read server cerificate B:cerificate verify failed(OpenSSL::SSL::SSLError) 。。。 remote rejected master -> master (pre-receive hook declined) 可能是你找错方法了,这时改回https方式的remote url: git remote set-url origin https://… your.git 解决方法: 设置gitlab的object size 大小 sudo editor /home/git/gitlab/config/gitlab.yml 将”max_size:20000000”改成需要的bytes. 设置nginx 的client_max_body_size sudo editor /etc/nginx/sites-enabled

error: RPC failed; HTTP 502 curl 22 The requested URL returned error: 502 Proxy Error fatal: 报错

匿名 (未验证) 提交于 2019-12-03 00:37:01
错误消息: error: RPC failed; result=22 HTTP code = 413 …. fatal: The remote end hung up unexpectedly. error: 无法推送一些引用到 ‘https:…..something.git’ 如果你遇到了错误: in ‘connect’: SSL_connect returned=1 error=0 state=SSLv3 read server cerificate B:cerificate verify failed(OpenSSL::SSL::SSLError) 。。。 remote rejected master -> master (pre-receive hook declined) 可能是你找错方法了,这时改回https方式的remote url: git remote set-url origin https://… your.git 解决方法: 设置gitlab的object size 大小 sudo editor /home/git/gitlab/config/gitlab.yml 将”max_size:20000000”改成需要的bytes. 设置nginx 的client_max_body_size sudo editor /etc/nginx/sites-enabled

any good and simple RPC library for inter-process calls? [closed]

落爺英雄遲暮 提交于 2019-12-03 00:35:49
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . I need to send a (probably one) simple one-way command from client processes to server process with arguments of builtin C++ types (so

分布式RPC框架性能大比拼 dubbo、motan、rpcx、gRPC、thrift的性能比较

匿名 (未验证) 提交于 2019-12-03 00:30:01
Dubbo 是阿里巴巴公司开源的一个Java高性能优秀的服务框架,使得应用可通过高性能的 RPC 实现服务的输出和输入功能,可以和 Spring框架无缝集成。不过,略有遗憾的是,据说在淘宝内部,dubbo由于跟淘宝另一个类似的框架HSF(非开源)有竞争关系,导致dubbo团队已经解散(参见 http://www.oschina.net/news/55059/druid-1-0-9 Motan是新浪微博开源的一个Java 框架。它诞生的比较晚,起于2013年,2016年5月开源。Motan 在微博平台中已经广泛应用,每天为数百个服务完成近千亿次的调用。 rpcx是Go语言生态圈的Dubbo, 比Dubbo更轻量,实现了Dubbo的许多特性,借助于Go语言优秀的并发特性和简洁语法,可以使用较少的代码实现分布式的RPC服务。 gRPC是Google开发的高性能、通用的开源RPC框架,其由Google主要面向移动应用开发并基于HTTP/2协议标准而设计,基于ProtoBuf(Protocol Buffers)序列化协议开发,且支持众多开发语言。本身它不是分布式的,所以要实现上面的框架的功能需要进一步的开发。 thrift是Apache的一个跨语言的高性能的服务框架,也得到了广泛的应用。 后续还会增加更多的 RPC 框架的比较,敬请收藏本文网址 以下是它们的功能比较: 对于RPC的考察,

Golang 微服务框架 - Micro 介绍

匿名 (未验证) 提交于 2019-12-03 00:29:01
官方网站: micro.mu 官方文档: micro.mu/docs 源码仓库: github.com/micro/micro Micro 是一个工具集合, 通过将微服务架构抽象成一组工具。隐藏了分布式系统的复杂性,为开发人员提供了更简洁的概念。 Micro 主要有三部分组成: go-micro - 开发 sdk, 包含了 RPC 框架,服务发现, 消息订阅/ 发布 等功能. go-plugins - micro 插件 micro - Micro 提供的管理工具, 包含了 API 网关, 仪表盘, RPC 代理等功能. go-micro Micro 的主要开发 SDK, 里面包含了开发所用到的常用功能模块, 主要模块之间关系如下: 模块 说明 services 微服务, 提供了对微服务功能开发的封装, 通过它可以快速创建一个微服务. client RPC 客户端, 提供了诸如 服务发现 / 负载均衡 / RPC 代理和调用。以及失败时的重试 / 超时 / 上下文等功能。 server RPC 服务端, 提供了如何实现 RPC 请求的方法, 功能逻辑主要使用这个实现. codec 数据编码 模块, 提供将程序调用数据转换成 RPC 调用数据的功能. 目前支持: json / protobuf broker pub/sub 模块, 提供事件 发布 / 订阅 功能, 目前支持: nats