David Reiss [Fri, 25 Jul 2008 21:05:59 +0000 (21:05 +0000)]
rb: BinaryProtocolAccelerated should use Thrift::ProtocolException [THRIFT-89]
BinaryProtocolAccelerated references the deprecated name TProtocolException,
when it should be using Thrift::ProtocolException.
It also uses rb_raise() instead of rb_exc_raise().
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@679897
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Fri, 25 Jul 2008 19:48:39 +0000 (19:48 +0000)]
THRIFT-91. cpp: Fix compilation on Fedora Core 9
It turns out that __STDC_LIMIT_MACROS is not portable.
Include limits.h at least until cstdint becomes mainstream.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@679885
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Thu, 24 Jul 2008 19:20:32 +0000 (19:20 +0000)]
THRIFT-64. java: Allow TServerSocket to bind to a specific IP address
Add a new constructor to TServerSocket that accepts an InetSocketAddress
and binds to that address. Define the old constructor (which just takes
a port) in terms of the new one.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@679505
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Thu, 24 Jul 2008 19:13:54 +0000 (19:13 +0000)]
THRIFT-85. Include an example of an optional field in tutorial.thrift
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@679501
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Thu, 24 Jul 2008 19:10:16 +0000 (19:10 +0000)]
THRIFT-95. cpp: Fix write buffer initialization in TBufferedTransport
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@679500
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 22 Jul 2008 06:57:41 +0000 (06:57 +0000)]
THRIFT-94. erlang: Fix a syntax error
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@678659
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Mon, 21 Jul 2008 19:03:31 +0000 (19:03 +0000)]
THRIFT-92. Remove the shebang line from reflection_limited.thrift
We have tentatively decided to nix the shebang notation for Thrift files.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@678530
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Mon, 21 Jul 2008 19:03:11 +0000 (19:03 +0000)]
THRIFT-93. Remove unnecessary shebang lines from Python libraries
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@678529
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Fri, 18 Jul 2008 22:27:03 +0000 (22:27 +0000)]
rb: Improve IOStreamTransport to behave more like a real transport [THRIFT-76]
Author: Kevin Ballard <kevin@rapleaf.com>
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@678065
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Fri, 18 Jul 2008 22:03:48 +0000 (22:03 +0000)]
rb: Display field name in type-checking error [THRIFT-78]
Author: Kevin Ballard <kevin@rapleaf.com>
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@678059
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Fri, 18 Jul 2008 21:57:07 +0000 (21:57 +0000)]
rb: Add TProtocolException to the backwards_compatibility_spec [THRIFT-88]
Author: Kevin Ballard <kevin@rapleaf.com>
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@678055
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Fri, 18 Jul 2008 21:49:50 +0000 (21:49 +0000)]
rb: Add optional timeout argument to Thrift::Socket [THRIFT-74]
Socket.new and UNIXSocket.new both now have a new optional argument: timeout.
There's also a timeout field accessor. This timeout is used when reading or
writing.
Author: Kevin Ballard <kevin@rapleaf.com>
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@678053
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Thu, 17 Jul 2008 19:36:34 +0000 (19:36 +0000)]
php: Fix an undefined variasble in an error message
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@677698
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Wed, 16 Jul 2008 05:13:30 +0000 (05:13 +0000)]
THRIFT-83. erlang: Don't flush an empty buffer in the http transport.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@677157
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Mon, 14 Jul 2008 19:35:50 +0000 (19:35 +0000)]
java: Add nocamel option to not CamelCase field accessors [THRIFT-42]
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@676699
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Sun, 13 Jul 2008 23:15:55 +0000 (23:15 +0000)]
java: Close broken connections [THRIFT-73]
Fixes a bug where TNonblockingServer (and by extension THsHaServer) could
permanently lose track of client connections if the message on-wire was
malformed. If the client sends a bad message now, the server will close the
transport at its earliest convenience.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@676456
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Sun, 13 Jul 2008 22:18:51 +0000 (22:18 +0000)]
cpp: Eliminate the use of fprintf [THRIFT-77]
Add printf and perror methods to TOutput and use them to
replace uses of fprintf in the C++ library.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@676448
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Fri, 11 Jul 2008 21:39:58 +0000 (21:39 +0000)]
(THRIFT-37) Add some missing newlines to fprintfs.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@676087
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Fri, 11 Jul 2008 08:04:12 +0000 (08:04 +0000)]
s/ENABLE_RUBY/WITH_RUBY/ for consistency.
This didn't happen in r666490 because the Ruby stuff was developed
in a separate branch.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@675857
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Fri, 11 Jul 2008 08:02:29 +0000 (08:02 +0000)]
Add erl back to EXTRA_DIST because it doesn't use Automake.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@675855
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Fri, 11 Jul 2008 01:26:16 +0000 (01:26 +0000)]
[THRIFT-70] Allow the Java install prefix to be configured.
Systems like Debian expect the thrift jar to be in /usr/share/java, not
the default /usr/local/lib This patch allows configure to be passed a
JAVA_PREFIX= flag.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@675821
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Fri, 11 Jul 2008 00:45:29 +0000 (00:45 +0000)]
(THRIFT-69) Fix Util::currentTime for use in applications.
This function didn't work properly when used outside of the Thrift library
because config.h isn't available. This patch fixes the issue by moving
the function definition into the library.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@675819
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Tue, 8 Jul 2008 23:30:13 +0000 (23:30 +0000)]
rb: Check Thrift.type_checking earlier for a performance boost [THRIFT-55]
Author: Kevin Ballard <kevin@rapleaf.com>
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@675053
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Tue, 8 Jul 2008 23:20:15 +0000 (23:20 +0000)]
rb: Buffer the slice!s in MemoryBuffer for a significant performance increase [THRIFT-63]
Author: Kevin Ballard <kevin@rapleaf.com>
Currently it buffers up to 4kB before throwing away the data.
Tests with 1MB shows the exact same performance characteristics.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@675049
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Tue, 8 Jul 2008 00:47:49 +0000 (00:47 +0000)]
Merge branch 'fastbinary'
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@674688
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Thu, 3 Jul 2008 20:29:34 +0000 (20:29 +0000)]
(THRIFT-54) Remove "frameResponses" from TNonblockingServer
TNonblockingServer and TFramedTransport used to have the option to only
frame messages on one side of the communication. This capability was
removed from TFramedTransport because it was poorly implemented and not
useful. This change removes it from TNonblockingServer as well, and
removes references to it in some of the C++ test code.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@673791
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Wed, 2 Jul 2008 23:55:04 +0000 (23:55 +0000)]
(THRIFT-5) A TNonblockingServers (single-threaded and thread-pool) for Java
This patch adds two Thrift servers for Java that both use non-blocking I/O
to avoid locking up worker threads for idle connections. The two classes are
- TNonblockingServer, which supports single-threaded serving
- THsHaServer, which performs I/O in one thread and method invocations in
a configurable thread pool.
To support these servers, TNonblockingServerSocket and TNonblockingSocket
have been added.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@673550
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Mon, 30 Jun 2008 22:27:29 +0000 (22:27 +0000)]
(THRIFT-40) Remove stray \n's from the generated version.h
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@672945
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Mon, 30 Jun 2008 21:55:52 +0000 (21:55 +0000)]
(THRIFT-40) Fix compilation and version string on OS X.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@672943
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Mon, 30 Jun 2008 21:40:35 +0000 (21:40 +0000)]
(THRIFT-45) TNonblockingServer (C++): only do one write in responses.
Instead of doing one 4-byte write for the frame length before the write
of the actual message, prepend the frame length to the message buffer
so we can send them both at once.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@672937
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Mon, 30 Jun 2008 20:45:47 +0000 (20:45 +0000)]
Partial handlling of 64-bit integer constants.
- Parse integer constants in Thrift files as 64-bit ints.
- Die if an overflow occurs.
- Warn if an enum value cannot fit in 32 bits.
- Add a simple test for the above.
I ran all of the generators over BrokenConstants.thrift before adding the
overflow, and they appeared to work. However, the code generated was not
always valid (for example, the 64-bit constant must have an LL suffix in C++).
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@672907
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Mon, 30 Jun 2008 20:24:24 +0000 (20:24 +0000)]
(THRIFT-40) Add -version switch to the compiler to show the Thrift version
The version is determined by configure.ac. After this version is shown the
revision. For subversion, it is simply the current revision as given by
`svnversion`. For git, the latest svn revision that HEAD includes is shown,
followed by the offset of HEAD from that commit, followed by a truncated sha1
for HEAD. If the offset is 0, the offset and sha1 are omitted.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@672900
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Mon, 30 Jun 2008 19:48:04 +0000 (19:48 +0000)]
(THRIFT-61) Fix "make check" for the C++ library by not doing empty flushes.
I changed the behavior of TFramedTransport when flush is called without
writing any data to the transport. This broke the unit test, which was
relying on a weird corner of TFramedTransport's behavior in order to do
some stricter checking. I altered the unit test to never flush without
writing and added a new test to verfy the "empty flush" behavior.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@672881
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Mon, 30 Jun 2008 19:13:23 +0000 (19:13 +0000)]
(THRIFT-12) Make the Java library use java.util.logging instead of stdout.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@672868
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Thu, 26 Jun 2008 18:45:29 +0000 (18:45 +0000)]
rb: Ensure the specs that expect deprecation warnings actually get them [THRIFT-56]
Author: Kevin Ballard <kevin@rapleaf.com>
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@671985
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Thu, 26 Jun 2008 18:45:19 +0000 (18:45 +0000)]
rb: The deprecation stuff should skip thrift library code when showing caller [THRIFT-56]
Author: Kevin Ballard <kevin@rapleaf.com>
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@671984
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Thu, 26 Jun 2008 18:35:15 +0000 (18:35 +0000)]
rb: Add some additional error handling to Thrift::Socket [THRIFT-53]
Author: Kevin Ballard <kevin@rapleaf.com>
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@671979
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Thu, 26 Jun 2008 18:14:25 +0000 (18:14 +0000)]
rb: Add stubs for rake install/package when Echoe not present [THRIFT-52]
Author: Kevin Ballard <kevin@rapleaf.com>
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@671971
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Thu, 26 Jun 2008 18:10:56 +0000 (18:10 +0000)]
rb: BufferedTransport should flush on close [THRIFT-49]
This also adds code and spec so nothing will be written to the transport
if there's nothing in the write buffer.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@671967
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Thu, 26 Jun 2008 17:49:49 +0000 (17:49 +0000)]
rb: Use File.dirname(__FILE__) in generated requires [THRIFT-57]
This means you no longer have to put the gen-rb folder in $:
Author: Kevin Ballard <kevin@rapleaf.com>
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@671963
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Tue, 24 Jun 2008 20:46:32 +0000 (20:46 +0000)]
rb: Make TServer.py Python 2.4 compatible [THRIFT-44]
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@671337
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Tue, 24 Jun 2008 01:32:03 +0000 (01:32 +0000)]
rb: When passing unknown keys to Thrift::Struct.new, report those keys in the exception [THRIFT-51]
Author: kevin@rapleaf.com
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@670989
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Tue, 24 Jun 2008 01:06:10 +0000 (01:06 +0000)]
rb: Delete setup.rb [THRIFT-38]
From kevin@rapleaf.com
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@670985
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Tue, 24 Jun 2008 01:06:08 +0000 (01:06 +0000)]
rb: rewrite the README [THRIFT-38]
From kevin@rapleaf.com
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@670984
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Tue, 24 Jun 2008 01:06:06 +0000 (01:06 +0000)]
rb: Change the license from Thrift Software License to Apache Software License [THRIFT-38]
From kevin@rapleaf.com
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@670983
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Tue, 24 Jun 2008 01:06:00 +0000 (01:06 +0000)]
rb: Use Echoe to manage the gem [THRIFT-38]
From kevin@rapleaf.com
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@670982
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Tue, 24 Jun 2008 01:05:57 +0000 (01:05 +0000)]
rb: Reorganize the Rakefile a bit [THRIFT-38]
From kevin@rapleaf.com
Also add a guard to ensure `rake test` is only run if we're in a full thrift checkout
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@670981
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Tue, 24 Jun 2008 01:05:55 +0000 (01:05 +0000)]
rb: Use defined? JRUBY_VERSION to detect JRuby [THRIFT-38]
From kevin@rapleaf.com
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@670980
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Tue, 24 Jun 2008 01:05:51 +0000 (01:05 +0000)]
rb: require 'thrift' first in generated service definitions [THRIFT-38]
From kevin@rapleaf.com
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@670979
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Tue, 24 Jun 2008 00:33:00 +0000 (00:33 +0000)]
rb: Bugfix for deprecation code [kevin@rapleaf.com][THRIFT-50]
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@670976
13f79535-47bb-0310-9956-
ffa450edef68
Doug Cutting [Fri, 20 Jun 2008 22:21:19 +0000 (22:21 +0000)]
THRIFT-43. Ignore build-generated files.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@670083
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Wed, 18 Jun 2008 01:20:25 +0000 (01:20 +0000)]
rb: Switch NonblockingServer spec from Queue to sleep
Using sleep instead of Queue#pop means the thread is killable under JRuby
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669043
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Wed, 18 Jun 2008 01:20:22 +0000 (01:20 +0000)]
rb: NonblockingServer: Use a select() loop in the acceptor thread
Using a select() loop with a timeout allows the acceptor thread to be shut down
cleanly under JRuby.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669042
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Wed, 18 Jun 2008 01:20:16 +0000 (01:20 +0000)]
rb: Set default host for benchmark to 127.0.0.1
MRI resolves localhost to ::1 (on OS X) whereas JRuby resolves it to 127.0.0.1. This means using
MRI for server and JRuby for client doesn't work.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669041
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Wed, 18 Jun 2008 01:20:13 +0000 (01:20 +0000)]
rb: Fix the timeout used for joining threads when calling shutdown(timeout) on NonblockingServer
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669040
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Wed, 18 Jun 2008 01:20:10 +0000 (01:20 +0000)]
rb: Add hooks for THRIFT_HOST and THRIFT_PORT in the benchmark
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669039
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Wed, 18 Jun 2008 01:20:06 +0000 (01:20 +0000)]
rb: Add control for the number of client processes in the benchmark
You control this with THRIFT_NUM_PROCESSES, the default is 40
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669038
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Wed, 18 Jun 2008 01:20:02 +0000 (01:20 +0000)]
rb: Add debug logger message for processing frames
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669037
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Wed, 18 Jun 2008 01:19:59 +0000 (01:19 +0000)]
rb: Make a few of the NonblockingServer specs pass under jruby
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669036
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Wed, 18 Jun 2008 01:19:54 +0000 (01:19 +0000)]
rb: Fix up the deprecation spec for JRuby
JRuby has different behavior regarding #method_added and #included, so the deprecation spec has to handle this
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669035
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Wed, 18 Jun 2008 01:19:51 +0000 (01:19 +0000)]
rb: Fix the binaryprotocol spec to run under jruby
Stop testing for RangeErrors with bignums in i64, that was just an artifact of the MRI interpreter that has different behavior under jruby.
JRuby uses a different Float::MIN/MAX so stop hard-coding the binary representation
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669034
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Wed, 18 Jun 2008 01:19:46 +0000 (01:19 +0000)]
rb: Increase the benchmark startup time and add more hooks
You can now control the number of clients per proc and calls per client with THRIFT_NUM_CALLS and THRIFT_NUM_CLIENTS.
You can also instruct the clients to log exceptions with THRIFT_LOG_EXCEPTIONS=yes
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669033
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Wed, 18 Jun 2008 01:19:41 +0000 (01:19 +0000)]
rb: Drop the benchmark worker spawn delay to 0.01
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669032
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Wed, 18 Jun 2008 01:19:37 +0000 (01:19 +0000)]
rb: Catch TransportException errors during the benchmark and report them
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669031
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Wed, 18 Jun 2008 01:19:33 +0000 (01:19 +0000)]
rb: flush STDOUT after starting the benchmark server to properly kickstart the benchmark
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669030
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Wed, 18 Jun 2008 01:19:28 +0000 (01:19 +0000)]
rb: Give the benchmark server more time to start up
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669029
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Wed, 18 Jun 2008 01:19:23 +0000 (01:19 +0000)]
rb: Turn off debug logging in benchmark/thin_server.rb
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669028
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Wed, 18 Jun 2008 01:19:18 +0000 (01:19 +0000)]
rb: Fix some incorrect reporting by the benchmark.
Also make it use -J-server when jruby is the server interpreter
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669027
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Wed, 18 Jun 2008 01:19:14 +0000 (01:19 +0000)]
rb: Enhance the output of the benchmark
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669026
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Wed, 18 Jun 2008 01:19:09 +0000 (01:19 +0000)]
rb: split up benchmark into separate server/client files and distinct interpreters
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669025
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Wed, 18 Jun 2008 01:19:04 +0000 (01:19 +0000)]
rb: Switch from read_nonblock to readpartial to make jruby happy
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669024
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Wed, 18 Jun 2008 01:18:57 +0000 (01:18 +0000)]
rb: Add spec to ensure UNIXServerSocket deletes the socket when closing
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669023
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Wed, 18 Jun 2008 01:18:52 +0000 (01:18 +0000)]
rb: Enable logging debug info in benchmark/thin_server.rb
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669022
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Wed, 18 Jun 2008 01:18:47 +0000 (01:18 +0000)]
rb: Tweak the benchmark to allow running the server in a separate process
Add a thin server library that can be run by hand
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669021
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Wed, 18 Jun 2008 01:18:41 +0000 (01:18 +0000)]
rb: Wrap a semaphore around @serverTransport.close in NonblockingServer.shutdown
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669020
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Wed, 18 Jun 2008 01:18:35 +0000 (01:18 +0000)]
rb: Implement Thrift::UNIXSocket and Thrift::UNIXServerSocket
In benchmarking it turns out these don't give any noticeable performance boost,
but as I've already written them, somebody may want them for something.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669019
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Wed, 18 Jun 2008 01:18:28 +0000 (01:18 +0000)]
rb: Implement Thrift::Serializer and Thrift::Deserializer
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669018
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Wed, 18 Jun 2008 01:18:21 +0000 (01:18 +0000)]
rb: Add the path to gen-rb to $: in spec_helper instead of in multiple different specs
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669017
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Wed, 18 Jun 2008 01:18:14 +0000 (01:18 +0000)]
rb: Don't type-check when given a nil value.
Turn on type-checking for all specs
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669016
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Wed, 18 Jun 2008 01:18:07 +0000 (01:18 +0000)]
rb: Implement type-checking in Thrift::Struct.new and field accessors
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669015
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Wed, 18 Jun 2008 01:17:57 +0000 (01:17 +0000)]
rb: Fix struct_spec to use a proper description
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669014
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Wed, 18 Jun 2008 01:17:51 +0000 (01:17 +0000)]
rb: Add helpers for optional type-checking
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669013
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Wed, 18 Jun 2008 01:17:44 +0000 (01:17 +0000)]
rb: Completely rewrite Thrift::NonblockingServer
It now has a much better and cleaner architecture, a proper persistent thread pool,
a dedicated acceptor thread, and no concurrency issues
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669012
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Wed, 18 Jun 2008 01:17:37 +0000 (01:17 +0000)]
rb: Add a hack to prevent fastthread from being loaded when executing specs
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669011
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Wed, 18 Jun 2008 01:17:30 +0000 (01:17 +0000)]
rb: Enhance non-blocking read in Socket
Also prevent errors when trying to close a @handle twice
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669010
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Wed, 18 Jun 2008 01:17:22 +0000 (01:17 +0000)]
rb: Remove an unnecessary return statement
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669009
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Wed, 18 Jun 2008 01:17:14 +0000 (01:17 +0000)]
rb: Stop using fastthread, it seems to give no benefit and in fact has a bug
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669008
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Wed, 18 Jun 2008 01:17:06 +0000 (01:17 +0000)]
rb: Add benchmarking code for Thrift::NonblockingServer
You can override the server to test with the THRIFT_SERVER env var
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669007
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Wed, 18 Jun 2008 01:16:58 +0000 (01:16 +0000)]
Add synchronization around shared resources in NonblockingServer
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669006
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Wed, 18 Jun 2008 01:16:50 +0000 (01:16 +0000)]
rb: Enhance the backwards compatibility spec to ensure that the deprecated method names really do correspond to the new method names
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669005
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Wed, 18 Jun 2008 01:16:42 +0000 (01:16 +0000)]
rb: Stop calling rspec_clear in specs (which really should have been rspec_reset), as rspec_verify already resets
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669004
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Wed, 18 Jun 2008 01:16:35 +0000 (01:16 +0000)]
rb: Add thrift/protocol/binaryprotocol to the root lib/thrift file to cut down on client-side requires
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669003
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Wed, 18 Jun 2008 01:16:27 +0000 (01:16 +0000)]
rb: Add spec for shutting down NonblockingServer in response to a client message
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669002
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Wed, 18 Jun 2008 01:16:20 +0000 (01:16 +0000)]
rb: Struct#new should properly initialize boolean values
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669001
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Wed, 18 Jun 2008 01:16:11 +0000 (01:16 +0000)]
rb: Thrift::Socket should return false from #open? if an error occurred during a read/write (THRIFT-7)
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669000
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Wed, 18 Jun 2008 01:16:02 +0000 (01:16 +0000)]
Implement NonblockingServer and add specs
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668999
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Wed, 18 Jun 2008 01:15:53 +0000 (01:15 +0000)]
Squelch warning about parens and standardize require for generated code
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668998
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Wed, 18 Jun 2008 01:15:45 +0000 (01:15 +0000)]
Add optional host argument to ServerSocket
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668997
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Wed, 18 Jun 2008 01:15:36 +0000 (01:15 +0000)]
Teach Socket how to read_nonblock
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668996
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Wed, 18 Jun 2008 01:15:25 +0000 (01:15 +0000)]
Add a few accessors and specs to prepare for the upcoming NonblockingServer
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668995
13f79535-47bb-0310-9956-
ffa450edef68