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

Refactor repo to do validation in a separate backend provider #18

Open
C-Loftus opened this issue Aug 7, 2024 · 3 comments
Open

Refactor repo to do validation in a separate backend provider #18

C-Loftus opened this issue Aug 7, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@C-Loftus
Copy link
Member

C-Loftus commented Aug 7, 2024

As this application grows and we get more users it might make sense to switch the validation to a separate backend service instead of doing it in the frontend. That way it is modular and we can call it more easily from other services as an API. The frontend also limits our ability to check CSVs. If the target server does not provide the proper CORS headers, the request can fail even if the URL is valid and has valid data.

This service is probably done best in express, go chi, FastAPI, or Django depending on how much functionality we want and the long term goals of the service.

@C-Loftus C-Loftus added the enhancement New feature or request label Aug 7, 2024
@C-Loftus
Copy link
Member Author

C-Loftus commented Aug 21, 2024

Thinking about different ideas for backend providers. Think it might make iteration on the frontend a bit quicker once the CSV validation is extracted to a separate service for better separation of concerns

  • Express (or another flask-like TS backend framework) -> easiest to transfer existing code and we can instantly reuse all the CSV tests and TS types between frontend/backend; TS type system is nice

  • golang (chi) -> more work porting our existing code; fastest and best for CPU bound concurrency. Would integrate nicely with gleaner / nabu if we need to call other golang code

  • FastAPI -> quick to set up, have to port some code, have nice helpers for openapi generation, but probably best to avoid dynamic backend languages like Python

  • Django -> same as above, but nice helpers for auth / ORM. Clear patterns for growing a bigger codebase.

Not opposed to other frameworks but seems like these are the best options for our team's skillset / technical goals.

@C-Loftus
Copy link
Member Author

@webb-ben do you have any preferences/opinions on this? Once again this discussion might not be relevant for a bit later but I feel like it would be good to align on things and what you prefer

@webb-ben
Copy link
Member

golang (chi) -> more work porting our existing code; fastest and best for CPU bound concurrency. Would integrate nicely with gleaner / nabu if we need to call other golang code

Could be interesting if we plan on building more tooling around the current offerings of gleaner/nabu services

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants