RFC Modernise prserv
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest11 patches 2 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/11 | hashserv: Use generic ConnectionErrorlib/ lib/ lib/ | +12 | 0 replies | |
| 2/11 | asyncrpc: Common implementation of RPC using json & asynciolib/ lib/ lib/ | +394 | 0 replies | |
| 3/11 | hashserv: Refactor to use asyncrpclib/ lib/ | +41 | 0 replies | |
| 4/11 | prserv: Drop obsolete python version checklib/ | +0 | 0 replies | |
| 5/11 | asyncrpc: Add ping methodlib/ lib/ | +11 | 0 replies | |
| 6/11 | prserv: Use multiprocessing to auto start prserverlib/ | +8 | 0 replies | |
| 7/11 | prserv: Extract daemonization from PRServer classlib/ | +72 | 0 replies | |
| 8/11 | prserv: Handle requests in main threadlib/ | +36 | 0 replies | |
| 9/11 | prserv: Drop unused methodslib/ | +0 | 0 replies | |
| 10/11 | prserv: Replace XML RPC with modern asyncrpc implementationlib/ | +129 | 0 replies | |
| 11/11 | prserv: Add connect functionlib/ | +11 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC PATCH 00/11] Modernise prserv
The prserv module is converted from the old XML RPC mechinism to the more modern json + asyncio RPC system used by hashserv. The common code now shared between hashserv and prserv is moved to a new asyncrpc module. The startup and shutdown code within prserv is also refactored and modernised, using the Python multiprocessing module where possible.
These changes are not expected to land in the upcoming 3.3 release, they're currently submitted as an RFC to get some early review.
The following change is needed in oe-core when testing these patches, this can be submitted separately once these changes are past the RFC stage:
diff --git a/meta/lib/oe/prservice.py b/meta/lib/oe/prservice.py
index fcdbe66c19..15ce060ff6 100644
--- a/meta/lib/oe/prservice.py
+++ b/meta/lib/oe/prservice.py
@@ -7,7 +7,7 @@ def prserv_make_conn(d, check = False):
host_params = list([_f for _f in (d.getVar("PRSERV_HOST") or '').split(':') if _f])
try:
conn = None
- conn = prserv.serv.PRServerConnection(host_params[0], int(host_params[1]))
+ conn = prserv.serv.connect(host_params[0], int(host_params[1]))
if check:
if not conn.ping():
raise Exception('service not available')I'm also currently working on a follow-up patch which will add a read-only mode to prserv.
Let me know if there are any other questions :)
Paul Barker (11):
hashserv: Use generic ConnectionError
asyncrpc: Common implementation of RPC using json & asyncio
hashserv: Refactor to use asyncrpc
prserv: Drop obsolete python version check
asyncrpc: Add ping method
prserv: Use multiprocessing to auto start prserver
prserv: Extract daemonization from PRServer class
prserv: Handle requests in main thread
prserv: Drop unused methods
prserv: Replace XML RPC with modern asyncrpc implementation
prserv: Add connect function
lib/bb/asyncrpc/__init__.py | 31 ++ lib/bb/asyncrpc/client.py | 150 ++++++++++ lib/bb/asyncrpc/serv.py | 223 +++++++++++++++ lib/bb/siggen.py | 6 +- lib/hashserv/client.py | 147 ++-------- lib/hashserv/server.py | 210 ++------------ lib/hashserv/tests.py | 3 +- lib/prserv/serv.py | 550 ++++++++++++++---------------------- 8 files changed, 663 insertions(+), 657 deletions(-) create mode 100644 lib/bb/asyncrpc/__init__.py create mode 100644 lib/bb/asyncrpc/client.py create mode 100644 lib/bb/asyncrpc/serv.py
Signature · 1 line
2.26.2