thrift

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

自古美人都是妖i 提交于 2019-12-05 20:58:21
问题 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? 回答1: 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

Thrift for Bidirectional Messaging

社会主义新天地 提交于 2019-12-05 17:34:17
I am curious if Thrift is a good fit for my use case? I am making yet another messaging system, where there is a client and server, but both client and server and initiate a request message to the other, and not all messages may be request, just notifications. Go back 10 years ago I did this with a hand-rolled binary based codec. Go back 5 years and I did it again using Google Protocol buffers. But I'm hearing more about Thrift now. Can Thrift be used simply as a codec, or is it really built around the request/reply pattern? I need to remain transport agnostic as I will be using a custom

How can you reverse engineer a binary thrift file?

人走茶凉 提交于 2019-12-05 11:42:08
I've been asked to process some files serialized as binary (not text/JSON unfortunately) Thrift objects, but I don't have access to the program or programmer that created the files, so I have no idea of their structure, field order, etc. Is there a way using the Thrift libraries to open a binary file and analyze it, getting a list of the field types, values, nesting, etc.? Unfortunately it appears that Thrift's binary protocol does not do very much tagging of data at all; to decode it appears to assume you have the .thrift file in hand so you know, say, the next 4 bytes are supposed to be an

How can I add a generated source folder to my source path in Gradle and IntelliJ?

*爱你&永不变心* 提交于 2019-12-05 11:23:55
I use thrift and it generates some source java files(interfaces) under build directory (build/generated-sources/thrift/<package name>/<class>) but under my src/main/java I have my classes which has the same package definition as in the generated java files and my classes also implements the interfaces generated by the thrift so how can I configure this in my build.gradle so it works on i ntelliJ as well as the build plugins { id "org.jruyi.thrift" version "0.3.1" } apply plugin: 'idea' apply plugin: 'java' apply plugin: 'maven' apply plugin: "org.jruyi.thrift" group 'com.hello' version '1.0

Can't install Thrift on Mac OS 10.9.2

ⅰ亾dé卋堺 提交于 2019-12-05 09:10:15
This problem is like Installing thrift on CentOS 6.5 64 bit and Cassandra PDO , but he is on CentOS, I am runninc MacOS. checking for gawk... (cached) awk checking for ranlib... (cached) ranlib ./configure: line 17029: syntax error near unexpected token `QT,' ./configure: line 17029: ` PKG_CHECK_MODULES(QT, QtCore >= 4.3, QtNetwork >= 4.3, have_qt=yes, have_qt=no)' My envrioment is gcc -v Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c

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

笑着哭i 提交于 2019-12-05 07:45:28
问题 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

configure: error: no acceptable C compiler found in $PATH

我与影子孤独终老i 提交于 2019-12-05 07:02:34
I am trying to Build and Install the Apache Thrift compiler and libraries I had to type this command is shown in instructions ./configure && make But I get this error: checking for gcc... no checking for cc... no checking for cl.exe... no configure: error: in `/PATH/TO/thrift-0.9.3': configure: error: no acceptable C compiler found in $PATH When I type in my command prompt gcc --version I get this gcc (GCC) 5.3.0 Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A

Convert an object to a JSON string with thrift json serialization

无人久伴 提交于 2019-12-05 06:22:59
I'm new to the thrift. I need to convert my data object to a JSON string with Thrift JSON serialization. I tried in this way. TSerializer serializer = new TSerializer(new TSimpleJSONProtocol.Factory()); String json = serializer.toString(object_name); In here is an error, that object_name should be in TBase . How can I resolve this ? In here is an error, that object_name should be in TBase. Next time, please post the exact error message (use copy+paste), this makes it easier for all of us. How can I resolve this? Whatever you want to serialize with Thrift, must be an descendant of Thrift's

基于Thrift的java和PHP互相调用范例

你说的曾经没有我的故事 提交于 2019-12-05 06:00:23
首先我们看看 Thrift是什么? thrift是一个软件框架,用来进行可扩展且跨语言的服务的开发。它结合了功能强大的软件堆栈和 代码生成 引擎,以构建在 C++, Java, Go,Python, PHP, Ruby, Erlang, Perl, Haskell, C#, Cocoa, JavaScript, Node.js, Smalltalk, and OCaml 这些编程语言间无缝结合的、高效的服务。 是不是感觉很酷??那我们看看怎么玩的,网上关于 thrift 的范例不少,但是很多都千篇一律,很多都有点残缺, 下面我们就展示一下用java来做服务端, 然后客户端用java和php同时来写的例子。 运行环境: win7 x64 JDK 1.8.X PHP 5.6 其中java部分是在在 Itellj idea里面基于MAVEN构建的项目。 废话不多说,上码 1,首先在idea简历maven项目, pom.xml 添加如下类库 <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> <scope>test</scope> </dependency> <dependency> <groupId>org.apache

I'd like to use multiple services on one transport ( Thrift )

て烟熏妆下的殇ゞ 提交于 2019-12-05 05:44:34
I'd like to create several services, and I want to use them with different identifiers. So I mean : I've got a Users and Projects service . I want to use these at the same time. I mean I can add more 'services' to the "handlermap" on xmlrpc. http://ws.apache.org/xmlrpc/server.html phm.addHandler("Users", Users.class); phm.addHandler("Projects", Projects.class); I would like to do the same in the thrift. Here is a simple example : test.thrift typedef i64 UserId struct Bonk { 1: string message, 2: i32 type } struct Insanity { 1: map<Bonk, UserId> userMap, 2: list<Bonk> xtructs } service