common/thrift.git
16 years agoRe-define the semantics of deprecate! and add deprecate_class! Include full specs...
Kevin Clark [Wed, 18 Jun 2008 00:54:53 +0000 (00:54 +0000)] 
Re-define the semantics of deprecate! and add deprecate_class! Include full specs for deprecate!/deprecate_class!

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668906 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: TBinaryProtocol => Thrift::BinaryProtocol
Kevin Clark [Wed, 18 Jun 2008 00:54:33 +0000 (00:54 +0000)] 
rb: TBinaryProtocol => Thrift::BinaryProtocol

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668905 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Add more classes/modules to the Thrift namespace. Provide backwards compatable...
Kevin Clark [Wed, 18 Jun 2008 00:54:13 +0000 (00:54 +0000)] 
rb: Add more classes/modules to the Thrift namespace. Provide backwards compatable mappings.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668904 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Move client, processor, struct files for consistant naming.
Kevin Clark [Wed, 18 Jun 2008 00:53:48 +0000 (00:53 +0000)] 
rb: Move client, processor, struct files for consistant naming.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668903 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Move exceptions, types, processor, client, struct under Thrift module. Add consta...
Kevin Clark [Wed, 18 Jun 2008 00:53:28 +0000 (00:53 +0000)] 
rb: Move exceptions, types, processor, client, struct under Thrift module. Add constants for backwards compatability

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668902 13f79535-47bb-0310-9956-ffa450edef68

16 years agoSplit out thrift/thrift.rb, add top level thrift.rb in prep for gemmification
Kevin Clark [Wed, 18 Jun 2008 00:53:07 +0000 (00:53 +0000)] 
Split out thrift/thrift.rb, add top level thrift.rb in prep for gemmification

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668901 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Remove extra return statement
Kevin Clark [Wed, 18 Jun 2008 00:52:46 +0000 (00:52 +0000)] 
rb: Remove extra return statement

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668900 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Add deprecate! method Rename TTransport#readAll/isOpen, and deprecate
Kevin Clark [Wed, 18 Jun 2008 00:52:26 +0000 (00:52 +0000)] 
rb: Add deprecate! method Rename TTransport#readAll/isOpen, and deprecate

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668899 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Switch to dyn generator syntax for testing namespaces
Kevin Clark [Wed, 18 Jun 2008 00:52:05 +0000 (00:52 +0000)] 
rb: Switch to dyn generator syntax for testing namespaces

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668898 13f79535-47bb-0310-9956-ffa450edef68

16 years agoExercise namespacing in Ruby tests
Kevin Clark [Wed, 18 Jun 2008 00:51:45 +0000 (00:51 +0000)] 
Exercise namespacing in Ruby tests

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668897 13f79535-47bb-0310-9956-ffa450edef68

16 years agoSwap out 'tests' target for 'check' in Ruby Makefile
Kevin Clark [Wed, 18 Jun 2008 00:51:25 +0000 (00:51 +0000)] 
Swap out 'tests' target for 'check' in Ruby Makefile

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668896 13f79535-47bb-0310-9956-ffa450edef68

16 years agoStyle tweaks
Kevin Clark [Wed, 18 Jun 2008 00:51:06 +0000 (00:51 +0000)] 
Style tweaks

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668895 13f79535-47bb-0310-9956-ffa450edef68

16 years agoadd simple Ruby HTTP server and client classes
Kevin Clark [Wed, 18 Jun 2008 00:50:44 +0000 (00:50 +0000)] 
add simple Ruby HTTP server and client classes

Using Mongrel for the server.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668894 13f79535-47bb-0310-9956-ffa450edef68

16 years agoClean up Ruby TTransport defs
Kevin Clark [Wed, 18 Jun 2008 00:50:24 +0000 (00:50 +0000)] 
Clean up Ruby TTransport defs

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668893 13f79535-47bb-0310-9956-ffa450edef68

16 years agoAdd tests for Ruby TTransport. Only require .rb files in ruby tests.
Kevin Clark [Wed, 18 Jun 2008 00:50:00 +0000 (00:50 +0000)] 
Add tests for Ruby TTransport. Only require .rb files in ruby tests.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668892 13f79535-47bb-0310-9956-ffa450edef68

16 years agoadd additional entrypoint to TThreadPoolServer with easy exception handling
Kevin Clark [Wed, 18 Jun 2008 00:49:38 +0000 (00:49 +0000)] 
add additional entrypoint to TThreadPoolServer with easy exception handling

An additional method #serve_rescuable is added, which relays any exceptions
that happen in worker threads to the caller, where they can be handled
directly. 'retry' works too, allowing code like:

  begin
    server.rescuable_serve
  rescue StandardError => e
    puts "got exception: #{e.inspect}"
    ## do something
    retry
  end

The semantics of TThreadPoolServer#serve remain the same.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668891 13f79535-47bb-0310-9956-ffa450edef68

16 years agoReorganize tests
Kevin Clark [Wed, 18 Jun 2008 00:49:17 +0000 (00:49 +0000)] 
Reorganize tests

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668890 13f79535-47bb-0310-9956-ffa450edef68

16 years agoTweak Ruby Makefile to use --gen syntax
Kevin Clark [Wed, 18 Jun 2008 00:48:56 +0000 (00:48 +0000)] 
Tweak Ruby Makefile to use --gen syntax

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668889 13f79535-47bb-0310-9956-ffa450edef68

16 years agoRename ax_thrift_gen.m4, which now contains two macros.
David Reiss [Wed, 11 Jun 2008 05:31:09 +0000 (05:31 +0000)] 
Rename ax_thrift_gen.m4, which now contains two macros.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666533 13f79535-47bb-0310-9956-ffa450edef68

16 years agoJava/TThreadPoolServer: Shut down more gracefully. (THRIFT-11)
David Reiss [Wed, 11 Jun 2008 01:20:54 +0000 (01:20 +0000)] 
Java/TThreadPoolServer: Shut down more gracefully.  (THRIFT-11)

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666502 13f79535-47bb-0310-9956-ffa450edef68

16 years agoAdd a working RPM .spec file to contrib.
David Reiss [Wed, 11 Jun 2008 01:19:12 +0000 (01:19 +0000)] 
Add a working RPM .spec file to contrib.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666501 13f79535-47bb-0310-9956-ffa450edef68

16 years agoMake "make dist" work with the new Erlang stuff.
David Reiss [Wed, 11 Jun 2008 01:19:07 +0000 (01:19 +0000)] 
Make "make dist" work with the new Erlang stuff.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666500 13f79535-47bb-0310-9956-ffa450edef68

16 years agoMove some top-level files into more sensible directories.
David Reiss [Wed, 11 Jun 2008 01:19:02 +0000 (01:19 +0000)] 
Move some top-level files into more sensible directories.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666499 13f79535-47bb-0310-9956-ffa450edef68

16 years agoInclude <cstring> and use "std::" for memset in T[Server]Socket.cpp.
David Reiss [Wed, 11 Jun 2008 01:18:54 +0000 (01:18 +0000)] 
Include <cstring> and use "std::" for memset in T[Server]Socket.cpp.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666498 13f79535-47bb-0310-9956-ffa450edef68

16 years agoInclude <cstring> and use "std::" for memcpy in TBufferTransports.h.
David Reiss [Wed, 11 Jun 2008 01:18:44 +0000 (01:18 +0000)] 
Include <cstring> and use "std::" for memcpy in TBufferTransports.h.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666497 13f79535-47bb-0310-9956-ffa450edef68

16 years agoInclude <limits> in TBinaryProtocol.cpp for numeric_limits.
David Reiss [Wed, 11 Jun 2008 01:18:36 +0000 (01:18 +0000)] 
Include <limits> in TBinaryProtocol.cpp for numeric_limits.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666496 13f79535-47bb-0310-9956-ffa450edef68

16 years agoDeclare special mutex initializers unconditionally.
David Reiss [Wed, 11 Jun 2008 01:18:28 +0000 (01:18 +0000)] 
Declare special mutex initializers unconditionally.

We don't want to include pthread.h in Mutex.h, so we can't detect whether
the non-portable mutex initializers are defined.  Instead, we just declare
them unconditionally and only define them if they are available.
Unfortunately, this means that users will get a link error instead of a
compile error if they try to use them when they are not available.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666495 13f79535-47bb-0310-9956-ffa450edef68

16 years agoFix some includes in Thrift.{h,cpp}.
David Reiss [Wed, 11 Jun 2008 01:18:20 +0000 (01:18 +0000)] 
Fix some includes in Thrift.{h,cpp}.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666494 13f79535-47bb-0310-9956-ffa450edef68

16 years agoRegenerate reflection_limited to pick up some compiler improvements.
David Reiss [Wed, 11 Jun 2008 01:18:11 +0000 (01:18 +0000)] 
Regenerate reflection_limited to pick up some compiler improvements.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666493 13f79535-47bb-0310-9956-ffa450edef68

16 years agoEliminate some trailing whitespace from the generated Python code.
David Reiss [Wed, 11 Jun 2008 01:18:03 +0000 (01:18 +0000)] 
Eliminate some trailing whitespace from the generated Python code.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666492 13f79535-47bb-0310-9956-ffa450edef68

16 years agoInclude limits.h in the compiler for PATH_MAX
David Reiss [Wed, 11 Jun 2008 01:17:00 +0000 (01:17 +0000)] 
Include limits.h in the compiler for PATH_MAX

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666491 13f79535-47bb-0310-9956-ffa450edef68

16 years agoRename AM_CONDITIONALs from ENABLE_* to WITH_*.
David Reiss [Wed, 11 Jun 2008 01:16:53 +0000 (01:16 +0000)] 
Rename AM_CONDITIONALs from ENABLE_* to WITH_*.

This is to match the configure command-line options that define them.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666490 13f79535-47bb-0310-9956-ffa450edef68

16 years agoAllow out-of-source builds.
David Reiss [Wed, 11 Jun 2008 01:16:45 +0000 (01:16 +0000)] 
Allow out-of-source builds.

- Clean up lib/cpp/Makefile.am to use AM_CXXFLAGS etc instead of
  target-specific so we can take advantage of default flags.
- Use top_builddir in a few places instead of top_srcdir.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666489 13f79535-47bb-0310-9956-ffa450edef68

16 years agoAllow Thrift to be built without the Python library.
David Reiss [Wed, 11 Jun 2008 01:16:37 +0000 (01:16 +0000)] 
Allow Thrift to be built without the Python library.

- Modify configure.ac to check for Python conditionally, like we do for
  Java, Mono, and Erlang.
- Modify Makefile.am to add "py" to SUBDIRS only if Python was detected.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666488 13f79535-47bb-0310-9956-ffa450edef68

16 years agoClean up some bad/missed merges from the alterl merge.
David Reiss [Wed, 11 Jun 2008 01:16:29 +0000 (01:16 +0000)] 
Clean up some bad/missed merges from the alterl merge.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666486 13f79535-47bb-0310-9956-ffa450edef68

16 years ago[erl] Finish fixing test_server to work with binary strings
David Reiss [Wed, 11 Jun 2008 01:16:15 +0000 (01:16 +0000)] 
[erl] Finish fixing test_server to work with binary strings

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666485 13f79535-47bb-0310-9956-ffa450edef68

16 years ago[erl] fix test_server to expect binary type for strings rather than lists
David Reiss [Wed, 11 Jun 2008 01:16:09 +0000 (01:16 +0000)] 
[erl] fix test_server to expect binary type for strings rather than lists

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666484 13f79535-47bb-0310-9956-ffa450edef68

16 years agoFix thrift_server to work with newest thrift_processor
David Reiss [Wed, 11 Jun 2008 01:16:01 +0000 (01:16 +0000)] 
Fix thrift_server to work with newest thrift_processor

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666483 13f79535-47bb-0310-9956-ffa450edef68

16 years ago[erl] fix generator to use unexpanded structs for reply_types on functions
David Reiss [Wed, 11 Jun 2008 01:15:54 +0000 (01:15 +0000)] 
[erl] fix generator to use unexpanded structs for reply_types on functions

This fixes a bug where thrift_client would return a tuple rather than a tagged record when the called function returned a struct.

Test plan:
  in tutorial client:
    Log: {sharedStruct,1,<<"RARG">>}
  instead of:
    Log: {1,<<"RARG">>}

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666482 13f79535-47bb-0310-9956-ffa450edef68

16 years agoRename "alterl" to "erl".
David Reiss [Wed, 11 Jun 2008 01:15:45 +0000 (01:15 +0000)] 
Rename "alterl" to "erl".

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666481 13f79535-47bb-0310-9956-ffa450edef68

16 years agoRemove all of the old Erlang stuff in preparation for renaming alterl.
David Reiss [Wed, 11 Jun 2008 01:14:38 +0000 (01:14 +0000)] 
Remove all of the old Erlang stuff in preparation for renaming alterl.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666480 13f79535-47bb-0310-9956-ffa450edef68

16 years agoAdd thrift_http_transport for alterl.
David Reiss [Wed, 11 Jun 2008 01:14:07 +0000 (01:14 +0000)] 
Add thrift_http_transport for alterl.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666478 13f79535-47bb-0310-9956-ffa450edef68

16 years agoAnother whitespace rampage
David Reiss [Wed, 11 Jun 2008 01:14:01 +0000 (01:14 +0000)] 
Another whitespace rampage

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666477 13f79535-47bb-0310-9956-ffa450edef68

16 years agoAdd lib/alterl/ebin to gitignore (it was lost in the rebase).
David Reiss [Wed, 11 Jun 2008 01:13:37 +0000 (01:13 +0000)] 
Add lib/alterl/ebin to gitignore (it was lost in the rebase).

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666476 13f79535-47bb-0310-9956-ffa450edef68

16 years agoadd thrift_client:cast
David Reiss [Wed, 11 Jun 2008 01:13:33 +0000 (01:13 +0000)] 
add thrift_client:cast

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666475 13f79535-47bb-0310-9956-ffa450edef68

16 years agoadding +native flag to makefile for compilation fun
David Reiss [Wed, 11 Jun 2008 01:13:26 +0000 (01:13 +0000)] 
adding +native flag to makefile for compilation fun

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666474 13f79535-47bb-0310-9956-ffa450edef68

16 years agoConstruct tagged tuples directly in thrift_protocol rather than making untagged ones...
David Reiss [Wed, 11 Jun 2008 01:13:19 +0000 (01:13 +0000)] 
Construct tagged tuples directly in thrift_protocol rather than making untagged ones and prepending the tag

Test Plan: if it didn't work, everything would break spectacularly

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666473 13f79535-47bb-0310-9956-ffa450edef68

16 years agoOptimize thrift_protocol a bit - eliminate use of a dict. gadget on a dump file runs...
David Reiss [Wed, 11 Jun 2008 01:13:12 +0000 (01:13 +0000)] 
Optimize thrift_protocol a bit - eliminate use of a dict. gadget on a dump file runs about 15% faster

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666472 13f79535-47bb-0310-9956-ffa450edef68

16 years agoAdd thrift_file_transport, useful for reading from files dumped by thrift_disk_log_tr...
David Reiss [Wed, 11 Jun 2008 01:13:05 +0000 (01:13 +0000)] 
Add thrift_file_transport, useful for reading from files dumped by thrift_disk_log_transport for example

Test plan: using this in a local tool in reader mode, and works fine. Haven't tested write mode, sorry

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666471 13f79535-47bb-0310-9956-ffa450edef68

16 years agoMake fake install target for alterl
David Reiss [Wed, 11 Jun 2008 01:12:58 +0000 (01:12 +0000)] 
Make fake install target for alterl

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666470 13f79535-47bb-0310-9956-ffa450edef68

16 years agoAdd back thrift_server.erl which we still use
David Reiss [Wed, 11 Jun 2008 01:12:52 +0000 (01:12 +0000)] 
Add back thrift_server.erl which we still use

Sorry facebook guys :P We'll switch to thrift_socket_server eventually

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666469 13f79535-47bb-0310-9956-ffa450edef68

16 years agoFix thrift_binary_protocol to be hipe-compatible
David Reiss [Wed, 11 Jun 2008 01:12:45 +0000 (01:12 +0000)] 
Fix thrift_binary_protocol to be hipe-compatible

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666468 13f79535-47bb-0310-9956-ffa450edef68

16 years agoChange thrift_disk_log_transport to not flush when flush/1 is called if sync_every...
David Reiss [Wed, 11 Jun 2008 01:12:38 +0000 (01:12 +0000)] 
Change thrift_disk_log_transport to not flush when flush/1 is called if sync_every is defined

Summary:
  For fast logging we don't want to actually flush to disk after every message.
  There's force_flush/1 now if you actually want to force one

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666467 13f79535-47bb-0310-9956-ffa450edef68

16 years agoAdd thrift_base64_transport which writes base64 encoded data
David Reiss [Wed, 11 Jun 2008 01:12:31 +0000 (01:12 +0000)] 
Add thrift_base64_transport which writes base64 encoded data

Summary:
  This is to make it easy to run Hadoop mapreduces using Hadoop Streaming on thrift-serialized structs
  without implementing any special file splitter or anything

Test plan: test_disklog:t_base64()

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666466 13f79535-47bb-0310-9956-ffa450edef68

16 years agoAdd thrift_client:send_call which sends a function call but doesn't read a response.
David Reiss [Wed, 11 Jun 2008 01:12:20 +0000 (01:12 +0000)] 
Add thrift_client:send_call which sends a function call but doesn't read a response.

Summary:
  This is for logging applications with thrift_disk_log_transport, so the function calls
  logged don't necessarily have to be async void

Test plan:
  Added to test_disklog.erl

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666465 13f79535-47bb-0310-9956-ffa450edef68

16 years agoAdd thrift_disk_log_transport which writes to the disk_log module
David Reiss [Wed, 11 Jun 2008 01:12:09 +0000 (01:12 +0000)] 
Add thrift_disk_log_transport which writes to the disk_log module

Summary:
  See test/erl/src/test_disklog.erl for example usage

Test plan: test_disklog:t(), then hexdump -C /tmp/test_log.1

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666464 13f79535-47bb-0310-9956-ffa450edef68

16 years agoFactory-ize generation of thrift_binary_protocol to clean things up a bit and decoupl...
David Reiss [Wed, 11 Jun 2008 01:11:57 +0000 (01:11 +0000)] 
Factory-ize generation of thrift_binary_protocol to clean things up a bit and decouple thrift_socket_transport's factory from binary protocol

Test plan: tutorial still runs. Someone who actually uses the Options to thrift_client should test this.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666463 13f79535-47bb-0310-9956-ffa450edef68

16 years agoParse options to thrift_socket_transport:new_protocol_factory/3 "manually" - O(n...
David Reiss [Wed, 11 Jun 2008 01:03:44 +0000 (01:03 +0000)] 
Parse options to thrift_socket_transport:new_protocol_factory/3 "manually" - O(n) instead of O(n^2)

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666462 13f79535-47bb-0310-9956-ffa450edef68

16 years agoRename "Connector" to "ProtocolFactory" since that's what it is (response to review...
David Reiss [Wed, 11 Jun 2008 01:03:37 +0000 (01:03 +0000)] 
Rename "Connector" to "ProtocolFactory" since that's what it is (response to review by eletuchy)

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666461 13f79535-47bb-0310-9956-ffa450edef68

16 years agoModify thrift_client to take in a "connector" function as a parameter, enabling subst...
David Reiss [Wed, 11 Jun 2008 01:03:29 +0000 (01:03 +0000)] 
Modify thrift_client to take in a "connector" function as a parameter, enabling substitution of different protocol/transports

Summary:
  Left in a backwards-compatible start_link with (Host, Port, Service) args

Test plan:
  tutorial/alterl still works

Notes:
  We may want to go a little further and get rid of the binary_protocol specific stuff from socket_transport as well

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666460 13f79535-47bb-0310-9956-ffa450edef68

16 years agoOops - dont' use server.config anymore for alterl tutorial
David Reiss [Wed, 11 Jun 2008 01:03:22 +0000 (01:03 +0000)] 
Oops - dont' use server.config anymore for alterl tutorial

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666459 13f79535-47bb-0310-9956-ffa450edef68

16 years agoNew tutorial for alterl bindings - include working client + server
David Reiss [Wed, 11 Jun 2008 01:03:16 +0000 (01:03 +0000)] 
New tutorial for alterl bindings - include working client + server

Test plan:

  ./client.sh
  server:start().
  client:t().

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666458 13f79535-47bb-0310-9956-ffa450edef68

16 years agoRemove another TODO - no need to set "id" field of stop markers
David Reiss [Wed, 11 Jun 2008 01:03:10 +0000 (01:03 +0000)] 
Remove another TODO - no need to set "id" field of stop markers

Test plan: tested on our price service

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666457 13f79535-47bb-0310-9956-ffa450edef68

16 years agoRemove two TODO notes for cpiro that are no longer applicable.
David Reiss [Wed, 11 Jun 2008 01:03:03 +0000 (01:03 +0000)] 
Remove two TODO notes for cpiro that are no longer applicable.

Reviewed by: cpiro

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666456 13f79535-47bb-0310-9956-ffa450edef68

16 years agotesting return of empty binary from 0-length thrrift read
David Reiss [Wed, 11 Jun 2008 01:02:55 +0000 (01:02 +0000)] 
testing return of empty binary from 0-length thrrift read

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666455 13f79535-47bb-0310-9956-ffa450edef68

16 years agoadd a case clause to bubble timeouts
David Reiss [Wed, 11 Jun 2008 01:02:47 +0000 (01:02 +0000)] 
add a case clause to bubble timeouts

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666454 13f79535-47bb-0310-9956-ffa450edef68

16 years agoadding explicit timeout handling and error_logging
David Reiss [Wed, 11 Jun 2008 01:02:39 +0000 (01:02 +0000)] 
adding explicit timeout handling and error_logging

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666453 13f79535-47bb-0310-9956-ffa450edef68

16 years agoMake invocation of 'find' in alterl Makefile more compatible
David Reiss [Wed, 11 Jun 2008 01:02:31 +0000 (01:02 +0000)] 
Make invocation of 'find' in alterl Makefile more compatible

Summary: find . -name instead of find -name

Test Plan: still works, now works on Darwin too

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666452 13f79535-47bb-0310-9956-ffa450edef68

16 years agoadding socket options to thrift client
David Reiss [Wed, 11 Jun 2008 01:02:23 +0000 (01:02 +0000)] 
adding socket options to thrift client

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666451 13f79535-47bb-0310-9956-ffa450edef68

16 years agoerlang: move thrift_client connect logic into a handle_call and call it in start_link
David Reiss [Wed, 11 Jun 2008 01:02:10 +0000 (01:02 +0000)] 
erlang: move thrift_client connect logic into a handle_call and call it in start_link

Summary: a failure in thrift_client:init would cause the invoker to exit, but we'd rather just return {error, Error} from start_link and let the invoker crash if it wants

Reviewed By: eletuchy

Test Plan: makes mouths happy

Revert Plan: ok

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666450 13f79535-47bb-0310-9956-ffa450edef68

16 years agoerlang thrift_client: wrap gen_tcp:connect in a catch ... leave nothing to chance
David Reiss [Wed, 11 Jun 2008 01:02:03 +0000 (01:02 +0000)] 
erlang thrift_client: wrap gen_tcp:connect in a catch ... leave nothing to chance

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666449 13f79535-47bb-0310-9956-ffa450edef68

16 years agoerlang thrift_client will return {stop, Error} in start_link on a gen_tcp:connect...
David Reiss [Wed, 11 Jun 2008 01:01:56 +0000 (01:01 +0000)] 
erlang thrift_client will return {stop, Error} in start_link on a gen_tcp:connect error rather than exiting

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666448 13f79535-47bb-0310-9956-ffa450edef68

16 years agoErlang: add framed_transport and non-strict binary_protocol
David Reiss [Wed, 11 Jun 2008 01:01:48 +0000 (01:01 +0000)] 
Erlang: add framed_transport and non-strict binary_protocol

- thrift_client now takes as its fourth parameter Options: framed, strict_{read,write}, connect_timeout (P.S. fourth param used to be Timeout)
- binary protocol now takes options: strict_{read,write}
- buffers in framed and buffered transport are now iolists and not reversed lists of binaries
- rename buffer in buffered transport "write_buffer" to match framed transport

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666447 13f79535-47bb-0310-9956-ffa450edef68

16 years agoreplacing an io format with error_logger call
David Reiss [Wed, 11 Jun 2008 01:01:36 +0000 (01:01 +0000)] 
replacing an io format with error_logger call

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666446 13f79535-47bb-0310-9956-ffa450edef68

16 years agomake read(string) return a binary rather than a list
David Reiss [Wed, 11 Jun 2008 01:01:29 +0000 (01:01 +0000)] 
make read(string) return a binary rather than a list
tested server side ... still need to test client side

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666445 13f79535-47bb-0310-9956-ffa450edef68

16 years agosmall buffered_transport and client improvements
David Reiss [Wed, 11 Jun 2008 01:01:21 +0000 (01:01 +0000)] 
small buffered_transport and client improvements

moved close of wrapped transport into terminate/2
made thrift_client:close into a cast rather than call

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666444 13f79535-47bb-0310-9956-ffa450edef68

16 years agoadd optional (connect) Timeout parameter to thrift_client:start_link
David Reiss [Wed, 11 Jun 2008 01:01:13 +0000 (01:01 +0000)] 
add optional (connect) Timeout parameter to thrift_client:start_link

Summary: will fail ungracefully if the timeout is hit, or anything bad happens.  will fix.

Reviewed By: eletuchy

Test Plan: did some stuff with it

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666443 13f79535-47bb-0310-9956-ffa450edef68

16 years agoremoving more debug_rlogs
David Reiss [Wed, 11 Jun 2008 01:01:06 +0000 (01:01 +0000)] 
removing more debug_rlogs

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666442 13f79535-47bb-0310-9956-ffa450edef68

16 years agook: good to go
David Reiss [Wed, 11 Jun 2008 01:00:59 +0000 (01:00 +0000)] 
ok: good to go

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666441 13f79535-47bb-0310-9956-ffa450edef68

16 years agodon't do an exit(normal)
David Reiss [Wed, 11 Jun 2008 01:00:52 +0000 (01:00 +0000)] 
don't do an exit(normal)

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666440 13f79535-47bb-0310-9956-ffa450edef68

16 years agoadd a close to thrift_client to close the underlying transport
David Reiss [Wed, 11 Jun 2008 01:00:45 +0000 (01:00 +0000)] 
add a close to thrift_client to close the underlying transport

Reviewed By: eletuchy

Notes: the thrift_buffered_transport exits with {normal,{gen_server,call,[Pid,close]}} right now, but it should only exit with normal.  marked todo.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666439 13f79535-47bb-0310-9956-ffa450edef68

16 years agodon't need to use gen_server:reply
David Reiss [Wed, 11 Jun 2008 01:00:37 +0000 (01:00 +0000)] 
don't need to use gen_server:reply

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666438 13f79535-47bb-0310-9956-ffa450edef68

16 years agochanging thrift_processor shutdown to compy with proc_lib standards
David Reiss [Wed, 11 Jun 2008 01:00:30 +0000 (01:00 +0000)] 
changing thrift_processor shutdown to compy with proc_lib standards

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666437 13f79535-47bb-0310-9956-ffa450edef68

16 years agoallow configurable recv_timeouts
David Reiss [Wed, 11 Jun 2008 01:00:20 +0000 (01:00 +0000)] 
allow configurable recv_timeouts

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666435 13f79535-47bb-0310-9956-ffa450edef68

16 years agoremoving two more debug messages
David Reiss [Wed, 11 Jun 2008 01:00:12 +0000 (01:00 +0000)] 
removing two more debug messages

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666434 13f79535-47bb-0310-9956-ffa450edef68

16 years agoremoved extra debugging statements
David Reiss [Wed, 11 Jun 2008 01:00:04 +0000 (01:00 +0000)] 
removed extra debugging statements

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666433 13f79535-47bb-0310-9956-ffa450edef68

16 years agooops forgot a file
David Reiss [Wed, 11 Jun 2008 00:59:55 +0000 (00:59 +0000)] 
oops forgot a file

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666432 13f79535-47bb-0310-9956-ffa450edef68

16 years agomochiweb style avoidance of gen_tcp:controlling_process
David Reiss [Wed, 11 Jun 2008 00:59:48 +0000 (00:59 +0000)] 
mochiweb style avoidance of gen_tcp:controlling_process

TODO: remove extraneous debug_rlogs

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666431 13f79535-47bb-0310-9956-ffa450edef68

16 years agoFix thrift_buffered_transport leak in erl bindings
David Reiss [Wed, 11 Jun 2008 00:59:34 +0000 (00:59 +0000)] 
Fix thrift_buffered_transport leak in erl bindings

Summary:
  - Was leaking processes when the client cleanly disconnected since the
    thrift_processor process was exiting with 'normal' Reason. Changed it
    to 'protocol_closed'

Test plan:
  - Telnet to thrift service port and close (^]close) before the read timeout
    elapses. Verify that erlang:system_info(process_count) does not increase
    after doing this multiple times.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666430 13f79535-47bb-0310-9956-ffa450edef68

16 years agoif instead of case for a guard comparison
David Reiss [Wed, 11 Jun 2008 00:59:27 +0000 (00:59 +0000)] 
if instead of case for a guard comparison

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666429 13f79535-47bb-0310-9956-ffa450edef68

16 years agofixing behavior declaration for thrift_transport
David Reiss [Wed, 11 Jun 2008 00:59:19 +0000 (00:59 +0000)] 
fixing behavior declaration for thrift_transport

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666428 13f79535-47bb-0310-9956-ffa450edef68

16 years agomicro optimization in thrift_processor
David Reiss [Wed, 11 Jun 2008 00:59:12 +0000 (00:59 +0000)] 
micro optimization in thrift_processor

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666427 13f79535-47bb-0310-9956-ffa450edef68

16 years agouse type-appropriate methods for size and map for dict and set structures
David Reiss [Wed, 11 Jun 2008 00:59:03 +0000 (00:59 +0000)] 
use type-appropriate methods for size and map for dict and set structures

Reviewed By: cpiro

Test Plan: TODO

Revert Plan: sure

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666426 13f79535-47bb-0310-9956-ffa450edef68

16 years agoadding make dialyzer for fun and profit
David Reiss [Wed, 11 Jun 2008 00:58:55 +0000 (00:58 +0000)] 
adding make dialyzer for fun and profit

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666425 13f79535-47bb-0310-9956-ffa450edef68

16 years agoallow writing binaries in thrift_binary_protocol
David Reiss [Wed, 11 Jun 2008 00:58:48 +0000 (00:58 +0000)] 
allow writing binaries in thrift_binary_protocol

Summary: they come packed in {string, Bin} so pull them out

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666424 13f79535-47bb-0310-9956-ffa450edef68

16 years agoFix warning in generated source for alterl bindings
David Reiss [Wed, 11 Jun 2008 00:58:41 +0000 (00:58 +0000)] 
Fix warning in generated source for alterl bindings

Summary:
  - Was previously including both the fall-through to the base service as well as the "dummy" fallthrough function clause. This generated a warning like:

  gen-erl/redacted_thrift.erl:134: Warning: this clause cannot match because a previous clause at line 132 always matches

  Now we only include the "dummy" function if there is no base class to fall through to.

Test plan: Generated tutorial.thrift and shared.thrift, compiled without warnings

Notes: It's probably possible to have a circular inheritance graph, which would cause an infinite loop at runtime. Do we care about this?

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666423 13f79535-47bb-0310-9956-ffa450edef68

16 years agoImplement inheritance in the alterl generator
David Reiss [Wed, 11 Jun 2008 00:58:33 +0000 (00:58 +0000)] 
Implement inheritance in the alterl generator

Summary:
  - Simply forwards function_info calls through to the base service

Test plan: cpiro will test it?

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666422 13f79535-47bb-0310-9956-ffa450edef68

16 years agoImplement TApplicationException handling in alt_erl client
David Reiss [Wed, 11 Jun 2008 00:58:25 +0000 (00:58 +0000)] 
Implement TApplicationException handling in alt_erl client

Summary:
  Throws a 'TApplicationException' record

Test plan:
  Changed cpp TestServer so that if testException is called with "ApplicationException" as an argument, it throws a TException which is serialized back as an EXCEPTION type message

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666421 13f79535-47bb-0310-9956-ffa450edef68

16 years agoAdd a README to alterl which shows how to use thrift_client
David Reiss [Wed, 11 Jun 2008 00:58:13 +0000 (00:58 +0000)] 
Add a README to alterl which shows how to use thrift_client

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666420 13f79535-47bb-0310-9956-ffa450edef68

16 years agoRemove extra debugging from thrift_client.erl
David Reiss [Wed, 11 Jun 2008 00:58:07 +0000 (00:58 +0000)] 
Remove extra debugging from thrift_client.erl

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666419 13f79535-47bb-0310-9956-ffa450edef68