Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Migration]: Migrate Backend from Flask to FastAPI #54

Open
1 task done
naman9271 opened this issue Feb 15, 2025 · 2 comments
Open
1 task done

[Migration]: Migrate Backend from Flask to FastAPI #54

naman9271 opened this issue Feb 15, 2025 · 2 comments

Comments

@naman9271
Copy link


Migrate Backend from Flask to FastAPI

Overview

GDB stands for GNU Debugger. It's a powerful and popular debugger for various programming languages including C, C++, Ada, and others. It allows developers to observe what a program is doing while it's running—this is particularly useful for debugging and fixing code issues.

Currently, the GDB-UI backend is implemented using Flask. While Flask is great for small to medium projects, it may not be sustainable in the long run as the project scales and requires more concurrent processing. After reviewing the use case and future needs, migrating to FastAPI is proposed due to its modern features, asynchronous capabilities, and overall performance improvements.

🔥 Limitations of Flask:

  • Synchronous by default 🚫: Flask's synchronous nature can cause performance bottlenecks, especially when handling concurrent API requests.
  • No built-in async support ⏳: Requires additional configurations for async operations.
  • Manual request validation 🛑: Flask lacks built-in request data validation, requiring third-party libraries.

Advantages of FastAPI:

  • High Performance 🚀: FastAPI is built on ASGI and uses async/await, making it significantly faster than Flask.
  • Automatic Request Validation ✅: Uses Pydantic for request and response validation, reducing boilerplate code.
  • Built-in Documentation 📖: Auto-generates OpenAPI (Swagger UI) and ReDoc documentation without extra effort.
  • Asynchronous Support 🏗️: Efficiently handles multiple requests concurrently, improving response time for ML model inference.

Additional Context

  • Feedback & Discussion: We welcome input from the team to address any concerns or suggestions regarding this migration.
  • Infrastructure Impact: Review potential changes needed in deployment infrastructure to accommodate FastAPI.
  • Long-Term Benefits: The migration aims to future-proof the backend, enabling better handling of increased load and enhanced functionality.

Let's discuss and finalize the approach to ensure that this migration will enhance the sustainability and performance of the GDB-UI backend.


  • Yes , I am willing to submit a PR for this issue
@naman9271
Copy link
Author

hey @Shubh942 @Niweera @sonodew please assign this issue or review it so i start working upon this

@naman9271
Copy link
Author

@Shubh942 do you need this change ???

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

No branches or pull requests

1 participant