FAQ Database Discussion Community

javascript Thrift client hangs

I have the following Thrift client code in javascript: <script language="javascript" type="text/javascript" src="thrift.js" /> <script language="javascript" type="text/javascript" src="QuantSvc_types.js" /> <script language="javascript" type="text/javascript" src="QuantSvc.js" /> <script language="javascript" type="text/javascript"> function calc() { var transport = new Thrift.Transport("http://localhost:9997/QuantSvc/"); var protocol = new Thrift.Protocol(transport); var client = new QuantSvcClient(protocol); try {...

Apache Thrift tutorial client stuck when using 2 clients - how to make the server multitask?

I'm executing Apache Thrift tutorial for Java. When running 2 client processes at the same time, the server doesn't accept the 2nd client. Only after the first client finishes, the second one is accepted by the server. Can anyone explain what's going on? How can I make the server accept...

What are the practical disadvantages of using strongly typed data interchange format (eg thrift / capn proto) in a microservices context?

I'm thinking of introducing a strongly typed (read - with predefined schema) data interchange format for communication between our internal services. For example, I guess something like Thrift or Cap'n Proto. At least two obvious advantages (to me) of using this over something like JSON is that you would KNOW...

Service composability in IDL when multiplexing in Apache Thrift

Since now Apache Thrift supports service multiplexing, I want to know if one can compose the services like so service A { int methodA(1: int param) } service B { A serviceAProxy, int methodB(1: int param) } Is there a way to achieve this effect with respect to the client...

Error installing thrift on mac yosemite

I followed these steps to install thrift on MAC Yosemite : Downloaded and unzipped the package from : http://archive.apache.org/dist/thrift/0.9.0/ Followed the steps on this page : https://thrift.apache.org/docs/install/os_x But I am facing the following error, after I run ./configure command : ./configure: line 17810: syntax error near unexpected token QT,' ./configure:...

For which purposes used seqid in Apache Thrift?

I am investigating how to work Apache Thrift library and found that any send/receive operation uses seqid variable. But it always set to zero and I didnt find any place where it change or use. Its very strange. Does everyone know for which purposes this variable present in thrift?

How to display object properties in python

In my project, I have to user build server and client in different language by integrate thrift to the project. So I decided to build client in python. However I know very little about python :( So can anyone help to solve this simple problem Assume that I have a...

Thrift compiler - generate different languages to different output paths

Thrift compiler allows specifying output directory for generated files. I am writing a Java client and C# server, and I would like to have the generated files from -gen java and -gen csharp be located in different directories of my project. Is it possible?...

Monit can not start thrift

Here's my code below: check host thrift with address if failed port 9090 type tcp then exec "/bin/bash -c '/bin/lib/hbase/bin/hbase-daemon.sh start thrift'" The first two lines can be executed as I expected, but the last line is executed without error and starting thrift, like doing nothing. By the way,...

How to send Java objects that are not defined structures in Thrift

Is there a way to send Java objects that are not defined in thrift files as a structures from one java application to another java application via thrift. The problem is that we are using an external library that has it's own domain model and we need to send those...

Type has not field or method Read (but it does)

I'm stumped on this one. In the project that I'm working on, we generate go code from Thrift. The code gets created in the package A/B/thriftapi (which used to be A/B/thrift which was causing problems because all of the generated code was importing git.apache.org/thrift.git/lib/go/thrift and causing name collisions). I generated...

Symmetric encryption (AES) in Apache Thrift

I have two applications that interact using Thrift. They share the same secret key and I need to encrypt their messages. It makes sense to use symmetric algorithm (AES, for example), but I haven't found any library to do this. So I made a research and see following options: Use...

Thrift `recv failed` SocketException when using TNonblockingServerSocket

I'm trying to use TNonblockingServerSocket with TFramedTransport on both client and server side but get the following error: TTransportException: java.net.SocketException: Software caused connection abort: recv failed. Server code: TServerTransport serverTransport = new TNonblockingServerSocket(9090); TThreadPoolServer.Args args = new TThreadPoolServer.Args(serverTransport); args.processor(processor); args.transportFactory(new TFramedTransport.Factory()); TServer server = new TThreadPoolServer(args); server.serve(); Client code: transport...