You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Refactored `DeleteEventTableUseCase` to trigger a background Celery task (`delete_event_data_task`) rather than blocking the HTTP response, preventing frontend serverless timeouts.
- Added `event_id` parameter to the `DELETE /api/events/delete-event-table/{event_code}` endpoint to allow the backend to clean up associated zip directories.
- Implemented `delete_folder` in the MinIO storage adapter using `list_objects_v2` pagination to recursively wipe S3 directories.
- Updated `ITaskQueueService` and `IStorageService` ports to reflect new deletion capabilities.
- Wired the new queue dependency to the deletion use case in `di_container.py`.
- docs: Completely overhauled `README.md`, `main_api/README.md`, `inference_api/README.md`, and `workflows.md` to reflect the GCP VM + PostgreSQL deployment (removing outdated mentions of Hugging Face, Redis, MinIO, and dynamic tables).
- docs: Added missing API schemas to `main_api/README.md` (Generate ZIP, Check ZIP, Delete Event Table) and fixed request payload typos.
<i>Powered by FastAPI, Celery, PostgreSQL pgvector, and Hugging Face</i>
4
+
<i>Powered by FastAPI, Celery, PostgreSQL pgvector, and ONNX Runtime</i>
5
5
</div>
6
6
7
7
---
@@ -13,7 +13,7 @@ Eventsnap is a distributed, horizontally scalable microservice architecture desi
13
13
It is split into two main components (each with their own dedicated README files):
14
14
15
15
### 1. `main_api` (The Orchestrator)
16
-
A FastAPI server that acts as the entry point. It accepts requests, authenticates them, dynamically creates Postgres tables, and dumps background encoding tasks into RabbitMQ for Celery workers to pick up.
16
+
A FastAPI server that acts as the entry point. It accepts requests, authenticates them, saves face embeddings to Postgres, and dumps background encoding tasks into RabbitMQ for Celery workers to pick up.
17
17
18
18
### 2. `inference_api` (The GPU Worker)
19
19
A strictly mathematical, stateless ONNX Runtime container. It receives Base64 encoded photos, runs the powerful `insightface` SCRFD and ArcFace models on the NVIDIA GPU, and returns precise bounding boxes and 512-dimension `glintr100` embeddings.
@@ -25,9 +25,9 @@ A strictly mathematical, stateless ONNX Runtime container. It receives Base64 en
Bring up all the containers (Postgres DB, RabbitMQ, MinIO, Inference API, Main API, and Celery Worker). The orchestrated services will automatically wait for their database dependencies to become healthy before starting.
52
+
Bring up all the containers (Postgres DB, RabbitMQ, Storage Bucket, Inference API, Main API, and Celery Worker). The orchestrated services will automatically wait for their database dependencies to become healthy before starting.
53
53
54
54
```bash
55
55
docker compose up -d
@@ -65,8 +65,8 @@ docker compose up -d
65
65
66
66
*(For detailed sequence diagrams of the complete asynchronous system, see [workflows.md](./workflows.md))*
67
67
68
-
1. A user uploads a ZIP of an event directly via the Next.js frontend, which extracts and pushes the images into **MinIO**.
68
+
1. A user uploads a ZIP of an event directly via the Next.js frontend, which extracts and pushes the images into **Storage Bucket**.
69
69
2. The frontend hits the **Main API**`/encode-event/` endpoint, passing the `event_code` in the JSON payload.
70
70
3. The **Main API** creates a Celery Task and immediately returns a `task_id` so the user isn't stuck waiting.
71
-
4. The background **Celery Worker** picks up the task, pre-fetches images from **MinIO** using an aggressive 64-connection pool, beams them (Base64) to the **Inference API**, and bulk-inserts the generated 512D vectors directly into **PostgreSQL**.
71
+
4. The background **Celery Worker** picks up the task, pre-fetches images from **Storage Bucket** using an aggressive 64-connection pool, beams them (Base64) to the **Inference API**, and bulk-inserts the generated 512D vectors directly into **PostgreSQL**.
72
72
5. An attendee hits the **Main API**`/sort-attendee/` endpoint with their selfies and the `event_code`. The orchestrator gets the embeddings for those selfies, averages them, and executes a sub-millisecond `<=>` cosine similarity search in `pgvector` to find all photos they appear in!
Copy file name to clipboardExpand all lines: inference_api/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
The `inference_api` is an ultra-fast, stateless FastAPI server designed purely for mathematical facial processing. It uses the `insightface` library powered by `onnxruntime-gpu` (CUDA 11) to extract 512-dimension vector embeddings from raw image data.
4
4
5
-
It is designed to be horizontally scaled or deployed as a Serverless Endpoint on Hugging Face (e.g., Nvidia T4 hardware).
5
+
It is designed to be horizontally scaled or deployed on a GCP VM (e.g., Nvidia T4 hardware).
6
6
7
7
## Core Responsibilities
8
8
***Vectorization**: Converts human faces into mathematical matrices (ResNet100 model).
***`presentation/`**: FastAPI routers, schemas, and exception handlers.
20
20
21
21
---
@@ -28,7 +28,7 @@ Content-Type: application/json
28
28
```
29
29
30
30
### 1. Encode Event (Asynchronous)
31
-
Triggers the background Celery worker to download a folder from MinIO, process every image through the GPU inference API, and save the 512-dimension vector embeddings to Postgres.
31
+
Triggers the background Celery worker to download a folder from Storage Bucket, process every image through the GPU inference API, and save the 512-dimension vector embeddings to Postgres.
0 commit comments