Commit Graph

315 Commits

Author SHA1 Message Date
Mark Slee
54b7ab9b53 READMEs and DOCs and ant tasks, oh my
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665048 13f79535-47bb-0310-9956-ffa450edef68
2007-03-06 00:06:27 +00:00
Mark Slee
5ea15f9e32 Get rid of all the using namespace and using boost:: declarations in Thrift header files
Summary: To remove upstream dependencies. Still keeping some specific using directives around.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665047 13f79535-47bb-0310-9956-ffa450edef68
2007-03-05 22:55:59 +00:00
Mark Slee
5d06feab21 Thrift build cleanup stuff
Summary: Get rid of autoconf stuff for lib/php, it doesn't do anything


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665046 13f79535-47bb-0310-9956-ffa450edef68
2007-03-05 22:18:18 +00:00
Mark Slee
3303f36081 Thrift CPP threading fixes
Reviewed By: karl


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665045 13f79535-47bb-0310-9956-ffa450edef68
2007-03-05 20:09:37 +00:00
Mark Slee
4e441e296c Do not check error code if select returns 0
Summary: They don't seem to be guaranteed on our system, 0 just means timeout

Reviewed By: karl


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665040 13f79535-47bb-0310-9956-ffa450edef68
2007-03-02 21:23:30 +00:00
Mark Slee
a5a783f953 Server robustness fixes in Thrift C++ libs
Summary: ServerSockets can be interrupt() ed

Reviewed By: marc, karl


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665039 13f79535-47bb-0310-9956-ffa450edef68
2007-03-02 19:41:08 +00:00
Mark Slee
6e3f637bab Proper shutdown functionality for Thrift servers
Reviewed By: karl


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665038 13f79535-47bb-0310-9956-ffa450edef68
2007-03-01 22:05:46 +00:00
Mark Slee
7c10eaf35c Add join to the ThreadManager
Summary: Now you can join against all the threads in a ThreadManager

Reviewed By: marc, xp-style

Test Plan: Use with new ThriftServer shutdown mechanisms


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665037 13f79535-47bb-0310-9956-ffa450edef68
2007-03-01 02:45:10 +00:00
Mark Slee
9f0c65153c Thrift license applied to all the C++ files
Reviewed By: bash

Notes: marc says $*, corson says "$@"


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665030 13f79535-47bb-0310-9956-ffa450edef68
2007-02-28 23:58:26 +00:00
Mark Slee
57cc25e2a3 Some Thrift documentation cleanups
Summary: Getting ready to hand this over to powerset, just want to have the right licenses in place and such first.

Reviewed By: thrift


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665029 13f79535-47bb-0310-9956-ffa450edef68
2007-02-28 21:43:54 +00:00
Mark Slee
2a22a88c57 Thrift HTTP client optimizations
Summary: When reading chunked encoding don't always get all the parts right away, return one part at a time so that reading code can deserialize the data on the fly.

Reviewed By: http


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665025 13f79535-47bb-0310-9956-ffa450edef68
2007-02-27 19:53:38 +00:00
Mark Slee
4401814d3a Various bug fixes with the THttpClient
Summary: All kinds of buffer madness, what a pain.

Reviewed By: http


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665024 13f79535-47bb-0310-9956-ffa450edef68
2007-02-27 19:03:01 +00:00
Mark Slee
a2c760b792 Whoops there were 2 extra spaces in this code
Summary: That bothers me.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665023 13f79535-47bb-0310-9956-ffa450edef68
2007-02-27 05:18:07 +00:00
Mark Slee
8a98e1bc0f Thrift HTTP client in C++
Reviewed By: aditya, dweatherford

Test Plan: SMC client


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665022 13f79535-47bb-0310-9956-ffa450edef68
2007-02-27 05:16:23 +00:00
Aditya Agarwal
49aea10d7a -- fix overflow error in seekToChunk()
Summary:
- I love finding overflow errors.

Reviewed By: jwang

Test Plan: tested by rolling back search logfile

Notes:
- This should not affect anything currently in production.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665020 13f79535-47bb-0310-9956-ffa450edef68
2007-02-27 00:07:45 +00:00
Mark Slee
44e5f0157f Remove nonexistent TBuf ref
Reviewed By: goozebury


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665017 13f79535-47bb-0310-9956-ffa450edef68
2007-02-21 05:42:38 +00:00
Mark Slee
a9848d7618 New thrift c++ error code
Summary: ALREADY_OPEN

Reviewed By: aditya


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665010 13f79535-47bb-0310-9956-ffa450edef68
2007-02-21 04:54:05 +00:00
Mark Slee
f3d3363c8e Application exception types for Thrift
Reviewed By: aditya


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665006 13f79535-47bb-0310-9956-ffa450edef68
2007-02-21 01:39:23 +00:00
Mark Slee
f9831084bc Thrift Binary protocol improvements and application exceptions
Summary: Add application exceptions for unknown methods etc, and also let binary protocol support size limits on containers and strings

Reviewed By: aditya, xp-wayne


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665003 13f79535-47bb-0310-9956-ffa450edef68
2007-02-20 20:59:21 +00:00
Mark Slee
3cd75f543c Include debug symbols in thrift builds by default
Summary: Too irritating not having stack traces when these go down. Sack up and include stack traces always... bigger binary but whatever.

Reviewed By: aditya


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665002 13f79535-47bb-0310-9956-ffa450edef68
2007-02-20 20:57:36 +00:00
James Wang
a0c92417a0 Thrift: Changing TFileTransport to use the same buffer-swap mechanism that pillar does
Reviewed by: aditya

Tested with thrift test class

Notes: TFileTransport used to use a circular buffer.  Changed this to use two large buffers, one for reading and one for writing, that are swapped whenever the writer thread finishes with the last write.

Also changed a few default constants -- force_flush timeout is now 3 sec, default buffer size is 10000 entries


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664997 13f79535-47bb-0310-9956-ffa450edef68
2007-02-14 23:22:08 +00:00
Mark Slee
907e3d6345 Fix handling of accept() exceptions in threadedserver
Reviewed By: threadz-aditya-tbr

Notes: Propagating fix from TThreadPoolServer


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664994 13f79535-47bb-0310-9956-ffa450edef68
2007-02-08 22:29:24 +00:00
Aditya Agarwal
fdef47ea2b -- Servers should not crash on accept.
Summary:
- Continue running if there is an accept issue

Reviewed By: slee


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664988 13f79535-47bb-0310-9956-ffa450edef68
2007-02-07 03:54:18 +00:00
Aditya Agarwal
af602f5e9f -- Remove reference to TBufferedRouter.h/cpp in Makefile
Reviewed By: slee


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664986 13f79535-47bb-0310-9956-ffa450edef68
2007-02-07 02:38:54 +00:00
Mark Slee
43b6c6378e Protocol should hang onto shared pointer for protection but always use underlying raw pointer
Reviewed By: aditya


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664982 13f79535-47bb-0310-9956-ffa450edef68
2007-02-07 00:54:17 +00:00
Aditya Agarwal
e12d48596d -- TBufferedRouterTransport being renamed to TPipedTransport
Summary:
- TBufferedRouterTransport is the most nonsensical name I have ever
  heard of

Reviewed By: slee

Test Plan: it compiles


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664979 13f79535-47bb-0310-9956-ffa450edef68
2007-02-06 03:25:13 +00:00
Martin Kraemer
ee341cb57b Thrift: Supported for file descriptor == 0 and cleanup error output
Summary:
Thrift improperly initialized file descriptors to zero and treated 0 and an invalid value.  0 is a valid file descriptor.  Also, commented out error message on client disconnect for TThreadPoolServer

Reviewed By: Marc & Karl

Revert Plan: revertible

Notes:


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664972 13f79535-47bb-0310-9956-ffa450edef68
2007-02-05 21:40:38 +00:00
Martin Kraemer
92a2eac8cb Thrift: Exception message is protected and accessible to derived classes.
Summary:
Exception message is protected and accessible to derived classes.

Reviewed By: Karl

Revert Plan: revertible

Notes:


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664971 13f79535-47bb-0310-9956-ffa450edef68
2007-02-05 20:58:41 +00:00
Martin Kraemer
10640d8935 Thrift fixes for Exceptions and TServerSocket
Summary:
TServerSocket detected file des. 0 as an invalid file des.  This has been fixed.

Reviewed By: Steve

Revert Plan: Revertible

Notes:


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664969 13f79535-47bb-0310-9956-ffa450edef68
2007-02-03 01:59:12 +00:00
Mark Slee
f23cfd810c TFileTransport %lu => %u
Summary: compiler warnings are lame

Reviewed By: aditya


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664968 13f79535-47bb-0310-9956-ffa450edef68
2007-02-02 00:09:51 +00:00
Mark Slee
8cbda85be5 Prevent direct instantation of ThreadManager
Reviewed By: marc


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664967 13f79535-47bb-0310-9956-ffa450edef68
2007-02-01 23:05:38 +00:00
Mark Slee
b3cb62959e Adding threaded server to Thrift
Summary: Spawns a new thread for each client connection

Reviewed By: marc


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664965 13f79535-47bb-0310-9956-ffa450edef68
2007-02-01 22:55:00 +00:00
Mark Slee
7a20a14a06 Fix bufferedroutertransport overflow bugs
Reviewed By: aditya


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664964 13f79535-47bb-0310-9956-ffa450edef68
2007-02-01 21:39:50 +00:00
Mark Slee
cb126a0c19 Fix for TBufferedTransport double-buffer-size strings
Reviewed By: aditya


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664961 13f79535-47bb-0310-9956-ffa450edef68
2007-01-31 08:31:29 +00:00
Mark Slee
aaa23ed4ea Move var declarations out of switch blocks in Thrift
Summary: Strict G++ compliance

Reviewed By: fett


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664958 13f79535-47bb-0310-9956-ffa450edef68
2007-01-30 19:52:05 +00:00
Martin Kraemer
50919171b7 Thrift: indentation
Summary:
sigh mixed indentation sytyles.

Reviewed By: Slee

Test Plan: Test by building..

Revert Plan: revertible

Notes:


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664952 13f79535-47bb-0310-9956-ffa450edef68
2007-01-26 01:41:03 +00:00
Mark Slee
0788a70568 Separate thrift into libthrift and libthriftnb
Summary: libthriftnb is the one that requires libevent. It was really annoying that you always had to put -levent in your link step to build thrift programs when youa re not using any of the c++ nonblocking stuff. This way, if you're using nonblocking you can do that, but the normal case is easier to link.

Reviewed By: makefile


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664951 13f79535-47bb-0310-9956-ffa450edef68
2007-01-25 08:14:50 +00:00
Mark Slee
eb0d024ee1 Full automake/autoconf compliance for thrift
Summary: Including the compiler!!!

Reviewed By: automake


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664949 13f79535-47bb-0310-9956-ffa450edef68
2007-01-25 07:58:55 +00:00
Aditya Agarwal
2c9f2fb0bd -- ThriftLogfile is finally done.
Summary:
- Everything seems to be working well..

Reviewed By: tbr - slee

Test Plan: Tested using search


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664947 13f79535-47bb-0310-9956-ffa450edef68
2007-01-25 03:27:43 +00:00
Aditya Agarwal
68f08ee5f5 -- Error recovery code for thrift logfile
Summary:
- perform some basic corruption checks:
   1) Event larger than chunk
   2) Event larger than specified max
   3) Event crossing chunk boundary etc.
- If error encountered, then try to perform some recovery

Reviewed By: Slee

Test Plan: Going to test now...need to check in because of compile issues

Notes:
- These checks take care of the case when there is a dirty read from the filesystem (which
  we have encountered with the netapps). The recovery involves trying to perform the read
  again from ths FS and if that fails skipping the chunk altogether.
  Keep in mind that this might only be useful for idempotent systems (e.g. search redolog).


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664943 13f79535-47bb-0310-9956-ffa450edef68
2007-01-24 23:39:10 +00:00
Mark Slee
c425780847 Thrift socket should not perror in the TRYAGAIN state
Reviewed By: wayne


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664942 13f79535-47bb-0310-9956-ffa450edef68
2007-01-24 23:14:30 +00:00
Aditya Agarwal
9abb0d69b7 -- Change concept of protocol and transport factory
Summary:
- Transport factories now wrap around one transport
- Protocol factories now wrap around one transport (as opposed to a pair of input/output
   transports)
- TServer now takes input/output transport and protocol factories

The motivation for this change is that you could concievably want to use a different protocol or
transport for input and output. An example is that incoming data is encoded using binary protocol
but outgoing data is encrypted XML (with encryption being done on the transport level).

This change should be mostly backwards compatible because the TServer classes have constructors
that take a transport factory and use that for both the input and transport factories. The only
change might be for anyone who is using the C++ client code directly i.e. instantiating
TBinaryProtocol() directly because the constructor now only accepts one transport.

Reviewed By: Slee

Test Plan: Everything compiles (for both thrift and search).

Notes:
I am going to make the same changes in all the supported languages after this...


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664940 13f79535-47bb-0310-9956-ffa450edef68
2007-01-24 22:53:54 +00:00
Mark Slee
f9373397c3 Nonblockingserver constructor that uses binary protocol factory by default
Reviewed By: tbr-aditya


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664937 13f79535-47bb-0310-9956-ffa450edef68
2007-01-24 19:41:57 +00:00
Aditya Agarwal
502ea8a3c8 -- thrift logfile fixes
Summary:
-- numChunks was broken and that was causing a lot of strange downstream behaviour

Reviewed By: tbr slee


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664936 13f79535-47bb-0310-9956-ffa450edef68
2007-01-24 02:24:35 +00:00
Aditya Agarwal
1ea90526b0 -- Nonblocking server changes to allow logging
Summary:
-- the constructor needs to accept a transport factory
-- TConnection close() needs to close factor generated transports

Reviewed By: Mark Slee

Test Plan: Tested with search redologger


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664930 13f79535-47bb-0310-9956-ffa450edef68
2007-01-19 02:02:12 +00:00
Aditya Agarwal
794568bafe -- additions to ThriftLogfile
Summary:
-- fixed peek() in TBufferedRouterTransport.cpp
-- Added processChunk() to ThriftLogfile

Reviewed By: Slee


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664924 13f79535-47bb-0310-9956-ffa450edef68
2007-01-18 06:20:24 +00:00
Marc Slemko
85ca7a13e8 Added ax_event_base.m4 to find and configure libevent
Modified configure.ac to pull in AX_EVENT_BASE
Modified Makefile.am to take EVENT settings from automake.

Reviewed by dcorson


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664919 13f79535-47bb-0310-9956-ffa450edef68
2007-01-17 08:32:16 +00:00
Marc Slemko
75c2f702c9 Make boost base default to yes to make sure we don't get through configure without boost
Fixed configure.ac to add a few missing functions and headers

Reviewed by dcorson


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664918 13f79535-47bb-0310-9956-ffa450edef68
2007-01-17 07:59:38 +00:00
Aditya Agarwal
ebc99e0e16 -- Allow manual setting of host and port in TSocket
Summary:
-- required for TSocketPool equivalent functionality

Reviewed By: slee

Notes:
-- Todo is to replicate TSocketPool.php in C++


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664912 13f79535-47bb-0310-9956-ffa450edef68
2007-01-15 23:14:58 +00:00
robert
79511192f1 fixed a problem with read buffer resizing in TNonblockingServer
reviewed: mcslee
revert: yes
test: send a large message to a nonblocking server


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664900 13f79535-47bb-0310-9956-ffa450edef68
2006-12-20 19:25:38 +00:00
robert
3fa9d24bc3 fixed a bug in TFramedTransport where it was checking a size for nonzero after byte swapping it.
reviewed: mcslee
revert: yes
test: run a C++ client and server with framed transport


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664899 13f79535-47bb-0310-9956-ffa450edef68
2006-12-19 22:27:54 +00:00
Mark Slee
2abc9dfd59 message_ in TException can't be const or subclasses break
Reviewed By: yishan


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664898 13f79535-47bb-0310-9956-ffa450edef68
2006-12-16 01:06:49 +00:00
Martin Kraemer
8196a61745 Thrift TException Cleanup
Summary:
Destructors should be virtual or declared protected.

Reviewed By: mcslee

Revert Plan: revertible


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664892 13f79535-47bb-0310-9956-ffa450edef68
2006-12-09 01:57:58 +00:00
Aditya Agarwal
25b293616b -- Rename TBufferedFileWriter.h/cpp to TFileTransport.h/cpp
Summary:
-- Thrift logfile is now officially in action!

Reviewed By: Mark Slee


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664891 13f79535-47bb-0310-9956-ffa450edef68
2006-12-09 00:58:15 +00:00
Aditya Agarwal
0c341a1332 -- Check all system call return values
Summary:
-- Throw TTransportException if a system call fails

Reviewed By: Mark Slee


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664890 13f79535-47bb-0310-9956-ffa450edef68
2006-12-09 00:47:03 +00:00
Aditya Agarwal
e9ef8d7ce9 -- TFileTransport (Thrift Logfile)
Summary:
-- TBufferedFileWriter.h/cpp will be renamed to TFileTransport.h/cpp in the next commit.
-- TFileTransport is essentially reading and writing thrift calls to/from a file instead of a
   socket.
-- The code/design is somewhat similar to pillar_logfile but there are some significant changes.

todo:
-- still need to do error correction/detection

Reviewed By: Mark Slee

Test Plan:
-- Wrote test in thrift/test/cpp/src/main.cpp that appends to a file and replays requests

Notes:
It's finally time to port search over to Thrift


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664889 13f79535-47bb-0310-9956-ffa450edef68
2006-12-08 23:52:57 +00:00
Martin Kraemer
97f9d60be8 Thrift TException does not properly define virtual what() method.
Summary:
Clients would elect to call the base class what() method instead of the derived version.  This results in
less than usable exceptions for debugging.

Reviewed By: Karl * mcslee

Test Plan:
Tested with local application in development.

Revert Plan:
revertible.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664887 13f79535-47bb-0310-9956-ffa450edef68
2006-12-06 19:52:16 +00:00
Mark Slee
3860c9a246 Fix TSimpleServer exception bug
Reviewed By: tbr-martin


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664886 13f79535-47bb-0310-9956-ffa450edef68
2006-12-06 00:13:42 +00:00
Mark Slee
b9ff32ae30 Thrift: C++ peek() method and TException not Exception
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664876 13f79535-47bb-0310-9956-ffa450edef68
2006-11-16 01:00:24 +00:00
Mark Slee
0f70d77333 Mutex was missing from libthrift build
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664858 13f79535-47bb-0310-9956-ffa450edef68
2006-10-28 00:51:14 +00:00
Mark Slee
63608e8017 Include <time.h> not "time.h"
Reviewed By: aditya


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664855 13f79535-47bb-0310-9956-ffa450edef68
2006-10-26 05:06:26 +00:00
Aditya Agarwal
35ae1c784c -- Change thrift logging macros to have a T_ prefix
Summary:
-- don't want to cause naming conflicts with other packages/dirs

Reviewed By: Mark Slee

Test Plan: Compiled


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664851 13f79535-47bb-0310-9956-ffa450edef68
2006-10-26 03:31:34 +00:00
Mark Slee
4af6ed71e1 Change Thrift c++ to new protocol wrapping transport model
Summary: Also cleaned up excessive .h/.cpp files into Utils files

Reviewed By: aditya


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664838 13f79535-47bb-0310-9956-ffa450edef68
2006-10-25 19:02:49 +00:00
Mark Slee
b3bd81f479 Change Thrift .cc files to be .cpp files
Summary: CPP R00lz, CC Drewlz

Reviewed By: aditya


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664837 13f79535-47bb-0310-9956-ffa450edef68
2006-10-25 01:36:44 +00:00
Mark Slee
83303e1cf7 Allow optional framing of input/output in FramedTransport
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664836 13f79535-47bb-0310-9956-ffa450edef68
2006-10-25 01:29:37 +00:00
Mark Slee
92f00fb022 Framing option for non blocking server
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664835 13f79535-47bb-0310-9956-ffa450edef68
2006-10-25 01:28:17 +00:00
Aditya Agarwal
e528c76490 -- Thrift Log File
Summary:
-- This is the thrifty version of Pillar's batch_writer
-- Cleaned up a lot of the code in batch writer and made it conform to Thrift's strict coding standards
-- Added TBufferedRouterTransport.h/cc to actually route messsages via readEnd() to the file writer. It's
   not quite as easy to route the messages in Thrift as it was in Pillar

Reviewed By: Slee

Test Plan: Tested by making sure that the file was recording data

Notes:
-- The real correctness test will be when I finish writing TLogFileTransport (pillar_logfile.cpp).


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664826 13f79535-47bb-0310-9956-ffa450edef68
2006-10-11 02:48:43 +00:00
Aditya Agarwal
be3f8d8c6d -- Adding TLogging.h
Summary:
-- This should have been part of the previous commit

Reviewed By: Slee


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664825 13f79535-47bb-0310-9956-ffa450edef68
2006-10-11 02:43:25 +00:00
Aditya Agarwal
d622e966d2 -- Thrift fixes
Summary:
-- Made read buffering work (the buffer wasn't actually being used)
-- TServer now extends TRunnable (useful for testing)
-- Adding TLogging (the DEBUG and ERROR macros that we all know and love)

Reviewed By: Slee


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664824 13f79535-47bb-0310-9956-ffa450edef68
2006-10-11 02:42:49 +00:00
Mark Slee
2f6404d9ae C++ Thrift coding style changes
Summary: Make underscore for class members consistent


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664818 13f79535-47bb-0310-9956-ffa450edef68
2006-10-10 01:37:40 +00:00
Mark Slee
2905078d16 Better socket timeout and options support for Thrift C++
Summary: Also compile without degugging symbols for the linked library

Reviewed By: aditya


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664810 13f79535-47bb-0310-9956-ffa450edef68
2006-09-29 00:12:30 +00:00
Mark Slee
794993d278 Change run() to serve() in all Thrift server interfaces
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664799 13f79535-47bb-0310-9956-ffa450edef68
2006-09-20 01:56:10 +00:00
Mark Slee
dc8a2a2fc7 Use GNU Net implementation of htnoll and ntohll
Reviewed By: shire


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664798 13f79535-47bb-0310-9956-ffa450edef68
2006-09-19 22:20:18 +00:00
Mark Slee
9e7734dada Thrift: Rename chunked to framed transports
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664796 13f79535-47bb-0310-9956-ffa450edef68
2006-09-08 03:51:34 +00:00
Mark Slee
d788b2e046 Thrift TTransportFactory model for servers
Summary: Servers need to create bufferedtransports etc. around the transports they get in a user-definable way. So use a factory pattern to allow the user to supply an object to the server that defines this behavior.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664792 13f79535-47bb-0310-9956-ffa450edef68
2006-09-07 01:26:35 +00:00
Mark Slee
c98d050d65 Thrift: Added support for double type across all languages
Summary: Just for completeness cause I'm crazy. Let's never use these!

Notes: Also made thrift grammar support # style comments, so you can do this at the top of your files

#!/usr/local/bin/thrift --cpp

/**
 * This is a thrift def file youc an invoke directly and gen code!
 */

blah


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664789 13f79535-47bb-0310-9956-ffa450edef68
2006-09-06 02:42:25 +00:00
Aditya Agarwal
085267d60c -- added stubs for readEnd() and writeEnd()
Summary:
-- these are hook points that thrift_logger/logfile will integrate with..

Reviewed By: McSlee

Test Plan: Generated thrift code

Notes:
-- Thrift logfiles are soon coming to a netapp near you!


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664787 13f79535-47bb-0310-9956-ffa450edef68
2006-09-05 22:49:53 +00:00
Mark Slee
f5f2be46a3 Thrift: standardize coding style
Summary: Standardize indentation, spacing, #defines etc.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664784 13f79535-47bb-0310-9956-ffa450edef68
2006-09-05 21:05:31 +00:00
Mark Slee
4ecbebc099 Add multiserver generation to C++ Thrift
Summary: Autogen server that can encapsulates multiple server instances

Reviewed By: aditya


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664782 13f79535-47bb-0310-9956-ffa450edef68
2006-09-05 00:14:21 +00:00
Mark Slee
78f58e2559 Thrift generation for Java
Summary: Java works, benchmark roundtrip at around 3ms, so right in between C++ and PHP


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664775 13f79535-47bb-0310-9956-ffa450edef68
2006-09-02 04:17:07 +00:00
Mark Slee
cfc0193d46 Thrift library updates, remove unsigned types
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664772 13f79535-47bb-0310-9956-ffa450edef68
2006-09-01 22:18:16 +00:00
Mark Slee
632f323f6c Move Thrift StressTest code into test top-level folder
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664770 13f79535-47bb-0310-9956-ffa450edef68
2006-08-30 17:23:52 +00:00
Marc Slemko
d97eb61120 Fixed handling of signed 64bit integers to support 32bit and 64bit architectures
Fixed a few bugs with php code generation

Initial stab at setting absolute thrift php require_once paths at configure time in order to guarantee APC caching.  Needswork.  It's hard to get automake to allow post-processing of installed files.

Lightly reviewed by mark slee



	


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664768 13f79535-47bb-0310-9956-ffa450edef68
2006-08-24 23:37:36 +00:00
Marc Slemko
b09f58838f Uber configure.ac/Makefile.am and configure.ac/Makefile.am for lib/php and compiler
Modified TProtocol.h et al to take collection size as unsigned int.  This removes need to cast STL's default size_t to signed int and is more correct, since collection sizes cannot be < 0 by definition

Moved compiler/Makefile to compiler/cpp.mk so it doesn't get trashed by automake

    


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664766 13f79535-47bb-0310-9956-ffa450edef68
2006-08-23 22:03:34 +00:00
Marc Slemko
056f9ba9a0 Print out results of stress test
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664764 13f79535-47bb-0310-9956-ffa450edef68
2006-08-17 02:59:05 +00:00
Marc Slemko
e18890f8dc straggler
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664763 13f79535-47bb-0310-9956-ffa450edef68
2006-08-17 01:23:12 +00:00
Marc Slemko
3ea0033770 Added stress test for thrift benchmarks
Modified TServer - made it a subclass of concurrency::Runnable to allow servers to be handed directly to concurreny::ThreadFactory when creating server threads.
    


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664759 13f79535-47bb-0310-9956-ffa450edef68
2006-08-17 01:11:13 +00:00
Marc Slemko
e6889de36f Fixed a few typos - test client and server samples now working with new code generation
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664753 13f79535-47bb-0310-9956-ffa450edef68
2006-08-12 00:32:53 +00:00
Marc Slemko
91f674823a Added function name to read/writeMessageBegin args
Added cpp generator for master server message processor


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664752 13f79535-47bb-0310-9956-ffa450edef68
2006-08-11 23:58:57 +00:00
Marc Slemko
5b126d6c85 Groundwork for exception support:
Auto generate result structs that combine return type and any thrown exceptions
     Add __isset struct to all user defined and auto defined struct to mark fields that are explicilty read
     Modified client and server generation code to marshal result structs

     Added base facebook::thrift::Exception class 


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664750 13f79535-47bb-0310-9956-ffa450edef68
2006-08-11 23:03:42 +00:00
Marc Slemko
0b4ffa9d4c Added read/write I16, U16 and Bool methods to TProtocol
Modified code generation to define structs and io methods for function argument lists and server process call implementations


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664749 13f79535-47bb-0310-9956-ffa450edef68
2006-08-11 02:49:29 +00:00
Marc Slemko
d42a2c2bf9 Rationalized include-directory schema
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664747 13f79535-47bb-0310-9956-ffa450edef68
2006-08-10 03:30:18 +00:00
Marc Slemko
c09a65aa4b fixed test build
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664743 13f79535-47bb-0310-9956-ffa450edef68
2006-08-09 01:20:16 +00:00
Marc Slemko
1669885931 More boosification of thrift driver, server, transport and protocol code
Modified TestServer to use thread-pool manager 


	


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664737 13f79535-47bb-0310-9956-ffa450edef68
2006-08-04 03:16:10 +00:00
Marc Slemko
35452346e6 Converted concurrency classes to use boost::shared_ptr and boost::weak_ptr:
Wrapped all thrift code in facebook::thrift:: namespace


	


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664736 13f79535-47bb-0310-9956-ffa450edef68
2006-08-03 19:01:37 +00:00
Marc Slemko
6f038a7b60 Converted concurrency classes to use boost::shared_ptr and boost::weak_ptr:
Wrapped all thrift code in facebook::thrift:: namespace


	


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664735 13f79535-47bb-0310-9956-ffa450edef68
2006-08-03 18:58:09 +00:00
Marc Slemko
03eafbeac9 Added BNF describing proposed logical wire format for Thrift message streams
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664734 13f79535-47bb-0310-9956-ffa450edef68
2006-08-02 20:01:22 +00:00
Marc Slemko
c778297bd0 autoconf/automake/libtool-ized thrift cpp bits:
Fixed to build on solaris.
    Used clock_gettime() where available
    Fixed rounding of time to ms

			       


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664733 13f79535-47bb-0310-9956-ffa450edef68
2006-07-25 02:26:35 +00:00
Marc Slemko
e03da189af autoconf/automake:
Fixed handling of bits/socket.h MSG_NODELAY
	


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664732 13f79535-47bb-0310-9956-ffa450edef68
2006-07-21 21:32:36 +00:00
Marc Slemko
9d4a3e2a78 autoconf/automake/libtool-ized thrift cpp bits:
Moved the original Makefile => Makefile.slee

			       


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664731 13f79535-47bb-0310-9956-ffa450edef68
2006-07-21 19:53:48 +00:00
Marc Slemko
9f0ba255a9 autoconf/automake line noise for linux/osx builds
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664730 13f79535-47bb-0310-9956-ffa450edef68
2006-07-21 03:53:13 +00:00
Marc Slemko
fe5ba12e4a More test code added...
more bugs found

facebook::thrift::concurrency::ThreadManager::add
	Fixed dispatch error that resulted in only one of N worker threads ever getting notified of work

facebook::thrift::concurrency::ThreadManager
	Cleaned up addWorker/removeWorker and stop logic so that adding/removing workers doesn't wake up 
	all blocked workers.

facebook::thrift::concurrency::Thread
facebook::thrift::concurrency::Runnable
	Fixed initialization logic so that runnable can return the thread that runs it


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664729 13f79535-47bb-0310-9956-ffa450edef68
2006-07-20 21:16:27 +00:00
Marc Slemko
03dedd9bd5 Fixed a few problems found on linux x86_64 version
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664728 13f79535-47bb-0310-9956-ffa450edef68
2006-07-20 00:58:47 +00:00
Marc Slemko
740343dad2 Forgot this one
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664727 13f79535-47bb-0310-9956-ffa450edef68
2006-07-20 00:31:02 +00:00
Marc Slemko
525c202df4 Forgot this one
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664726 13f79535-47bb-0310-9956-ffa450edef68
2006-07-20 00:29:35 +00:00
Marc Slemko
d466b211fd Bring up of thread manager
facebook::thrift::concurrency::test.ThreadManagerTest::test00
	Launch N tasks that block for time T, verify they all complete and that the thread manager cleans up properly
	when it goes out of scope
	


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664725 13f79535-47bb-0310-9956-ffa450edef68
2006-07-20 00:04:18 +00:00
Marc Slemko
9f27a4eb7d More bullet proofing of timer manager
facebook::thrift::concurrency::TimerManager::stop
	Added proper cleanup of unprocessed tasks and shutdown of dispatcher thread to stop

facebook::thrift::concurrency::TimerManager::~TimerManager
	Call stop if manager wasn't explicitly stopped

facebook::thrift::concurrency::test.TimerManagerTest
	Calculate error margin for timeout expiration and verify it's within bounds
	Verify manager stops properly when it goes out of scope
	


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664724 13f79535-47bb-0310-9956-ffa450edef68
2006-07-19 20:02:22 +00:00
Marc Slemko
8a40a76b27 Added thread factory test - problems in thread
Fixed stupid typo in  TimerManager::start


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664723 13f79535-47bb-0310-9956-ffa450edef68
2006-07-19 17:46:50 +00:00
Marc Slemko
0e53ccdb8b Another checkpoint of initial cut at thread pool manager for thrift and related concurrency classes.
Added TimerManager -  I can't live without one after all.

Added Util - handy place for common time operations et al.

Initial test code


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664722 13f79535-47bb-0310-9956-ffa450edef68
2006-07-17 23:51:05 +00:00
Marc Slemko
66949879ff Checkpoint of initial cut at thread pool manager for thrift and related concurrency classes.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664721 13f79535-47bb-0310-9956-ffa450edef68
2006-07-15 01:52:39 +00:00
Mark Slee
6e53644ce5 Thrift now works in PHP, hot stuff
Summary: End to end communication working in Thrift with PHP

Problem: It's a bit slower than pillar still. Need to find out why.

Reviewed By: aditya

Test Plan: Unit tests are in the test directory. Get lucas on the PHP case...




git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664720 13f79535-47bb-0310-9956-ffa450edef68
2006-06-30 18:28:50 +00:00
Mark Slee
4e0d962693 Thrift: move /lib/cpp code into /lib/cpp/src
Summary: Clean separation of src and buildfiles etc. is key

Reviewed By: aditya





git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664719 13f79535-47bb-0310-9956-ffa450edef68
2006-06-26 23:56:08 +00:00
Mark Slee
f3c322b4a3 Thrift: getting rid of U32s for map/list/set/string lengths and field ids etc.
Summary: U32s are on the out. Make way for the I32.

Reviewed By: aditya





git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664718 13f79535-47bb-0310-9956-ffa450edef68
2006-06-26 23:52:22 +00:00
Mark Slee
8d7e1f62a8 Update Thrift CPP libraries to work with new generated source, change underlying buffers to use uint8_t* instead of std::string
Summary: Major overhaul to the CPP libraries.

Reviewed By: aditya

Test Plan: Again, keep an eye out for the unit tests commit

Notes: Initial perf tests show that Thrift is not only more robust than Pillar, but its implementation is actually around 10-20% faster. We can do about 10 RPC function calls with small data payloads in under 2ms. THAT IS FAST. THAT IS THRIFTY.




git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664714 13f79535-47bb-0310-9956-ffa450edef68
2006-06-07 06:48:56 +00:00
Mark Slee
e8540637aa Rev 2 of Thrift, the Pillar successor
Summary: End-to-end communications and serialization in C++ is working

Reviewed By: aditya

Test Plan: See the new top-level test/ folder. It vaguely resembles a unit test, though it could be more automated.

Revert Plan: Revertible

Notes: Still a LOT of optimization work to be done on the generated C++ code, which should be using dynamic memory in a number of places. Next major task is writing the PHP/Java/Python generators.




git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664712 13f79535-47bb-0310-9956-ffa450edef68
2006-05-30 09:24:40 +00:00