Skip to content

Conversation

@jmccand
Copy link
Collaborator

@jmccand jmccand commented Dec 25, 2025

Wait to merge until after #268 !

Describe what you are trying to do
FastAPI provides a few benefits to Flask:

  • FastAPI supports asynchronous programming, which:
    • Makes it faster than Flask (latency)
    • Enables it to support a higher volume of connections (throughput)
    • Enables Shubble to asynchronize our data pipeline, which has the potential to eliminate the up-to-10 second delay detailed in Potentially long refresh times #251

Steps for review
Test everything, both on host and in docker:

  • server: uvicorn shubble:app
  • worker: python -m server.worker
  • client: npm run dev
  • test-client: cd test-client && npm run dev
  • test-server: python -m test-server.server

You can run docker compose --profile "*" up to run all in docker.

Issues
Related to #251

server/routes.py Outdated


@router.get("/api/locations")
@cache(expire=300)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this gets invalidated anymore on worker updates

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point! I decreased the cache period to 5 seconds and opened an issue for cache invalidation #273.

@jmccand jmccand requested a review from RichardJSun December 26, 2025 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants