rpc

Use Apache Thrift for two-way communication?

我是研究僧i 提交于 2019-12-25 05:30:41
问题 Is it possible to implement a two-way communication between client and server with Apache Thrift? Thus not only to be able to make RPC from client to server, but also the other way round? In my project I have the requirement that the server must also push some data to the client without being asked by the client before to do this. 回答1: There are two ways how to achieve this with Thrift. If both ends are more or less peers and you connect them through sockets or pipes, you simply set up a

My GWT RPC AsyncCallback doesn’t work: InvocationException

雨燕双飞 提交于 2019-12-25 01:58:58
问题 I developed a GWT application and make a AsyncCallback a jfreechart generated in server side. But there is an error returning a InvocationException. The detailed error message is here 404 html com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.onResponseReceived(RequestCallbackAdapter.java:209) callback.onResponseReceived(this, response); I used GWT 2.5.1 and jre7 and eclipse juno 4.2 My Service Interface, Asynchronous Interface and Implementing Service codes are the same as this

rpcgen-passing a string inside a struct

蹲街弑〆低调 提交于 2019-12-25 01:53:50
问题 I'm trying to pass a string as part of a structure over the network using the rpcgen packages. This is my IDL code : struct param { char* name; int voterid; }; program VOTECLIENT_PROG { version VOTECLIENT_VERS { string ZEROIZE() = 1; string ADDVOTER(int) = 2; string VOTEFOR(param) = 3; string LISTCANDIDATES() = 4; int VOTECOUNT(string) = 5; } = 1; } = 0x2345111; Somehow, the string is being truncated to a single character at the server. For example, if I pass name = "abc", I get "a" at the

What is SRV in MS RPC and what should I know about it?

梦想的初衷 提交于 2019-12-24 21:49:36
问题 This MSDN article about interface registration flags when describing the RPC_IF_ALLOW_LOCAL_ONLY flag talks about some entity called SRV : ...When this interface flag is registered, the RPC runtime rejects calls made by remote clients. ... RPC allows ncacn_NP calls only if the call does not come from SRV ... I've looked through the RFC 2782 and still don't get it. What is SRV in the first place and how can I judge if calls come from it or some other way? 回答1: SRV.SYS is the SMB server driver.

TSocket read 0 bytes Apache Thrift MongoDB

夙愿已清 提交于 2019-12-24 19:39:56
问题 I am developing a small application with RPC framework Apache Thrift and Python. I want to use MongoDB. I am using mongoengine connector and I defined thrift data model and generated code from it When storing tags in a list in the server all is fine. However, I get errors when trying to store tags in database Here Is my code server.py import os import sys from mongoengine import * sys.path.append(os.path.join( os.path.dirname(os.path.abspath(__file__)), 'gen-py')) from thrift.transport import

Exception while running GWT application

雨燕双飞 提交于 2019-12-24 18:37:09
问题 I have built my first GWT app. giving no compilation errors neither run-time errors. However, when the application is loaded into the browser (using Interner Explorer) and I enter username and password field to validate the user, it throws exceptions. Using GWT-RPC method, entire code and interfaces are provided. I'm using HSQL for database connection(back end). ------------------CODE (CLIENT) package com.vin.client; import com.google.gwt.core.client.EntryPoint; import com.google.gwt.core

Implementation of remote()

别等时光非礼了梦想. 提交于 2019-12-24 14:05:26
问题 I'm trying to find the implementation of remote(), as in: remote()->transact(CODE, data, &reply); Do you guys know where it is? Searching Google turned out futile. Or if you know what that function does, it would be a big help for me. Many thanks Update: it seems remote() will return a pointer to an object of type BBinder, IBinder, BpBinder, or IPCThreadState but I'm not sure which one. 回答1: The implementation of remote is simple: class BpRefBase : public virtual RefBase { protected:

App engine RPC discovery doc

懵懂的女人 提交于 2019-12-24 13:25:55
问题 I've been using app engine for Java with cloud endpoints to create a REST api and have suddenly run into this error: WARNING: No discovery doc for API hylytit version v1 in rpc format I'm trying to load the Javascript client library into a web page to do a GET call. In the web console, I see this: GET http://localhost:8888/_ah/api/discovery/v1/apis/hylytit/v1/rpc?fields=methods%2F*%2Fid&pp=0 [HTTP/1.1 404 Not Found 5ms] I'm unfamiliar with what RPC discovery docs are and can't find much

Does a JSON-RPC server exist for answering general Prolog queries?

一笑奈何 提交于 2019-12-24 11:18:13
问题 I saw this tutorial for writing a JSON-RPC server for SWI-Prolog. Unfortunately, all it does is add two numbers. I'm wondering if there exists a RPC server for SWI-Prolog that can define new rules and answer general Prolog queries, returning JSON lists, etc? 回答1: When you take a tour on SWI-Prolog website, proudly self-powered, you can see at work some of the features offered by http package. It's a fairly large range of tools, and to grasp the basic of the system, the easiest way it's to

Understanding XDR specification to create a *.x file

会有一股神秘感。 提交于 2019-12-24 02:07:54
问题 I have been looking through several websites on the Internet and actually wanted to know how do we write specification in a .x file to generate equivalent functions in .c file for RPC. Every site I visited suggested to use following kind of specification in *.x file: program ADD_PROG { version ADD_VERS { int ADD(intpair) = 1; } = 1; } = 0x23451111; So, to understand practically, I obtained gm_protocol.x from an open-source project known as ganglia and generated equivalent C source code (gm