From efb038b6f9f268f4a4b34f08427ba39a8691fd74 Mon Sep 17 00:00:00 2001 From: Wei Ouyang Date: Mon, 25 Nov 2024 23:41:05 -0800 Subject: [PATCH] Improve redis event bus (#718) * small fix * Improve the speed * Fix tests * Fix teardown * Fix file count * small fix --- CHANGELOG.md | 6 ++ docs/getting-started.md | 2 +- docs/migration-guide.md | 10 +-- docs/service-type-annotation.md | 2 +- helm-charts/aks-hypha.md | 2 +- helm-charts/hypha-server/Chart.yaml | 2 +- helm-charts/hypha-server/values.yaml | 2 +- hypha/VERSION | 2 +- hypha/artifact.py | 79 ++++++++++--------- hypha/core/__init__.py | 74 ++++++++++------- hypha/core/store.py | 7 ++ .../hypha-core-app/hypha-app-webpython.js | 2 +- hypha/templates/ws/index.html | 4 +- hypha/websocket.py | 25 ++++-- pytest.ini | 5 +- requirements.txt | 2 +- setup.py | 2 +- tests/test_artifact.py | 19 +++-- 18 files changed, 148 insertions(+), 99 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c4c6669..494ca152 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Hypha Change Log +### 0.20.40 + + - Add vector store service to support vector search and retrieval. + - Fix zenodo file upload issue + - Speed up server by removing the `asyncio.sleep(0.01)` throttling and support concurrent handling of events in the redis event bus. + ### 0.20.39 - Revise artifact manager to use artifact id as the primary key, remove `prefix` based keys. diff --git a/docs/getting-started.md b/docs/getting-started.md index eb1fdaed..6db5031c 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -220,7 +220,7 @@ svc = await get_remote_service("http://localhost:9527/ws-user-scintillating-lawy Include the following script in your HTML file to load the `hypha-rpc` client: ```html - + ``` Use the following code in JavaScript to connect to the server and access an existing service: diff --git a/docs/migration-guide.md b/docs/migration-guide.md index 7ad14308..5be913e4 100644 --- a/docs/migration-guide.md +++ b/docs/migration-guide.md @@ -15,7 +15,7 @@ To connect to the server, instead of installing the `imjoy-rpc` module, you will pip install -U hypha-rpc # new install ``` -We also changed our versioning strategy, we use the same version number for the server and client, so it's easier to match the client and server versions. For example, `hypha-rpc` version `0.20.39` is compatible with Hypha server version `0.20.39`. +We also changed our versioning strategy, we use the same version number for the server and client, so it's easier to match the client and server versions. For example, `hypha-rpc` version `0.20.40` is compatible with Hypha server version `0.20.40`. #### 2. Change the imports to use `hypha-rpc` @@ -128,10 +128,10 @@ loop.run_forever() To connect to the server, instead of using the `imjoy-rpc` module, you will need to use the `hypha-rpc` module. The `hypha-rpc` module is a standalone module that provides the RPC connection to the Hypha server. You can include it in your HTML using a script tag: ```html - + ``` -We also changed our versioning strategy, we use the same version number for the server and client, so it's easier to match the client and server versions. For example, `hypha-rpc` version `0.20.39` is compatible with Hypha server version `0.20.39`. +We also changed our versioning strategy, we use the same version number for the server and client, so it's easier to match the client and server versions. For example, `hypha-rpc` version `0.20.40` is compatible with Hypha server version `0.20.40`. #### 2. Change the connection method and use camelCase for service function names @@ -149,7 +149,7 @@ Here is a suggested list of search and replace operations to update your code: Here is an example of how the updated code might look: ```html - + + +