python binding of librados with cython#7621
Conversation
8d19910 to
4ba8cb0
Compare
8ddc2dc to
a41bec9
Compare
|
Hi, Just to be sure, I can continue to work on this, Can you confirm that this feature is something your are interested in ? Cheers, |
|
Yes, I'm excited by this! @marcan is likely interested as well. I haven't looked closely yet, but I think we'll want make ceph.in (turns into /usr/bin/ceph) do the run-in-thread dance itself, so it can be interrupted with ^C. I agree getting rid of it in the python bindings is the way to go. Thanks for adding tests and keeping things backwards-compatible too! |
|
I work on Gnocchi project (http://gnocchi.xyz/), we uses rados API to store object. The current rados python binding is slow as hell, that why I started this. About run_in_thread, it should not leave into the lib. Into our application we already use threads to do concurrency IO, this additional thread (run_in_thread) on each C call is an useless big overhead for us (We currently monkeypatch the lib to disable this thread). I run some preliminary benchmark of our application today, the result is just impressive. We now process 10000 measures in 30 secs instead of 8 minutes with the Ceph backend. So I will continue on this:
|
|
Yes, this is something I was looking to get around to doing sooner or later. Thanks for taking the lead! Looks like you have some spurious egg-info files in here. I assume you're still working on this and pending some cleanup/rewriting of the commits. |
cb13f53 to
2b59ca8
Compare
|
I have:
todo:
I think I can propose something for python3-rados and python3-rbd packaging but in other PR to not put much code into this PR. |
2b59ca8 to
10e4c2e
Compare
|
I have done the last todo item |
10e4c2e to
edb8f43
Compare
|
That was fast! I'll take a close look today. |
edb8f43 to
ac1986d
Compare
To allow to create a autonomous rados module with cython. We move the current librbdpy to the rbd sub directory. Signed-off-by: Mehdi Abaakouk <sileht@redhat.com>
16b9cc0 to
ef8ae20
Compare
|
The rest looks good! Just one other thing: for the docs can you update the admin/build-doc script? To extract the docstrings sphinx imports the module, so that script builds a dummy version of the python rbd module just for the docstrings. Can you add the same thing for librados, and make sure the paths still work for rbd.so? Thanks! BTW the rbd python tests pass as well. |
|
Oh, and adding python3 packages in a separate PR would be great. |
ef8ae20 to
e7b048b
Compare
|
I have fixed your remarks. |
e7b048b to
78c8b6f
Compare
Notable changes: * run_in_thread have disapeared * timeout argument of some methods are ignored * rados_create_write_op/rados_create_read_op returns WriteOp/ReadOp instead of the pointer address * rados_monitor_log callback 'arg' arguments was broken in previous python binding (callback was called with the pointer address instead pointed object) * object attributes that was pointer addresses are now private and not accessible in python Some tests have been added to cover all methods Signed-off-by: Mehdi Abaakouk <sileht@redhat.com>
Signed-off-by: Mehdi Abaakouk <sileht@redhat.com>
Signed-off-by: Mehdi Abaakouk <sileht@redhat.com>
This implements run_in_thread inside the ceph command itself. And fixes the ceph command bootstrap when it run inside the source tree to correctly load the new rados python module. Signed-off-by: Mehdi Abaakouk <sileht@redhat.com>
Signed-off-by: Mehdi Abaakouk <sileht@redhat.com>
a830a6f to
c5f79b3
Compare
Signed-off-by: Mehdi Abaakouk <sileht@redhat.com>
c5f79b3 to
67f95c8
Compare
python binding of librados with cython Reviewed-by: Josh Durgin <jdurgin@redhat.com>
|
Thanks! |
Hi,
This change move the librados python binding from ctypes to cython.
Cheers,