Commit Graph

130 Commits

Author SHA1 Message Date
Kevin Clark
e45bf59417 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
2008-06-18 01:17:44 +00:00
Kevin Clark
3c59aff0b9 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
2008-06-18 01:17:37 +00:00
Kevin Clark
1067425ef7 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
2008-06-18 01:17:30 +00:00
Kevin Clark
7fb207f2f9 rb: Remove an unnecessary return statement
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669009 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:17:22 +00:00
Kevin Clark
cb344a3b49 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
2008-06-18 01:17:14 +00:00
Kevin Clark
ca8a1b3b99 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
2008-06-18 01:17:06 +00:00
Kevin Clark
e4489d3e69 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
2008-06-18 01:16:58 +00:00
Kevin Clark
2e4f9d61dc 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
2008-06-18 01:16:50 +00:00
Kevin Clark
4eea89737a 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
2008-06-18 01:16:42 +00:00
Kevin Clark
75a15d8868 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
2008-06-18 01:16:35 +00:00
Kevin Clark
1535078231 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
2008-06-18 01:16:27 +00:00
Kevin Clark
6c4598bbc0 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
2008-06-18 01:16:20 +00:00
Kevin Clark
1d4b2d87f7 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
2008-06-18 01:16:11 +00:00
Kevin Clark
e0fdddea44 Implement NonblockingServer and add specs
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668999 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:16:02 +00:00
Kevin Clark
90a2cbe0a4 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
2008-06-18 01:15:53 +00:00
Kevin Clark
c67587006f Add optional host argument to ServerSocket
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668997 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:15:45 +00:00
Kevin Clark
c78eeef184 Teach Socket how to read_nonblock
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668996 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:15:36 +00:00
Kevin Clark
6c30dbbb92 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
2008-06-18 01:15:25 +00:00
Kevin Clark
63eb9979d6 Remove dummy initialize method
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668994 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:15:15 +00:00
Kevin Clark
7019070c92 Rubify Socket and ServerSocket
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668993 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:15:06 +00:00
Kevin Clark
3c4367ae4b Finish rubifying MemoryBuffer and FramedTransport
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668992 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:14:57 +00:00
Kevin Clark
5a2d0ad20a Make a lot of miscellaneous ruby-styling changes
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668991 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:14:48 +00:00
Kevin Clark
01a514494d Fix default values of non-primitive types being shared between struct instances (THRIFT-4)
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668989 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:14:36 +00:00
Kevin Clark
ec9106f854 Mark failing tests as pending
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668988 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:14:26 +00:00
Kevin Clark
f98286a8e4 Add failing spec for Socket closing when it has an error (THRIFT-7)
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668986 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:14:08 +00:00
Kevin Clark
1cfd693f3e Add new spec for properly initializing boolean values
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668985 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:13:58 +00:00
Kevin Clark
a7613dde90 Add new gen-rb task to rebuild the bundled thrift generated code for specs
Also rewrite the test task to properly abort Rake if it fails


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668984 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:13:48 +00:00
Kevin Clark
9479b1a593 Add failing spec for sharing of default values between struct instances (THRIFT-4)
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668983 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:13:37 +00:00
Kevin Clark
0d6007c717 Add missing test for ServerSocket
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668982 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:13:27 +00:00
Kevin Clark
fa4a958589 Add two missing tests for FramedTransport
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668981 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:13:18 +00:00
Kevin Clark
dfe22b3e2a Stop using Array#pack and test using the raw bytes instead
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668980 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:13:09 +00:00
Kevin Clark
090b69ee63 Add useless struct test for code coverage
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668979 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:12:58 +00:00
Kevin Clark
c13c33bfad Test BinaryProtocol#read_message_header with bad data
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668978 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:12:48 +00:00
Kevin Clark
7b0bc554fa Tweak the code to turn on Deprecation to make rcov happy
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668977 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:12:37 +00:00
Kevin Clark
3f48333ad8 Oops, call #skip instead of #read_type when testing skip
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668976 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:12:26 +00:00
Kevin Clark
eb0dd7fbe4 Add rcov_spec task
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668975 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:12:15 +00:00
Kevin Clark
3c87129dc0 Spec out Socket and ServerSocket
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668974 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:12:05 +00:00
Kevin Clark
da5d34602a Fix exception handling inside Socket#read
Also remove the useless shebang


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668973 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:11:52 +00:00
Kevin Clark
d389f54f0a Strip the rest of the empty () parens
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668972 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:11:41 +00:00
Kevin Clark
150af8b7c6 Stop using deprecated name TSocket and fix TCPserver->TCPServer
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668971 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:11:29 +00:00
Kevin Clark
dd330253ae Spec out HTTPClient
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668970 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:11:18 +00:00
Kevin Clark
f6aa86a506 Spec out MemoryBuffer and IOStreamTransport
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668969 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:11:07 +00:00
Kevin Clark
02ef842aa2 Strip more empty parens
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668967 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:10:55 +00:00
Kevin Clark
54d0d91c7e Rip out MemoryBuffer#get_buffer
Nobody should be using that method and it's preventing MemoryBuffer from being optimized wrt. memory usage


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668966 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:10:43 +00:00
Kevin Clark
4c56c2c43f open? should return true, not 1
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668965 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:10:30 +00:00
Kevin Clark
531e020503 Spec out TransportException, Transport, ServerTransport, BufferedTransport, and FramedTransport
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668964 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:10:17 +00:00
Kevin Clark
080dd878be Spec out SimpleMongrelHTTPServer
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668963 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:10:05 +00:00
Kevin Clark
1ca1950f9b Stop using deprecated classes in SimpleMongrelHTTPServer
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668962 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:09:53 +00:00
Kevin Clark
03d7a47946 Add specs for Struct.
Include the generated code so the thrift compiler is not required to run the specs.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668961 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:09:41 +00:00
Kevin Clark
41c0a0266b Improve compatibility with the old Hash-style set.
Fix the integration test for the Set change


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668960 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:09:28 +00:00