Skip to content

RFC Bitbake Hash Server WebSockets and Alternate Database Backend

Joshua Watt bitbake-devel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 RFC Latest12 patches 0 repliesNew

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12asyncrpc: Abstract socketsbitbake/lib/bb/asyncrpc/__init__.py bitbake/lib/bb/asyncrpc/client.py bitbake/lib/bb/asyncrpc/connection.py +7 more+378 -3470 replies
2/12hashserv: Add remove APIbitbake/lib/hashserv/client.py bitbake/lib/hashserv/server.py bitbake/lib/hashserv/tests.py+66 -00 replies
3/12bitbake-hashclient: Add remove subcommandbitbake/bin/bitbake-hashclient+13 -00 replies
4/12hashserv: Add websocket connection implementationbitbake/lib/bb/asyncrpc/client.py bitbake/lib/bb/asyncrpc/connection.py bitbake/lib/bb/asyncrpc/serv.py +3 more+137 -20 replies
5/12asyncrpc: Add context manager APIbitbake/bin/bitbake-hashclient bitbake/lib/bb/asyncrpc/client.py bitbake/lib/prserv/serv.py+33 -220 replies
6/12hashserv: tests: Add external database testsbitbake/lib/hashserv/tests.py+44 -100 replies
7/12asyncrpc: Prefix log messages with client infobitbake/lib/bb/asyncrpc/serv.py bitbake/lib/hashserv/server.py+22 -80 replies
8/12bitbake-hashserv: Allow arguments from environmentbitbake/bin/bitbake-hashserv+55 -200 replies
9/12hashserv: Abstract databasebitbake/lib/hashserv/__init__.py bitbake/lib/hashserv/server.py bitbake/lib/hashserv/sqlite.py+405 -3740 replies
10/12hashserv: Add SQLalchemy backendbitbake/bin/bitbake-hashserv bitbake/lib/bb/asyncrpc/connection.py bitbake/lib/hashserv/__init__.py +2 more+326 -50 replies
11/12contrib: Update hashserv Dockerfilebitbake/contrib/hashserv/Dockerfile bitbake/contrib/hashserv/requirements.txt+29 -90 replies
12/12contrib: hashserv: Add docker-composebitbake/contrib/hashserv/docker-compose bitbake/contrib/hashserv/docker-compose.yaml+47 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [bitbake-devel][RFC v2 00/12] Bitbake Hash Server WebSockets and Alternate Database Backend

This patch series reworks the bitbake asyncrpc API to add a WebSockets implementation for both the client and server. The hash equivalence server is updated to allow using this new API (the PR server can also be updated in the future if desired).

In addition, the database backed for the hash equivalence server is abstracted so that sqlalchemy can optionally be used instead of sqlite. This allows using "big metal" databases as the backend, which allows the hash equivalence server to scale to a large number of queries.

Note that both websockets and sqlalchemy require 3rd party python modules to function. However, these modules are optional unless the user desires to use the APIs.

Joshua Watt (12):
asyncrpc: Abstract sockets
hashserv: Add remove API
bitbake-hashclient: Add remove subcommand
hashserv: Add websocket connection implementation
asyncrpc: Add context manager API
hashserv: tests: Add external database tests
asyncrpc: Prefix log messages with client info
bitbake-hashserv: Allow arguments from environment
hashserv: Abstract database
hashserv: Add SQLalchemy backend
contrib: Update hashserv Dockerfile
contrib: hashserv: Add docker-compose

 bitbake/bin/bitbake-hashclient               |  49 +-
 bitbake/bin/bitbake-hashserv                 |  87 ++-
 bitbake/contrib/hashserv/Dockerfile          |  33 +-
 bitbake/contrib/hashserv/docker-compose      |  11 +
 bitbake/contrib/hashserv/docker-compose.yaml |  36 ++
 bitbake/contrib/hashserv/requirements.txt    |   5 +
 bitbake/lib/bb/asyncrpc/__init__.py          |  32 +-
 bitbake/lib/bb/asyncrpc/client.py            | 100 ++--
 bitbake/lib/bb/asyncrpc/connection.py        | 146 ++++++
 bitbake/lib/bb/asyncrpc/exceptions.py        |  17 +
 bitbake/lib/bb/asyncrpc/serv.py              | 349 +++++++-----
 bitbake/lib/hashserv/__init__.py             | 137 ++---
 bitbake/lib/hashserv/client.py               |  40 +-
 bitbake/lib/hashserv/server.py               | 525 +++++++------------
 bitbake/lib/hashserv/sqlalchemy.py           | 268 ++++++++++
 bitbake/lib/hashserv/sqlite.py               | 229 ++++++++
 bitbake/lib/hashserv/tests.py                | 123 ++++-
 bitbake/lib/prserv/client.py                 |   8 +-
 bitbake/lib/prserv/serv.py                   |  37 +-
 19 files changed, 1495 insertions(+), 737 deletions(-)
 create mode 100755 bitbake/contrib/hashserv/docker-compose
 create mode 100644 bitbake/contrib/hashserv/docker-compose.yaml
 create mode 100644 bitbake/contrib/hashserv/requirements.txt
 create mode 100644 bitbake/lib/bb/asyncrpc/connection.py
 create mode 100644 bitbake/lib/bb/asyncrpc/exceptions.py
 create mode 100644 bitbake/lib/hashserv/sqlalchemy.py
 create mode 100644 bitbake/lib/hashserv/sqlite.py
Signature · 1 line
2.34.1