You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Nick Jones (JIRA)" <ji...@apache.org> on 2010/11/14 19:09:14 UTC

[jira] Created: (THRIFT-999) Add TForkingServer

Add TForkingServer
------------------

                 Key: THRIFT-999
                 URL: https://issues.apache.org/jira/browse/THRIFT-999
             Project: Thrift
          Issue Type: New Feature
          Components: PHP - Library
            Reporter: Nick Jones
            Priority: Minor
         Attachments: add-forking-server.patch

The PHP libs only have TSimpleServer implemented currently. Given PHP supports forking through the PCNTL functions, it's possible to add a TForkingServer implementation, much akin to the perl library implementation.

Example code usage:

{code}
$processor = new SomeProcessor(new SomeHandler());
$transport = new TServerSocket();
$transport->setAcceptTimeout(1000);
$transportFactory = new TTransportFactory();
$protocolFactory = new TBinaryProtocolFactory();
$server = new TForkingServer($processor, $transport, $transportFactory, $transportFactory, $protocolFactory, $protocolFactory);

$server->serve();
{code}

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


[jira] Updated: (THRIFT-999) Add TForkingServer

Posted by "Nick Jones (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-999?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nick Jones updated THRIFT-999:
------------------------------

    Attachment: add-forking-server.patch

Adding patch which is a simple implementation of TForkingServer for the PHP libraries.

> Add TForkingServer
> ------------------
>
>                 Key: THRIFT-999
>                 URL: https://issues.apache.org/jira/browse/THRIFT-999
>             Project: Thrift
>          Issue Type: New Feature
>          Components: PHP - Library
>            Reporter: Nick Jones
>            Priority: Minor
>         Attachments: add-forking-server.patch
>
>
> The PHP libs only have TSimpleServer implemented currently. Given PHP supports forking through the PCNTL functions, it's possible to add a TForkingServer implementation, much akin to the perl library implementation.
> Example code usage:
> {code}
> $processor = new SomeProcessor(new SomeHandler());
> $transport = new TServerSocket();
> $transport->setAcceptTimeout(1000);
> $transportFactory = new TTransportFactory();
> $protocolFactory = new TBinaryProtocolFactory();
> $server = new TForkingServer($processor, $transport, $transportFactory, $transportFactory, $protocolFactory, $protocolFactory);
> $server->serve();
> {code}

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


[jira] Commented: (THRIFT-999) Add TForkingServer

Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12932596#action_12932596 ] 

Bryan Duxbury commented on THRIFT-999:
--------------------------------------

Patch applies cleanly, looks alright. I don't have any personal experience with this sort of thing, though. Anyone else want to chime in with a aye or nay? If I don't get any complaints, I'll commit this before rolling an 0.6 release.

> Add TForkingServer
> ------------------
>
>                 Key: THRIFT-999
>                 URL: https://issues.apache.org/jira/browse/THRIFT-999
>             Project: Thrift
>          Issue Type: New Feature
>          Components: PHP - Library
>            Reporter: Nick Jones
>            Priority: Minor
>         Attachments: add-forking-server.patch
>
>
> The PHP libs only have TSimpleServer implemented currently. Given PHP supports forking through the PCNTL functions, it's possible to add a TForkingServer implementation, much akin to the perl library implementation.
> Example code usage:
> {code}
> $processor = new SomeProcessor(new SomeHandler());
> $transport = new TServerSocket();
> $transport->setAcceptTimeout(1000);
> $transportFactory = new TTransportFactory();
> $protocolFactory = new TBinaryProtocolFactory();
> $server = new TForkingServer($processor, $transport, $transportFactory, $transportFactory, $protocolFactory, $protocolFactory);
> $server->serve();
> {code}

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


[jira] Assigned: (THRIFT-999) Add TForkingServer

Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-999?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bryan Duxbury reassigned THRIFT-999:
------------------------------------

    Assignee: Bryan Duxbury

> Add TForkingServer
> ------------------
>
>                 Key: THRIFT-999
>                 URL: https://issues.apache.org/jira/browse/THRIFT-999
>             Project: Thrift
>          Issue Type: New Feature
>          Components: PHP - Library
>            Reporter: Nick Jones
>            Assignee: Bryan Duxbury
>            Priority: Minor
>         Attachments: add-forking-server.patch
>
>
> The PHP libs only have TSimpleServer implemented currently. Given PHP supports forking through the PCNTL functions, it's possible to add a TForkingServer implementation, much akin to the perl library implementation.
> Example code usage:
> {code}
> $processor = new SomeProcessor(new SomeHandler());
> $transport = new TServerSocket();
> $transport->setAcceptTimeout(1000);
> $transportFactory = new TTransportFactory();
> $protocolFactory = new TBinaryProtocolFactory();
> $server = new TForkingServer($processor, $transport, $transportFactory, $transportFactory, $protocolFactory, $protocolFactory);
> $server->serve();
> {code}

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


[jira] Closed: (THRIFT-999) Add TForkingServer

Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-999?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bryan Duxbury closed THRIFT-999.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 0.7
         Assignee: Nick Jones  (was: Bryan Duxbury)

I just committed this patch to TRUNK. My bad for not tagging it 0.6 so it'd go in before I cut the branch. Thanks for the patch, Nick!

> Add TForkingServer
> ------------------
>
>                 Key: THRIFT-999
>                 URL: https://issues.apache.org/jira/browse/THRIFT-999
>             Project: Thrift
>          Issue Type: New Feature
>          Components: PHP - Library
>            Reporter: Nick Jones
>            Assignee: Nick Jones
>            Priority: Minor
>             Fix For: 0.7
>
>         Attachments: add-forking-server.patch
>
>
> The PHP libs only have TSimpleServer implemented currently. Given PHP supports forking through the PCNTL functions, it's possible to add a TForkingServer implementation, much akin to the perl library implementation.
> Example code usage:
> {code}
> $processor = new SomeProcessor(new SomeHandler());
> $transport = new TServerSocket();
> $transport->setAcceptTimeout(1000);
> $transportFactory = new TTransportFactory();
> $protocolFactory = new TBinaryProtocolFactory();
> $server = new TForkingServer($processor, $transport, $transportFactory, $transportFactory, $protocolFactory, $protocolFactory);
> $server->serve();
> {code}

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