-
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. |
I have outlined the goals, tasks, considerations, and discussion points for this migration (CodePair Document). Feel free to join the discussion! |
If there are no further discussions, I’d like to move on to the next tasks. :) CC. @blurfx How about using echo so we can take advantage of its large ecosystem? I also looked into chi, but I’d rather use something with a bigger community around it. |
@devleejb Great. I think echo is a good way to get things done quickly because a lot of features comes from the framework's built-in features or community. |
@devleejb |
@window9u Of course! Feel free to reach out any time when you’re stuck. |
I will be busy this week, but I think I'll be able to start working on it actively next week. There is something I can help with? |
@window9u Could you create a draft PR later? It would be better for tracking the implementation progress, and others can easily contribute to that branch. |
@krapie |
@blurfx Could you help set up an incremental deployment process? As we discussed earlier, I believe we can leverage Nginx within a Docker container. |
If you’re interested in working on it, feel free to ask me. I’ll assign the task to you!
|
Sure. I'll try it soon. |
I'll take python Implement scaffolding, please assign me that issue |
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: