[Twisted-Python] gRPC support in Twisted Python
Hello, Is there a plan (or an implementation) to support gRPC within Twisted Python? My understanding is that gRPC is built using Futures and creates its own threads for all its event handling. There is also a gRPC Python package (grpcio 1.0.0) that is available for python 2.7. In order to use gRPC with Twisted Python in 2.7 is the only way to have gRPC run in its own thread? Thanks Khen
On Sep 28, 2016, at 6:13 AM, Nursimulu, Khen
wrote:
Is there a plan (or an implementation) to support gRPC within Twisted Python? My understanding is that gRPC is built using Futures and creates its own threads for all its event handling. There is also a gRPC Python package (grpcio 1.0.0) that is available for python 2.7. In order to use gRPC with Twisted Python in 2.7 is the only way to have gRPC run in its own thread?
There's no plan that I'm aware of. You could definitely run gRPC in a thread currently, although it would be nice if grpc worked natively with Twisted. Probably contributing this upstream into the gRPC project would be the best way to start, and if they're not receptive, starting a separate 'txgRPC' project. -glyph
Thanks Glyth for the prompt response.
From:
On 9/28/16 9:13 AM, Nursimulu, Khen wrote:
Thanks Glyth for the prompt response.
On Sep 28, 2016, at 6:13 AM, Nursimulu, Khen
mailto:knursimu@ciena.com> wrote: Is there a plan (or an implementation) to support gRPC within Twisted Python? My understanding is that gRPC is built using Futures and creates its own threads for all its event handling. There is also a gRPC Python package (grpcio 1.0.0) that is available for python 2.7. In order to use gRPC with Twisted Python in 2.7 is the only way to have gRPC run in its own thread?
There's no plan that I'm aware of. You could definitely run gRPC in a thread currently, although it would be nice if grpc worked natively with Twisted.
Probably contributing this upstream into the gRPC project would be the best way to start, and if they're not receptive, starting a separate 'txgRPC' project.
Interesting, with the browser implementation in the works this could become a full replacement of nevow/athena Werner
[+Nathaniel]
https://groups.google.com/forum/m/#!topic/grpc-io/RpkyqqQy8TU/discussion
Hi. I'd like to link you to the above discussion and cc it's original
poster.
On Wed, Sep 28, 2016, 22:51 Werner Thie
On 9/28/16 9:13 AM, Nursimulu, Khen wrote:
Thanks Glyth for the prompt response.
On Sep 28, 2016, at 6:13 AM, Nursimulu, Khen
mailto:knursimu@ciena.com> wrote: Is there a plan (or an implementation) to support gRPC within Twisted Python? My understanding is that gRPC is built using Futures and creates its own threads for all its event handling. There is also a gRPC Python package (grpcio 1.0.0) that is available for python 2.7. In order to use gRPC with Twisted Python in 2.7 is the only way to have gRPC run in its own thread?
There's no plan that I'm aware of. You could definitely run gRPC in a thread currently, although it would be nice if grpc worked natively with Twisted.
Probably contributing this upstream into the gRPC project would be the best way to start, and if they're not receptive, starting a separate 'txgRPC' project.
Interesting, with the browser implementation in the works this could become a full replacement of nevow/athena
Werner
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
If you're planning on working on this, it'd probably be worth taking a look
at the Twisted bindings for Thrift (a competing RPC system from FB, based
on the Google PB paper).
The generator[2] isn't the best place to start (imperative C++ that outputs
python), but the code that it generates served us very well for years
(generally, communicating twisted->cassandra, or twisted->scala services).
[1] https://thrift.apache.org/
[2]
https://github.com/apache/thrift/blob/master/compiler/cpp/src/thrift/generat...
On 29 September 2016 at 08:34, Stephen Thorne
[+Nathaniel]
https://groups.google.com/forum/m/#!topic/grpc-io/RpkyqqQy8TU/discussion
Hi. I'd like to link you to the above discussion and cc it's original poster.
On Wed, Sep 28, 2016, 22:51 Werner Thie
wrote: On 9/28/16 9:13 AM, Nursimulu, Khen wrote:
Thanks Glyth for the prompt response.
On Sep 28, 2016, at 6:13 AM, Nursimulu, Khen
mailto:knursimu@ciena.com> wrote: Is there a plan (or an implementation) to support gRPC within Twisted Python? My understanding is that gRPC is built using Futures and creates its own threads for all its event handling. There is also a gRPC Python package (grpcio 1.0.0) that is available for python 2.7. In order to use gRPC with Twisted Python in 2.7 is the only way to have gRPC run in its own thread?
There's no plan that I'm aware of. You could definitely run gRPC in a thread currently, although it would be nice if grpc worked natively with Twisted.
Probably contributing this upstream into the gRPC project would be the best way to start, and if they're not receptive, starting a separate 'txgRPC' project.
Interesting, with the browser implementation in the works this could become a full replacement of nevow/athena
Werner
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
On Thu, Sep 29, 2016 at 5:41 PM, James Broadhead
If you're planning on working on this,
We don't currently have plans to implement it ourselves; we're trying to invoke the magic of open source. So far the feature requests we've gotten have been all over the map (gevent http://www.gevent.org//asyncio https://docs.python.org/3/whatsnew/3.4.html#asyncio/async-await https://docs.python.org/3/whatsnew/3.5.html#pep-492-coroutines-with-async-an...) that what's most important right now is just fostering the conversation among everyone who is interested about what the desired behavior of gRPC Python will be. it'd probably be worth taking a look at the Twisted bindings for Thrift (a
competing RPC system from FB, based on the Google PB paper).
The generator[2] isn't the best place to start (imperative C++ that outputs python), but the code that it generates served us very well for years (generally, communicating twisted->cassandra, or twisted->scala services).
[1] https://thrift.apache.org/ [2] https://github.com/apache/thrift/blob/master/compiler/ cpp/src/thrift/generate/t_py_generator.cc
Please contribute this to the thread https://groups.google.com/d/topic/grpc-io/RpkyqqQy8TU/discussion/design document https://github.com/grpc/grpc-experiments/blob/master/python/async/README.md /conversation. -Nathaniel
On Thu, Oct 6, 2016 at 11:49 AM, Nathaniel Manista
On Thu, Sep 29, 2016 at 5:41 PM, James Broadhead
wrote: If you're planning on working on this,
We don't currently have plans to implement it ourselves; we're trying to invoke the magic of open source. So far the feature requests we've gotten have been all over the map (gevent/asyncio/async-await) that what's most important right now is just fostering the conversation among everyone who is interested about what the desired behavior of gRPC Python will be. It will be nice if it can be implemented without IO [1] as Cory rightfully points out everywhere.
it'd probably be worth taking a look at the Twisted bindings for Thrift (a competing RPC system from FB, based on the Google PB paper).
The generator[2] isn't the best place to start (imperative C++ that outputs python), but the code that it generates served us very well for years (generally, communicating twisted->cassandra, or twisted->scala services).
[1] https://thrift.apache.org/ [2] https://github.com/apache/thrift/blob/master/compiler/cpp/src/thrift/generat...
Please contribute this to the thread/design document/conversation. Thanks! I'll probably try to mention about sans-IO part there. -Nathaniel
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
On Thu, Oct 6, 2016 at 12:11 PM, Manish Tomar
It will be nice if it can be implemented without IO [1] as Cory rightfully points out everywhere.
I'm a big fan of sans I/O; I think it will be interesting to see how much it can be applied to the C-language library that implements most of the behavior of gRPC Python. -N
On this note, if anyone wanted to write a greenfield gRPC implementation for Twisted directly, rather than using the C++ library that Nathaniel has been working on, hyper-h2 and Twisted’s built-in HTTP/2 logic is likely to be a very useful leaping off point. My high-level understanding of gRPC is that at a wire-protocol level the other things required are some protocol buffers and some code generation. That’s definitely not *nothing*, but neither is it the same as implementing the whole thing in one go. Cory
On 7 Oct 2016, at 00:22, Nathaniel Manista
wrote: On Thu, Oct 6, 2016 at 12:11 PM, Manish Tomar
mailto:manish.tomar@gmail.com> wrote: It will be nice if it can be implemented without IO [1] as Cory rightfully points out everywhere. I'm a big fan of sans I/O; I think it will be interesting to see how much it can be applied to the C-language library that implements most of the behavior of gRPC Python. -N _______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
participants (8)
-
Cory Benfield
-
Glyph Lefkowitz
-
James Broadhead
-
Manish Tomar
-
Nathaniel Manista
-
Nursimulu, Khen
-
Stephen Thorne
-
Werner Thie