Commit Graph

81 Commits

Author SHA1 Message Date
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
68db166dd4 -- more thrift Makefile changes
Reviewed By: Slee


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664788 13f79535-47bb-0310-9956-ffa450edef68
2006-09-06 00:18:29 +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
Aditya Agarwal
0cc0c0ab6c -- generalize Makefile
Summary:
-- dont use /usr/local as the thrift directory now that multiple ppl are developing on dev007

Reviewed By: McSlee

Test Plan: Tested by making and cleaning


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664786 13f79535-47bb-0310-9956-ffa450edef68
2006-09-05 22:38:13 +00:00
Mark Slee
d2655523ab Thrift: Change Java/C++ server generation
Summary: Servers shouldn't implement iface directly, instead should contain an iface object


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664785 13f79535-47bb-0310-9956-ffa450edef68
2006-09-05 22:09:57 +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
c9676569ad Thrift Python server code generation
Summary: Yep, it's up and running. We now have full client/server support in all of C++ Java PHP and Python. Well, not quite... there's no PHP server, but honestly who wants one? Actually, if we do want one the framework will support writing is as a PHP file that can be served in apache like a web service (i.e. restserver.php would be thriftserver.php). But now that's rambling and nothing to do with this commit.

Notes: cheever, let's chat about porting your multithreaded Pillar Python server over to Thrift


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664783 13f79535-47bb-0310-9956-ffa450edef68
2006-09-05 17:34:52 +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
aeac1926f2 Thrift, Make sure gen'd code initializes empty containers in php / python
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664781 13f79535-47bb-0310-9956-ffa450edef68
2006-09-04 00:20:24 +00:00
Mark Slee
e50b309157 Ooops, forgot to svn add the new code gen files
Summary: Python generator


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664780 13f79535-47bb-0310-9956-ffa450edef68
2006-09-04 00:06:47 +00:00
Mark Slee
fc89d39917 Thrift and Python: Made to be together
Summary: Python client code generation for Thrift... HOTNESS!

Notes: Servers and asynchronous clients are coming soon...


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664779 13f79535-47bb-0310-9956-ffa450edef68
2006-09-04 00:04:39 +00:00
Mark Slee
cde2b61c5e Implementation of the basic Thrift stack in Python
Summary: Framework, install script, base classes, TSocket, TBinaryProtocol

Notes: Code-gen is coming around the bend...


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664778 13f79535-47bb-0310-9956-ffa450edef68
2006-09-03 21:13:07 +00:00
Mark Slee
dafa3cf710 Thrift C++ code generation improvements
Summary: Generate classes instead of structs, and put read/write methods inside the class definition. Separate services into uniquely generated files. Separate types header file from types implementation file (read/write methods)


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664777 13f79535-47bb-0310-9956-ffa450edef68
2006-09-02 23:56:49 +00:00
Mark Slee
b7f58ff346 More Thfirt code-gen improvements
Summary: Move read/write struct methods into PHP class definition, make struct read non-static in Java


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664776 13f79535-47bb-0310-9956-ffa450edef68
2006-09-02 21:59:28 +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
c29613f7ad Point Thrift bootrapping code to compiler/py instead of compiler
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664774 13f79535-47bb-0310-9956-ffa450edef68
2006-09-01 22:20:32 +00:00
Mark Slee
d3d733a061 Thrift test improvements, tests for both inline and normal PHP code gen
Summary: So you can A/B test and see 6ms vs. 4ms response time :)


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664773 13f79535-47bb-0310-9956-ffa450edef68
2006-09-01 22:19:06 +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
9cb7c61b6b Thrift compiler improvements, two modes for PHP
Summary: Complete PHP generator and CPP generator to new formats, and offer PHP generator that generates inline code free of any TProtocol abstraction


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664771 13f79535-47bb-0310-9956-ffa450edef68
2006-09-01 22:17:45 +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
Mark Slee
6e1555f36e Make separate dirs for CPP and Python versions of Thrift compiler
Summary: Keep source files in separate dirs to avoid confusion





git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664769 13f79535-47bb-0310-9956-ffa450edef68
2006-08-30 17:09:05 +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
9de5a5cdb7 Basic README with build instructions
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664767 13f79535-47bb-0310-9956-ffa450edef68
2006-08-23 22:34:00 +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
c6936407d1 Thrift php generator in python.
Cleaned up parser and cpp generator
    


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664765 13f79535-47bb-0310-9956-ffa450edef68
2006-08-23 02:15:31 +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
26253b28ec straggler
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664762 13f79535-47bb-0310-9956-ffa450edef68
2006-08-17 01:21:20 +00:00
Marc Slemko
1ab2878f0e thrift.py => /usr/local/bin/thrift
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664761 13f79535-47bb-0310-9956-ffa450edef68
2006-08-17 01:13:44 +00:00
Marc Slemko
53027fc3d3 Python installer for thrift idl compiler
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664760 13f79535-47bb-0310-9956-ffa450edef68
2006-08-17 01:12:11 +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
71d4e47e81 Cleaned up test code for thrift exception throwing
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664758 13f79535-47bb-0310-9956-ffa450edef68
2006-08-15 22:34:04 +00:00
Marc Slemko
bf4fd19963 Modified C++ code-gen to create default constructors for all non-string primitives so that auto variable instances of structs aren't populated with
garbage.  This matters because, given thrift's loosey-goosey argument and result lists, structs may only be sparsely filled.
    


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664757 13f79535-47bb-0310-9956-ffa450edef68
2006-08-15 21:29:39 +00:00
Marc Slemko
aeb36f840b Added namespace declaration
Added namespace declaration to thrift grammar
    
    Modified C++ code generator to produce equivalent C++ namespace for thrift namespace if specified
    


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664756 13f79535-47bb-0310-9956-ffa450edef68
2006-08-15 00:21:45 +00:00
Marc Slemko
1785985754 Added namespace declaration
Added namespace declaration to thrift grammar
    
    Modified C++ code generator to produce equivalent C++ namespace for thrift namespace if specified
    


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664755 13f79535-47bb-0310-9956-ffa450edef68
2006-08-15 00:21:31 +00:00
Marc Slemko
d8b1051800 You scream, I scream, We all scream for exceptions
Added exception defintions and specifiers to thrift grammar
    
    Modified C++ code generator to to catch and serialize exceptions on the server side and unmarshall and throw them on the client side.
    
Modified grammar to require ","  after each service function declaration to keep it consistent with struct declaration syntax

    This checkin officially breaks the old parser


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664754 13f79535-47bb-0310-9956-ffa450edef68
2006-08-14 23:30:37 +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
66d67d8e11 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@664751 13f79535-47bb-0310-9956-ffa450edef68
2006-08-11 23:33:08 +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
27340eb5cd Fixed parser to ensure that map key-type and set value-type are comparable (ie primivitive or a typedef that resolves to a primitive) at parse-time
to avoid unsightly errors at stub/skel compilation time.


			       


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664748 13f79535-47bb-0310-9956-ffa450edef68
2006-08-10 20:45:55 +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
c4eb9e8889 Fixed serialization logic for collections containing typedefs or enums
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664746 13f79535-47bb-0310-9956-ffa450edef68
2006-08-10 03:29:29 +00:00
Marc Slemko
db14e17a33 Modified cpp code generation to build read/write methods for each non-primitive type rather than inlining all serialization in client/server function handlers
Modified parser to assign negative numbers to autogenerated struct fields and function args.
			       


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664745 13f79535-47bb-0310-9956-ffa450edef68
2006-08-09 23:36:18 +00:00
Marc Slemko
c0e07a2d85 Modified cpp code generation to build read/write methods for each non-primitive type rather than inlining all serialization in client/server function handlers
Modified parser to assign negative numbers to autogenerated struct fields and function args.
			       


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664744 13f79535-47bb-0310-9956-ffa450edef68
2006-08-09 23:34:57 +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
b2039e70fe python parser for thrift using ply lalr generator
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664742 13f79535-47bb-0310-9956-ffa450edef68
2006-08-09 01:00:17 +00:00
Mark Slee
530fd662c0 Java Thrift libraries no longer use specially defined UInt32 etc. classes
Summary: There was really no need for these now that we are getting rid of unsigned, they should all just use the builtin int and long types





git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664741 13f79535-47bb-0310-9956-ffa450edef68
2006-08-09 00:05:18 +00:00
Mark Slee
52f643df7c Thrift compiler support for inline PHP client code
Summary: Option to generate inline PHP code, as well as support for the async modifier keyword and the abstraction of function calls into a send and recv component




git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664740 13f79535-47bb-0310-9956-ffa450edef68
2006-08-09 00:03:43 +00:00