Hi,

I've been working on porting the cookie middleware from Java to C++/Python
clients in this PR:
https://github.com/apache/arrow/pull/8655

I'm looking at the Python impl now. The Python Flight API for middlewares
seems
oriented towards writing middlewares directly in Python, which would get
wrapped
in a C++ middleware for running Python code.

It seems to me like there are two solutions for this:
1. Creating some helper static function in Python which takes a C++
middleware
pointer and wraps it in a Python middleware, which in turn would get
wrapped in
a C++ middleware again in the C++ layer.
2. Expose the concept of letting the Python client accept 'pass-through'
middleware
objects that don't implement the Python interface, and are interpreted by
the C++
layer to be direct C++ middleware objects.

The former seems like a better of abstraction and seems like the way to go,
although less efficient. The latter is obviously less convoluted, but
brings up issues if we ever change the Python implementation from being a
wrapper around C++.

-- 

*James Duong*
Lead Software Developer
Bit Quill Technologies Inc.
Direct: +1.604.562.6082 | jam...@bitquilltech.com
https://www.bitquilltech.com

This email message is for the sole use of the intended recipient(s) and may
contain confidential and privileged information.  Any unauthorized review,
use, disclosure, or distribution is prohibited.  If you are not the
intended recipient, please contact the sender by reply email and destroy
all copies of the original message.  Thank you.

Reply via email to