[GitHub] thrift pull request: update TSocket.php

2015-12-15 Thread lihanharry
Github user lihanharry closed the pull request at:

https://github.com/apache/thrift/pull/744


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] thrift pull request: update TSocket.php

2015-12-15 Thread lihanharry
GitHub user lihanharry reopened a pull request:

https://github.com/apache/thrift/pull/744

update TSocket.php

- add connect timeout
- support accurate send timeout and write timeout


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/lihanharry/thrift master

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/thrift/pull/744.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #744


commit 4e5a2aa039f9a3edb33e18411750b74a39b9c454
Author: harry 
Date:   2015-12-15T10:10:50Z

update TSocket.php
add conntimeout
support accurate send timeout and write timeout

commit 93affda4d6aefcb88929cd53e2f29cd6287b4d3e
Author: harry 
Date:   2015-12-15T10:28:23Z

modify code style




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] thrift pull request: update TSocket.php

2015-12-15 Thread lihanharry
Github user lihanharry closed the pull request at:

https://github.com/apache/thrift/pull/744


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] thrift pull request: update TSocket.php

2015-12-15 Thread lihanharry
GitHub user lihanharry opened a pull request:

https://github.com/apache/thrift/pull/744

update TSocket.php

- add connect timeout
- support accurate send timeout and write timeout


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/lihanharry/thrift master

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/thrift/pull/744.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #744


commit 4e5a2aa039f9a3edb33e18411750b74a39b9c454
Author: harry 
Date:   2015-12-15T10:10:50Z

update TSocket.php
add conntimeout
support accurate send timeout and write timeout




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] thrift pull request: update TSocket.php

2015-12-15 Thread lihanharry
GitHub user lihanharry reopened a pull request:

https://github.com/apache/thrift/pull/744

update TSocket.php

- add connect timeout
- support accurate send timeout and write timeout


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/lihanharry/thrift master

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/thrift/pull/744.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #744


commit 4e5a2aa039f9a3edb33e18411750b74a39b9c454
Author: harry 
Date:   2015-12-15T10:10:50Z

update TSocket.php
add conntimeout
support accurate send timeout and write timeout

commit 93affda4d6aefcb88929cd53e2f29cd6287b4d3e
Author: harry 
Date:   2015-12-15T10:28:23Z

modify code style




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] thrift pull request: update TSocket.php

2015-12-15 Thread lihanharry
Github user lihanharry commented on the pull request:

https://github.com/apache/thrift/pull/744#issuecomment-164726659
  
sorry there is something wrong with the codestyle,I will modify and give 
another pull request


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Updated] (THRIFT-2427) Add support for Multiplexed Async Processors

2015-12-15 Thread Nikita Dolgov (JIRA)

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

Nikita Dolgov updated THRIFT-2427:
--
Attachment: 
THRIFT_2427_add_support_for_multiplexed_async_processors_by_copy_pasting_most_of_TBaseAsyn.patch

> Add support for Multiplexed Async Processors
> 
>
> Key: THRIFT-2427
> URL: https://issues.apache.org/jira/browse/THRIFT-2427
> Project: Thrift
>  Issue Type: Improvement
>  Components: Java - Library
>Reporter: Lior Neudorfer
> Attachments: 
> THRIFT_2427_add_support_for_multiplexed_async_processors_by_copy_pasting_most_of_TBaseAsyn.patch,
>  TMultiplexedAsyncProcessor.java
>
>
> THRIFT-1972 added support for Asynchronous processors to be used with Non 
> blocking servers. THRIFT-563 added support for multiplexed servers.
> I would like to build a Non Blocking server which runs multiple, multiplexed 
> async processors. However, the current Java implementation does not allow a 
> multiplexed asynchronous server:
> 1. TMultiplexedProcessor implements TProcessor, which causes 
> TNonBlockingServer to create a FrameBuffer, not a AsyncFrameBuffer for it.
> 2. TMultiplexedProcessor calls the underlying processors with the 
> {code:xml}process(TProtocol in, TProtocol out){code} method variant, which 
> returns false in TBaseAsyncProcessor. It should, instead, be able to call the 
> {code:xml}process(final AsyncFrameBuffer fb){code} variant.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (THRIFT-2427) Add support for Multiplexed Async Processors

2015-12-15 Thread Nikita Dolgov (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-2427?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15059542#comment-15059542
 ] 

Nikita Dolgov commented on THRIFT-2427:
---

1) I have attached a patch for the implementation suggested on Nov 26. 

2) I believe it's not a good idea to copy/paste TBaseAsyncProcessor::process 
into TMultiplexedAsyncProcessor though. Unfortunately TBaseAsyncProcessor is 
not structured for reuse. We should probably consider extracting something like:

{code}
TBaseAsyncProcessor {
boolean doProcess(AsyncFrameBuffer fb, TProtocol in,TProtocol out) 
{code}

that would enable TMultiplexedProcessor.StoredMessageProtocol-style decoration 
with no TBaseAsyncProcessor code duplication in TMultiplexedAsyncProcessor.

> Add support for Multiplexed Async Processors
> 
>
> Key: THRIFT-2427
> URL: https://issues.apache.org/jira/browse/THRIFT-2427
> Project: Thrift
>  Issue Type: Improvement
>  Components: Java - Library
>Reporter: Lior Neudorfer
> Attachments: 
> THRIFT_2427_add_support_for_multiplexed_async_processors_by_copy_pasting_most_of_TBaseAsyn.patch,
>  TMultiplexedAsyncProcessor.java
>
>
> THRIFT-1972 added support for Asynchronous processors to be used with Non 
> blocking servers. THRIFT-563 added support for multiplexed servers.
> I would like to build a Non Blocking server which runs multiple, multiplexed 
> async processors. However, the current Java implementation does not allow a 
> multiplexed asynchronous server:
> 1. TMultiplexedProcessor implements TProcessor, which causes 
> TNonBlockingServer to create a FrameBuffer, not a AsyncFrameBuffer for it.
> 2. TMultiplexedProcessor calls the underlying processors with the 
> {code:xml}process(TProtocol in, TProtocol out){code} method variant, which 
> returns false in TBaseAsyncProcessor. It should, instead, be able to call the 
> {code:xml}process(final AsyncFrameBuffer fb){code} variant.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (THRIFT-2427) Add support for Multiplexed Async Processors

2015-12-15 Thread Nikita Dolgov (JIRA)

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

Nikita Dolgov updated THRIFT-2427:
--
Attachment: 
THRIFT_2427_add_support_for_TMultiplexedProcessor_style_multiplexed_async_processors_compa.patch

> Add support for Multiplexed Async Processors
> 
>
> Key: THRIFT-2427
> URL: https://issues.apache.org/jira/browse/THRIFT-2427
> Project: Thrift
>  Issue Type: Improvement
>  Components: Java - Library
>Reporter: Lior Neudorfer
> Attachments: 
> THRIFT_2427_add_support_for_TMultiplexedProcessor_style_multiplexed_async_processors_compa.patch,
>  TMultiplexedAsyncProcessor.java
>
>
> THRIFT-1972 added support for Asynchronous processors to be used with Non 
> blocking servers. THRIFT-563 added support for multiplexed servers.
> I would like to build a Non Blocking server which runs multiple, multiplexed 
> async processors. However, the current Java implementation does not allow a 
> multiplexed asynchronous server:
> 1. TMultiplexedProcessor implements TProcessor, which causes 
> TNonBlockingServer to create a FrameBuffer, not a AsyncFrameBuffer for it.
> 2. TMultiplexedProcessor calls the underlying processors with the 
> {code:xml}process(TProtocol in, TProtocol out){code} method variant, which 
> returns false in TBaseAsyncProcessor. It should, instead, be able to call the 
> {code:xml}process(final AsyncFrameBuffer fb){code} variant.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (THRIFT-2427) Add support for Multiplexed Async Processors

2015-12-15 Thread Nikita Dolgov (JIRA)

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

Nikita Dolgov updated THRIFT-2427:
--
Attachment: (was: 
THRIFT_2427_add_support_for_multiplexed_async_processors_by_copy_pasting_most_of_TBaseAsyn.patch)

> Add support for Multiplexed Async Processors
> 
>
> Key: THRIFT-2427
> URL: https://issues.apache.org/jira/browse/THRIFT-2427
> Project: Thrift
>  Issue Type: Improvement
>  Components: Java - Library
>Reporter: Lior Neudorfer
> Attachments: 
> THRIFT_2427_add_support_for_TMultiplexedProcessor_style_multiplexed_async_processors_compa.patch,
>  TMultiplexedAsyncProcessor.java
>
>
> THRIFT-1972 added support for Asynchronous processors to be used with Non 
> blocking servers. THRIFT-563 added support for multiplexed servers.
> I would like to build a Non Blocking server which runs multiple, multiplexed 
> async processors. However, the current Java implementation does not allow a 
> multiplexed asynchronous server:
> 1. TMultiplexedProcessor implements TProcessor, which causes 
> TNonBlockingServer to create a FrameBuffer, not a AsyncFrameBuffer for it.
> 2. TMultiplexedProcessor calls the underlying processors with the 
> {code:xml}process(TProtocol in, TProtocol out){code} method variant, which 
> returns false in TBaseAsyncProcessor. It should, instead, be able to call the 
> {code:xml}process(final AsyncFrameBuffer fb){code} variant.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (THRIFT-2427) Add support for Multiplexed Async Processors

2015-12-15 Thread Nikita Dolgov (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-2427?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15059542#comment-15059542
 ] 

Nikita Dolgov edited comment on THRIFT-2427 at 12/16/15 7:07 AM:
-

I have attached a patch inspired by the implementation suggested on Nov 26 but 
without duplicated code.


was (Author: ndolgov):
1) I have attached a patch for the implementation suggested on Nov 26. 

2) I believe it's not a good idea to copy/paste TBaseAsyncProcessor::process 
into TMultiplexedAsyncProcessor though. Unfortunately TBaseAsyncProcessor is 
not structured for reuse. We should probably consider extracting something like:

{code}
TBaseAsyncProcessor {
boolean doProcess(AsyncFrameBuffer fb, TProtocol in,TProtocol out) 
{code}

that would enable TMultiplexedProcessor.StoredMessageProtocol-style decoration 
with no TBaseAsyncProcessor code duplication in TMultiplexedAsyncProcessor.

> Add support for Multiplexed Async Processors
> 
>
> Key: THRIFT-2427
> URL: https://issues.apache.org/jira/browse/THRIFT-2427
> Project: Thrift
>  Issue Type: Improvement
>  Components: Java - Library
>Reporter: Lior Neudorfer
> Attachments: 
> THRIFT_2427_add_support_for_TMultiplexedProcessor_style_multiplexed_async_processors_compa.patch,
>  TMultiplexedAsyncProcessor.java
>
>
> THRIFT-1972 added support for Asynchronous processors to be used with Non 
> blocking servers. THRIFT-563 added support for multiplexed servers.
> I would like to build a Non Blocking server which runs multiple, multiplexed 
> async processors. However, the current Java implementation does not allow a 
> multiplexed asynchronous server:
> 1. TMultiplexedProcessor implements TProcessor, which causes 
> TNonBlockingServer to create a FrameBuffer, not a AsyncFrameBuffer for it.
> 2. TMultiplexedProcessor calls the underlying processors with the 
> {code:xml}process(TProtocol in, TProtocol out){code} method variant, which 
> returns false in TBaseAsyncProcessor. It should, instead, be able to call the 
> {code:xml}process(final AsyncFrameBuffer fb){code} variant.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (THRIFT-2427) Add support for Multiplexed Async Processors

2015-12-15 Thread Nikita Dolgov (JIRA)

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

Nikita Dolgov updated THRIFT-2427:
--
Attachment: (was: 
THRIFT_2427_add_support_for_TMultiplexedProcessor_style_multiplexed_async_processors_compa.patch)

> Add support for Multiplexed Async Processors
> 
>
> Key: THRIFT-2427
> URL: https://issues.apache.org/jira/browse/THRIFT-2427
> Project: Thrift
>  Issue Type: Improvement
>  Components: Java - Library
>Reporter: Lior Neudorfer
> Attachments: TMultiplexedAsyncProcessor.java, 
> thrift_2427_add_support_for_multiplexed_async_processors.patch
>
>
> THRIFT-1972 added support for Asynchronous processors to be used with Non 
> blocking servers. THRIFT-563 added support for multiplexed servers.
> I would like to build a Non Blocking server which runs multiple, multiplexed 
> async processors. However, the current Java implementation does not allow a 
> multiplexed asynchronous server:
> 1. TMultiplexedProcessor implements TProcessor, which causes 
> TNonBlockingServer to create a FrameBuffer, not a AsyncFrameBuffer for it.
> 2. TMultiplexedProcessor calls the underlying processors with the 
> {code:xml}process(TProtocol in, TProtocol out){code} method variant, which 
> returns false in TBaseAsyncProcessor. It should, instead, be able to call the 
> {code:xml}process(final AsyncFrameBuffer fb){code} variant.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (THRIFT-2427) Add support for Multiplexed Async Processors

2015-12-15 Thread Nikita Dolgov (JIRA)

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

Nikita Dolgov updated THRIFT-2427:
--
Attachment: thrift_2427_add_support_for_multiplexed_async_processors.patch

> Add support for Multiplexed Async Processors
> 
>
> Key: THRIFT-2427
> URL: https://issues.apache.org/jira/browse/THRIFT-2427
> Project: Thrift
>  Issue Type: Improvement
>  Components: Java - Library
>Reporter: Lior Neudorfer
> Attachments: TMultiplexedAsyncProcessor.java, 
> thrift_2427_add_support_for_multiplexed_async_processors.patch
>
>
> THRIFT-1972 added support for Asynchronous processors to be used with Non 
> blocking servers. THRIFT-563 added support for multiplexed servers.
> I would like to build a Non Blocking server which runs multiple, multiplexed 
> async processors. However, the current Java implementation does not allow a 
> multiplexed asynchronous server:
> 1. TMultiplexedProcessor implements TProcessor, which causes 
> TNonBlockingServer to create a FrameBuffer, not a AsyncFrameBuffer for it.
> 2. TMultiplexedProcessor calls the underlying processors with the 
> {code:xml}process(TProtocol in, TProtocol out){code} method variant, which 
> returns false in TBaseAsyncProcessor. It should, instead, be able to call the 
> {code:xml}process(final AsyncFrameBuffer fb){code} variant.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)