[ 
https://issues.apache.org/jira/browse/THRIFT-599?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Anthony Molinaro updated THRIFT-599:
------------------------------------

    Attachment: thrift-599.patch

Okay, this one applies without having to do a move.  However, you should run 
with 'patch -E -p0 < thrift-599.patch'
in the trunk directory so it deletes empty files.

Then you'll need to

% svn remove test/erl/src/test_tether.erl \
                           lib/erl/src/test_service.erl \
                           lib/erl/src/test_handler.erl
% svn add test/erl/src/test_client.erl \
                    lib/erl/include/thrift_transport_behaviour.hrl \
                    lib/erl/include/thrift_protocol_behaviour.hrl \
                    lib/erl/src/thrift_transport_state_test.erl \
                    lib/erl/src/thrift_client_util.erl

One should also not that this is not a backwards compatible change, but I think 
that's okay as long as it's pointed out somewhere in some release notes.

> Don't use unnecessary processes in the Erlang transports and clients
> --------------------------------------------------------------------
>
>                 Key: THRIFT-599
>                 URL: https://issues.apache.org/jira/browse/THRIFT-599
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Library (Erlang)
>            Reporter: David Reiss
>         Attachments: erlang-refactor-v1.patch, thrift-599.patch
>
>
> The Erlang library currently spawns a process for every buffered/framed/http 
> transport and every client.  These processes can be eliminated by by making 
> client, protocol, and transport operations work like operations on Erlang's 
> persistent data structures (like dict): every mutating call returns the new 
> version of the object.  This has four benefits.
> - Easier debugging: single stepping into a gen_server:call is very difficult.
> - Better error messages: problems that occur during Thrift operations are 
> localized to a single process, providing a better stack trace and eliminating 
> uninformative crash reports.
> - More measurable performance: time spent in Thrift client operations will 
> show up in etop under the process making the call, rather than in a transient 
> client or transport process.
> - Better performance: I haven't actually measured this, but I'm pretty sure 
> that eliminating the extra spawns and messages will speed things up.
> The only user-visible changes are to the client.  Every thrift call now 
> returns {NewClient, Result} instead of just Result.
> I'm attaching a big monolithic patch, but a fairly readable chronology of my 
> changes is at 
> <http://gitweb.thrift-rpc.org/?p=thrift.git;a=log;h=refs/heads/pri/dreiss/erl-refactor;hb=HEAD>.
>   I'm open to opinions as to whether this should be committed as one rev or 
> many.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to