thrift

thrift:generate-python generates no Python files in SBT

耗尽温柔 提交于 2019-12-04 06:25:12
问题 I use sbt-thrift 0.6 and I've got the following in the build definition: thriftPythonEnabled := true, thriftPythonOutputDir <<= sourceDirectory(_ / "python") When I run thrift:generate-python it generates nothing. thrift:generate-java works fine. Can someone tell me what I have to do to enable the Python support in the plugin? 回答1: You miss Thrift config in your setting. Give the following a try (using SBT 0.12 syntax): thriftPythonEnabled in Thrift := true, thriftPythonOutputDir in Thrift <<

Any success using Apache Thrift on iPhone?

自闭症网瘾萝莉.ら 提交于 2019-12-04 06:14:22
Has anybody done or seen a deployment of Apache Thrift in an iPhone app? I am wondering if is a reasonable solution for a high-volume, low(er)-latency network service for iPhones compared to HTTP. One noteworthy thing I found is a bug report about running Thrift on the iPhone, which seems to have been fixed. But that doesn't necessarily indicate that it's a done deal. Thrift and HTTP aren't mutually exclusive. In fact thrift now ships with an HTTP transport implementation to use. It's also a really nice way to auto-generate server/client code that avoids a lot of marshalling/unmarshalling

python thrift error ```TSocket read 0 bytes```

笑着哭i 提交于 2019-12-04 06:09:40
My python version:2.7.8 thrift version:0.9.2 python-thrift version:0.9.2 OS: centOS 6.8 My test.thrift file: const string HELLO_IN_KOREAN = "an-nyoung-ha-se-yo" const string HELLO_IN_FRENCH = "bonjour!" const string HELLO_IN_JAPANESE = "konichiwa!" service HelloWorld { void ping(), string sayHello(), string sayMsg(1:string msg) } client.py # -*-coding:utf-8-*- from test import HelloWorld from test.constants import * from thrift import Thrift from thrift.transport import TSocket from thrift.transport import TTransport from thrift.protocol import TBinaryProtocol # Make socket transport = TSocket

thrift cpp sample code compile error

為{幸葍}努か 提交于 2019-12-04 06:06:28
I'm new to Thrift. I think I installed it correctly. I have the folowing libs : luckyan315@ubuntu:~/code/thrift-0.8.0/tutorial/cpp$ ll /usr/local/lib/ total 11496 drwxr-xr-x 4 root root 4096 Mar 23 19:35 ./ drwxr-xr-x 10 root root 4096 Oct 12 22:27 ../ -rwxr-xr-x 1 root root 4100463 Mar 31 20:26 libthrift-0.8.0.so* -rw-r--r-- 1 root root 7256552 Mar 31 20:26 libthrift.a -rwxr-xr-x 1 root root 991 Mar 31 20:26 libthrift.la* lrwxrwxrwx 1 root root 18 Mar 23 19:35 libthrift.so -> libthrift-0.8.0.so* -rwxr-xr-x 1 root root 160727 Mar 31 20:26 libthriftz-0.8.0.so* -rw-r--r-- 1 root root 218290 Mar

Apache Thrift Java-Javascript communication

十年热恋 提交于 2019-12-04 04:45:10
I'm writing a Java server based on Apache Thrift, that will receive data from a Javascript client. I have completed the Java server, but the problem is that I can get a working example for the Javascript client (I was unable to find a good example for it). the examples in the build documentation aren't very helpful. My current Javascript client is below: function testServer() { try { var transport = new Thrift.Transport("http://127.0.0.1:9090"); var protocol = new Thrift.Protocol(transport); var client = new JavaEventClient(protocol); var alive = client.isServerAlive(); } catch(e) { } }

Is there an IPC transport implementation for Thrift ? or low latency SOA solutions

妖精的绣舞 提交于 2019-12-04 03:26:05
I want to introduce SOA to a low latency system without the overhead of TCP communication(even on the same machine). Thirft seems like a great fit as I have both Java and php processes. Is there an IPC transport implementation for thrift, or any other good idea that could help in this scenario? gt5050 You could use Thrift to serialize your objects and then use IPC method of your liking(named pipe,message queues etc). The following is a simple example using pipes We have a an object of type Message which contains some information Php process is the producer of the message Java process is the

Thrift can not deserialize from json to java object

泪湿孤枕 提交于 2019-12-04 02:01:36
问题 I generated a java object from the following thrift object: struct Account { 1: required string accountType, 2: bool accountActive, } I wrote a java code trying to serialize java object to json string and then deserialize the json string back to java object. I can serialize successfully but failed to deserialize. TSerializer serializer = new TSerializer(new TSimpleJSONProtocol.Factory()); TDeserializer deserializer = new TDeserializer(new TSimpleJSONProtocol.Factory()); Account a1 = new

Enable Thrift in Cassandra Docker

故事扮演 提交于 2019-12-04 01:52:35
I'm trying to start up a docker image that runs cassandra. I need to use thrift to communicate with cassandra, but it looks like that's disabled by default. Checking out the cassandra logs shows: INFO 21:10:35 Not starting RPC server as requested. Use JMX (StorageService->startRPCServer()) or nodetool (enablethrift) to start it My question is: how can I enable thrift when starting this cassandra container? I've tried to set various environment variables to no avail: docker run --name cs1 -d -e "start_rpc=true" cassandra docker run --name cs1 -d -e "CASSANDRA_START_RPC=true" cassandra docker

protobuf,json,xml,binary,Thrift之间的对比

半城伤御伤魂 提交于 2019-12-04 01:04:29
golang 使用 protobuf 的教程 golang使用protobuf 一条消息数据,用protobuf序列化后的大小是json的10分之一,xml格式的20分之一,是二进制序列化的10分之一,总体看来ProtoBuf的优势还是很明显的。 protobuf是google提供的一个开源序列化框架,类似于XML,JSON这样的数据表示语言,详情访问protobuf的google官方网站。 protobuf在google中是一个比较核心的基础库,作为分布式运算涉及到大量的不同业务消息的传递,如何高效简洁的表示、操作这些业务消息在google这样的大规模应用中是至关重要的。而protobuf这样的库正好是在效率、数据大小、易用性之间取得了很好的平衡。 protobuf简单总结如下几点: 1.灵活(方便接口更新)、高效(效率经过google的优化,传输效率比普通的XML等高很多); 2.易于使用;开发人员通过按照一定的语法定义结构化的消息格式,然后送给命令行工具,工具将自动生成相关的类,可以支持java、c++、python等语言环境。通过将这些类包含在项目中,可以很轻松的调用相关方法来完成业务消息的序列化与反序列化工作。 3.语言支持;原生支持c++,java,python 个人总结的适用protobuf的场合: 1.需要和其它系统做消息交换的,对消息大小很敏感的

WSO2 API Manager 2.0 Log Error localhost:7712 (ssl thrift port)

血红的双手。 提交于 2019-12-03 23:15:45
I have installed APIM and APIM Analytics in two different machines. I followed this guide to connect APIM to APIM Analytics. Analytics are working fine, I can see usage data in dashboards, but this error keeps showing once and again in log file ERROR {org.wso2.carbon.databridge.agent.endpoint.DataEndpointConnectionWorker} - Error while trying to connect to the endpoint. Cannot borrow client for ssl://localhost:7712 {org.wso2.carbon.databridge.agent.endpoint.DataEndpointConnectionWorker} org.wso2.carbon.databridge.agent.exception.DataEndpointAuthenticationException: Cannot borrow client for ssl