RE: Ordered Map in Thrift

2011-01-31 Thread Mark Slee
This doesn't exist as a Thrift feature. You'll need to separately maintain a list to preserve ordering using Thrift off-the-shelf. Another route to take would be to use some of the annotations to tell Thrift what data-types to use for the map type. If you provide container types that implement

RE: How to use TBufferedTransport in Java ?

2011-03-30 Thread Mark Slee
Also will note that part of the reason TBufferedTransport isn't generally necessary in Java is that by default your Java VM will typically already have a stage of output buffering on its Socket implementation. Wrapping that up in a TBufferedTransport would just burn up CPU/memory to no

RE: Version 0.6.0 on FreeBSD doesn't build the shared.library

2011-04-26 Thread Mark Slee
I've seen a similar issue where the boost path was wrong, or boost wasn't installed. That doesn't seem to show up in your error log, but it may be a similar issue where a library dependency is causing the --with-cpp to be ignored. I'd double-check just to be sure here, not sure what to

RE: use thrift to create an interface from ruby to C++ and use it as webservice

2011-04-26 Thread Mark Slee
This is certainly doable with Thrift. Technically, it won't be a web service, as Thrift doesn't offer and off-the-shelf C++ HTTP server implementation. You would have to embed Thrift in another server if you want HTTP. It's worth noting that the C++ servers we have for Thrift are not really

RE: use thrift to create an interface from ruby to C++ and use it as webservice

2011-04-26 Thread Mark Slee
with the C++ application (a thrift server) to make the calculations and then send a response to the device ... Am i right?? thrift can do the communication between a web client and C++ so i think this won't be a problem (the idea).. Thanks a lot for your time. El 26-04-2011, a las 18:17, Mark

RE: use thrift to create an interface from ruby to C++ and use it as webservice

2011-04-26 Thread Mark Slee
) in my thesis document? or just the whitepaper? El 26-04-2011, a las 18:17, Mark Slee escribió: This is certainly doable with Thrift. Technically, it won't be a web service, as Thrift doesn't offer and off-the-shelf C++ HTTP server implementation. You would have to embed Thrift in another

RE: Thrift IDL

2011-05-26 Thread Mark Slee
1 a long integer field? The term long is vague, Thrift is explicit. Use i32 for 32-bit integers, i64 for 64-bit integers. You probably want i64. 2. a const int field (equivalent to 'static final int field' in java) ? Struct fields can't be constants. If you just want to define a symbolic

Re: Java Object

2012-02-21 Thread Mark Slee
Thrift is statically typed and does not support heterogenous containers. The objects in your map need to be of a concrete type. On 2/20/12 6:54 PM, 韶隆吴 yechen1...@gmail.com wrote: How I can I used the java Object using the object in the thrift, like Map String,Object so write

Re: asymmetrical __isset

2012-04-05 Thread Mark Slee
Still I wonder why it was designed this way. If I compare Thrift generated files with those created by Protobuf, it becomes immediately obvious how much smaller is the Thrift generated code. Maybe that is the reason why it was named Thrift, because it is parsimonious! So maybe it was designed

Re: how to reconnect server after rebooting server

2012-04-19 Thread Mark Slee
Are you 100% sure that your server is up? Connection refused would imply that the server isn't listening for new connections on the port you're trying to connect to... What type of transport are you using? Could also try invoking -close() before open(), or creating a new transport - though it

Re: thrift server questions

2012-04-26 Thread Mark Slee
This is fairly complicated and doesn't sound like a good use of the linux file-permissioning system. Thrift clients are not Linux users. Assuming you're using TCP (the common case), they are data from an IP/port. You have no way of knowing which user that corresponds to - you can encode it in the

Re: Support array

2012-05-07 Thread Mark Slee
It is also worth just quickly noting that native arrays in C++ present a few nontrivial hurdles: - Their length needs to be separately maintained - If they are on the stack, all the object storage is on the stack (as opposed to STL) - If they are dynamic, you now need to manage new/delete calls

Re: OAuth support out of the box

2012-05-23 Thread Mark Slee
Definitely no OAuth support built in. Thrift operates a couple layers lower on the stack than that. Certainly possible to implement OAuth with Thrift as the transport and request mechanism, but it's far from out-of-the-box. On 5/22/12 10:22 PM, corno corno crnco...@gmail.com wrote: Hi there,

RE: Compression on serialization

2012-06-12 Thread Mark Slee
The compact protocol doesn't do compression, the word compact refers to the way it encodes structure and type metadata. Thrift is intended for strongly-typed structured data serialization, not compression. A file is already serialized - it sounds like what you really want is to compress

RE: a thrift server performance estimate

2012-06-19 Thread Mark Slee
Completely dependent on your system configuration and the cost of your RPC calls. This question can't really be answered without more info about the application. Some things to consider: - How expensive are these calls? Do they use a lot of CPU? Block on reading files? - You'll be holding a

Re: reuse Ttransport or not ?

2012-07-19 Thread Mark Slee
Agreed with Rush. A couple other considerations worth mentioning here: - There is a bit of TCP overhead every time you create and then tear down a connection, if you're trying to squeeze out really high performance and this is the same client talking to the same server, it's preferable not to pay

RE: Using multi-threaded clients with Thrift

2012-08-08 Thread Mark Slee
@thrift.apache.org Subject: Re: Using multi-threaded clients with Thrift On Wed, Aug 8, 2012 at 4:55 PM, Mark Slee ms...@fb.com wrote: The Thrift transport layer is not thread-safe. It is essentially a wrapper on a socket. You can't interleave writing things to a single socket from multiple threads

RE: Using Thrift on Android causing error

2012-08-09 Thread Mark Slee
i have not solved it!!! From: ankit patel [aprocks.pa...@gmail.com] Sent: Wednesday, August 08, 2012 6:11 AM To: user@thrift.apache.org Subject: Using Thrift on Android causing error have you solved it???

RE: How to extend multiple Services?

2012-09-20 Thread Mark Slee
This is not supported, Thrift does not implement multiple inheritance. From: Tarun Goyal [join2ta...@gmail.com] Sent: Wednesday, September 19, 2012 11:14 PM To: user@thrift.apache.org Subject: How to extend multiple Services? Hey, How to extend multiple