-
Notifications
You must be signed in to change notification settings - Fork 20
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 of Backend from NestJS to Go #430
Comments
I completely agree that migrating the CodePair backend to Go aligns well with Yorkie contributors' expertise, making collaboration more natural. If this proposal moves forward, I’m excited to join the migration team and contribute to building a robust Go-based backend! Once a new repository for the Go-based backend is created, I suggest we discuss key decisions like:
|
Thank you for your answer!
I understand that
|
I think fiber is a good option for the http framework. It's very fast and has some nice features. |
HTTP FrameworkAs far as I know, yes, Yorkie uses native middleware. However, this decision likely stems from its need to handle more complex logic, such as RPC connections and health checks. Here's an example of Yorkie code: mux := http.NewServeMux()
mux.Handle(v1connect.NewYorkieServiceHandler(newYorkieServer(yorkieServiceCtx, be), opts...))
mux.Handle(v1connect.NewAdminServiceHandler(newAdminServer(be, tokenManager), opts...))
mux.Handle(v1connect.NewClusterServiceHandler(newClusterServer(be, opts...)))
mux.Handle(grpchealth.NewHandler(healthChecker))
mux.Handle(httphealth.NewHandler(healthChecker)) For CodePair, if the logic mainly involves simple CRUD operations, using a framework could be a good choice to streamline development. But I’ve only worked with native HTTP handlers, so I don’t have much experience with frameworks. I trust @blurfx’s recommendation would be more informed in this case. MongoDB IntegrationSince Yorkie uses the official Additionally, I’ve been interested in exploring semantic search using vector databases for CodePair. When considering other database options, it might be valuable to account for this use case. I’ve heard that PostgreSQL offers excellent scalability and extensions for features like vector search, making it worth considering for future-proofing the architecture. |
I've used some go http frameworks like Database: I'm curious why you chose MongoDB for your existing CodePair, and what you've liked and disliked about it. |
@blurfx I chose MongoDB to utilize Yorkie’s existing database. To clarify, I am referring to supporting a new database type like |
I misread that. I understand now. |
@blurfx Could you recommend a framework? Actually, I’ve been considering using Yorkie’s architecture to accommodate contributions from Yorkie contributors. |
@devleejb I don't know the workload of CodePair server, but I can suggest the following options: Performance - Fiber I personally prefer So I think |
@devleejb @hackerwins @devleejb @window9u I have experimentally ported the backend to a Go server application using both echo and net/http for comparison, with the help of Cursor(Claude). Please note that some modules might be missing or not fully implemented. |
@krapie I’ll put together a migration plan (including target APIs, timeline, validation, etc.). I’m aiming to release version |
@sejongk I’m also curious about your thoughts. |
What would you like to be added:
The current backend is structured using NestJS, and there is a proposal to migrate it to Go. The primary reason for this migration is to engage contributors who have a stronger interest in backend development.
The migration should take into account the following considerations:
Why is this needed:
Migrating to Go may enhance our ability to attract backend-focused contributors and improve the overall performance and scalability of our application. This transition also aims to maintain functionality while leveraging Go's efficiency and capabilities.
Additional Information:
The text was updated successfully, but these errors were encountered: