JSON-RPC

RPC on android causes GC_EXPLICIT

喜夏-厌秋 提交于 2019-12-12 06:29:42
问题 I need to synchronize my local sqlite database with a remote mysql database. I'm testing different XMLRPC and JSONRPC projects to do so. I send a packet containing all entries that arn't synced yet for each table. When these RPC projects are parsing the data logcat is filled with GC_EXPLICIT . GC_EXPLICIT means that the garbage collector has been explicitly asked to collect, instead of being triggered by high water marks in the heap. Happens all over the place, but most likely when a thread

Reading multiple JSON objects on a JSON-RPC connection

ⅰ亾dé卋堺 提交于 2019-12-11 07:57:42
问题 I am making a streaming API which handles both RPC style calls as well as notifications from the server to the client (not the notifications in the JSON-RPC spec which are client to server). This last part unfortunately rules out JSON-RPC + persistent HTTP. The API is based on the JSON and JSON-RPC specs. JSON - http://www.ietf.org/rfc/rfc4627.txt JSON-RPC - http://www.jsonrpc.org/specification Typical session might be: -> Sending to server <- Receiving from server -> {'id': 0, 'method':

Swagger and json-rpc

自作多情 提交于 2019-12-11 07:32:17
问题 I'm trying to use Swagger-ui for my json-rpc server which was written by php. I use Swagger-PHP to generate json complaint container for Swagger-ui. So, I'm very new to Swagger and I use annotation for methods like that: /** * @SWG\Resource( * apiVersion="0.2", * swaggerVersion="0.8", * basePath="http://mydomain.com", * @SWG\Api( * path="/rpc/json/server.php", * description="Operations about Devices", * @SWG\Operations( * @SWG\Operation( * method="POST", * summary="Get device by ID", *

Pass an PHP Object or Array from one Site to another Site?

ぃ、小莉子 提交于 2019-12-11 06:49:51
问题 In PHP, how can I pass an Object (actually an Array) from one Site to another Site (by not losing its original Object Structure and Values)? How to PASS/SEND from the host site NOT to pull from the destination site I want to pass directly from the automated script by NOT using HTML and web forms. Any suggestion, please. 回答1: The best way to do that is to use json_encode() : file_get_contents('http://www.example.com/script.php?data='.json_encode($object)); on the other side: $content = json

How should an index.html file be served from Python Pyramid for an AngularJS app?

99封情书 提交于 2019-12-11 06:38:49
问题 I am getting into single-page apps with AngularJS but rather than using Node or similar, I am most comfortable with Python on the server. So, given I am somewhat familiar with Pyramid, I plan to use the pyramid_rpc module to return JSON objects to the client app. That's all straight forward enough, however, what then is the best way to serve the starting index file which contains the AngularJS initial AngularJS app? Usually, static files are served from a static directory, but is there any

ZeroMQ REQ/REP on ipc:// and concurrency

不问归期 提交于 2019-12-11 04:29:55
问题 I implemented a JSON-RPC server using a REQ/REP 0MQ ipc:// socket and I'm experiencing strange behavior which I suspect is due to the fact that the ipc:// underlying unix socket is not a real socket, but rather a single pipe. From the documentation, one has to enforce strict zmq_send()/zmq_recv() alternation, otherwise the out-of-order zmq_send() will return an error. However, I expected the enforcement to be per-client, not per-socket. Of course with a Unix socket there is just one pipeline

electrum wallet jsonRPC authentication

拈花ヽ惹草 提交于 2019-12-11 02:32:33
问题 i am trying to use electrum rpc , it is giving me authentication error. i have tried user pass via Basic Authentication on Linux bash and via php but non of them works. My php code was working fine before plectrum vulnerability upgrade. also i have tried curl on bash , but i get same error Error code explanation: 401 - No permission -- see authorization schemes. I have tried curl --data-binary '{"id":"curltext","method":"listaddresses","params":{"funded":true}}' http://test:abc@127.0.0.1:7777

WCF ChannelFactory with Custom Endpoint Behavior (Json-Rpc)

梦想的初衷 提交于 2019-12-10 11:49:49
问题 I've been working really hard on a WCF Json-Rpc Service Model. I'm fairly new to WCF and WCF extensibility but finally I'm now able to process requests from a web browser :) To summarize it, I've now implemented an Endpoint Behavior, an Operation Selector, and a Message Formatter. You can find the latest source code on this post on MSDN forum. I'm now trying to create a WCF Client for it but I'm stuck with the following error: Manual addressing is enabled on this factory, so all messages sent

Using JSON-RPC in Struts2

拈花ヽ惹草 提交于 2019-12-10 11:24:42
问题 I use the following JavaScript/jQuery function to make a remote procedure call. <script src="../js/jquery-1.8.0.min.js" type="text/javascript"></script> <s:url var="testJsonUrl" action="testJsonAction"/> var timeout; var request; $(document).ready(function(){ $("#btnUser").click(function(){ if(!request) { request = $.ajax({ datatype:"json", type: "GET", data: JSON.stringify({jsonrpc:'2.0', method:'getUser', id:'jsonrpc'}), contentType: "application/json-rpc; charset=utf-8", url: "<s:property

Bitcoind JSON-RPC : Java Jersey Client : Unexpected end of file from server Error

元气小坏坏 提交于 2019-12-08 09:00:56
问题 I am very new to bitcoin and this is my first experiment with bitcoind. We have been trying to develop an Java based application on BTC using bitcoind (using testnet). We are using simple HTTP Post using Jersey client with basic authentication like given below. We already have jersey client as part of project dependencies. We are running on Mac OS. The bitcoind and java client are hosted in the same system. Client client = Client.create(); String url = "http://"+username+':'+password+"