rpc

IDL for JSON REST/RPC interface

蓝咒 提交于 2019-12-03 05:39:17
We are designing a fairly complex REST API, in which most of the I/O are JSON encoded objects with a specific structure. One challenge we have found is to document the API in such a way that makes it easier for clients to post correct input and process output. Because the data of both the input and output requires fairly complex JSON objects, client developers often introduce bugs related to the structure of the I/O objects. With all of the JSON web API's these days, I would have hoped for a general solution, but I am having a hard time finding one. I looked into json-schema which is a json

从零开始手写 dubbo rpc 框架

给你一囗甜甜゛ 提交于 2019-12-03 05:33:50
rpc rpc 是基于 netty 实现的 java rpc 框架,类似于 dubbo。 主要用于个人学习,由渐入深,理解 rpc 的底层实现原理。 前言 工作至今,接触 rpc 框架已经有很长时间。 但是对于其原理一直只是知道个大概,从来没有深入学习过。 以前一直想写,但由于各种原因被耽搁。 技术准备 Java 并发实战学习 TCP/IP 协议学习笔记 Netty 权威指南学习 这些技术的准备阶段,花费了比较长的时间。 也建议想写 rpc 框架的有相关的知识储备。 其他 rpc 框架使用的经验此处不再赘述。 快速迭代 原来一直想写 rpc,却不行动的原因就是想的太多,做的太少。 想一下把全部写完,结果就是啥都没写。 所以本次的开发,每个代码分支做的事情实际很少,只做一个功能点。 陆陆续续经过近一个月的完善,对 rpc 框架有了自己的体会和进一步的认知。 代码实现功能,主要参考 Apache Dubbo 文档 文档 文档将使用 markdown 文本的形式,补充 code 层面没有的东西。 代码注释 代码有详细的注释,便于阅读和后期维护。 测试 目前测试代码算不上完善。后续将陆续补全。 rpc 模块 rpc-common 公共代码 rpc-server 服务端 rpc-client 客户端 rpc-register 注册中心 rpc-test 测试模块 代码分支 release_0

Is there a difference between RPC and IPC?

余生长醉 提交于 2019-12-03 05:25:56
问题 Or are they synonyms? 回答1: Wikipedia is usually great for these purposes. RPC: Remote procedure call (RPC) is an Inter-process communication technology that allows a computer program to cause a subroutine or procedure to execute in another address space (commonly on another computer on a shared network) without the programmer explicitly coding the details for this remote interaction. IPC: Inter-process communication (IPC) is a set of techniques for the exchange of data among multiple threads

C++ RPC tutorial? [closed]

假如想象 提交于 2019-12-03 05:18:14
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I want to learn programming C++ (native) on Windows platform for RPC communication. I want to learn both server and client side. I also want to learn some advanced topics, like performance and security. Any good recommended materials to read? (BTW: I Googled a few, but all of them either too brief or COM related

How to handle authentication and authorization with thrift?

北慕城南 提交于 2019-12-03 05:04:42
问题 I'm developing a system which uses thrift. I'd like clients identity to be checked and operations to be ACLed. Does Thrift provide any support for those? 回答1: Not directly. The only way to do this is to have an authentication method which creates a (temporary) key on the server, and then change all your methods so that the first argument is this key and they all additionally raise an not-authenticated error. For instance: exception NotAuthorisedException { 1: string errorMessage, } exception

iPhone + Drupal + JSON RPC Server problem

左心房为你撑大大i 提交于 2019-12-03 04:01:23
I don't have any idea how to post a JSON RPC request using Obj-C. Can anyone help me? So far I have: responseData = [[NSMutableData data] retain]; NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://*************/services/json-rpc"]]; NSString *jsonString = @"{\"jsonrpc\": \"2.0\",\"method\": \"node.get\", \"params\": { \"arg1\": 1 } ,\"id\": \"dsadasdas\"}"; NSData *jsonData = [jsonString dataUsingEncoding:NSUTF32BigEndianStringEncoding]; [ request setHTTPMethod: @"POST" ]; [ request setHTTPBody: jsonData ]; [ request setValue:@"application/json"

what are the disadvantages of RPC with respect to message passing?

我只是一个虾纸丫 提交于 2019-12-03 03:12:10
问题 what are the disadvantages of RPC with respect to message passing? 回答1: As a general rule, RPC provides a higher level of abstraction than some other means of interprocess communication. This makes it, perhaps, easier to use than lower level primitives. For this abstraction you may pay some penalty in performance due to marshaling/unmarshaling and may have to deal with added complexity in configuration for simple scenarios. You might be interested in this thesis (pdf) by Jackie Silcock which

What differentiates a REST web service from a RPC-like one?

我的未来我决定 提交于 2019-12-03 03:08:03
问题 I have a web application that uses AJAX to grab JSON data from the server. It requires that the user first log in with their browser so that a cookie can be set. Only the GET and POST verbs are used, where GET is for retrieving data and POST is for any operation that modifies data. From what I understand, REST differs from the above method in that the user authentication information is sent with every request and the PUT and DELETE verbs are used as well. My question is, what benefits does a

Why is exactly once semantics infeasible?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-03 02:50:40
In RPC semantics where Erlang has hope for the best, SUN RPC with at-least once and Java RMI with at-most-once but no one has exactly once semantics. Why does it seem infeasible to have exactly once semantics? For example if the client keeps resending a uniquely tagged request until a reply is received and a server keeps track of all handled requests in order not to duplicate a request. Would that not be exactly once? Consider what happens if the server crashes between carrying out the request and recording that it has carried out the request? You can get at-most-once by recording the request,

Exception while connecting to RPC when using the Corda 3 node driver

匿名 (未验证) 提交于 2019-12-03 01:36:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: When I run Corda 3 nodes using the node driver, I intermittently get the following exception: [INFO ] 15:09:20,485 [driver-pool-thread-0] (DriverDSLImpl.kt:169) internal.DriverDSLImpl.invoke - Exception while connecting to RPC, retrying to connect at localhost:10013 {} org.apache.activemq.artemis.api.core.ActiveMQNotConnectedException: AMQ119007: Cannot connect to server(s). Tried with all available servers. at org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:787) ~[artemis-core