You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "darren wang (JIRA)" <ji...@apache.org> on 2011/09/07 09:25:10 UTC

[jira] [Created] (THRIFT-1329) is there any plan to enhance TProcessorFactory so that I can identify different request for different TProcessor?!

is there any plan to enhance TProcessorFactory so that I can identify different request for different TProcessor?!
------------------------------------------------------------------------------------------------------------------

                 Key: THRIFT-1329
                 URL: https://issues.apache.org/jira/browse/THRIFT-1329
             Project: Thrift
          Issue Type: Improvement
          Components: Java - Library
    Affects Versions: 0.7
            Reporter: darren wang


Here is what I want: (maybe I am using thrift in some improper way, if so, please point me out)

In most of the sample applications I found from internet, they just expose one service via one TServer, that's ok for just one, but I want to expose multiple service via one TServer, I don't know whether thrift has some support for this situation, since I just get to know thrift in 1-2 days, so I tries to read the code to find out how to achieve it.

What I found is almost each TServer impl. will retrieve a TProcessor instance to handle the request by getting the processor instance from default TProcessorFactory as per current TTransport instance. But since default TProcessorFactory just return same singleton instance each time, the reason to lookup different TProcessor as per current TTransport is weak. I can't find any useful information from the TTransport to help to identify which one processor to use for current transport. 

What I am wondering is, will u enhance the TProcessorFactory via passing in more information to help to identify different processors to use? or will u enhance some other facilities in the library? or some other way I can resort to?

Thanks


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (THRIFT-1329) is there any plan to enhance TProcessorFactory so that I can identify different request for different TProcessor?!

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

Bryan Duxbury closed THRIFT-1329.
---------------------------------

    Resolution: Invalid

We don't currently have any plans to implement a feature like this. You are already free to create new TProcessorFactory implementations that can do more complicated things, though as you point out, we may not be giving you enough information to do what you'd like. 

However, generally speaking, Thrift doesn't want to serve more than one service over a single port. You're on your own to figure that out or propose features that would make it easy to do.

Also, this kind of question is better asked on the mailing list than in a JIRA ticket, so I'm closing it. If you would like to convert the content of this ticket into a more concise feature request, that would be OK too.

> is there any plan to enhance TProcessorFactory so that I can identify different request for different TProcessor?!
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-1329
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1329
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Java - Library
>    Affects Versions: 0.7
>            Reporter: darren wang
>
> Here is what I want: (maybe I am using thrift in some improper way, if so, please point me out)
> In most of the sample applications I found from internet, they just expose one service via one TServer, that's ok for just one, but I want to expose multiple service via one TServer, I don't know whether thrift has some support for this situation, since I just get to know thrift in 1-2 days, so I tries to read the code to find out how to achieve it.
> What I found is almost each TServer impl. will retrieve a TProcessor instance to handle the request by getting the processor instance from default TProcessorFactory as per current TTransport instance. But since default TProcessorFactory just return same singleton instance each time, the reason to lookup different TProcessor as per current TTransport is weak. I can't find any useful information from the TTransport to help to identify which one processor to use for current transport. 
> What I am wondering is, will u enhance the TProcessorFactory via passing in more information to help to identify different processors to use? or will u enhance some other facilities in the library? or some other way I can resort to?
> Thanks

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira