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 nova_router #85

Closed
burbas opened this issue Dec 26, 2020 · 2 comments
Closed

Refactor nova_router #85

burbas opened this issue Dec 26, 2020 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@burbas
Copy link
Contributor

burbas commented Dec 26, 2020

Today the router is structured as a gen-server with lots of handle_cast-cases. This works okay, but gets a bit complex. One suggestion is to refactor the router and move most of the parsing-actions to separate methods instead and use the gen-server as a orcestrator for routes - handling the communications with cowboy and provide an API that one clients can query to modify/remove/add routes.

Also include the suggestions from #50 when refactoring this

@burbas burbas added the enhancement New feature or request label Dec 26, 2020
@burbas burbas self-assigned this Dec 26, 2020
@Taure
Copy link
Collaborator

Taure commented Dec 26, 2020

One idea is maybe to change the file consult handling of routes. If we are doing a refactoring. If other beam languages want to use Nova and not write routes as an Erlang map. But a map representation for the beam language they use.

Not sure if we want that change. Was more a thought after doing the lfe part where they compile lfe route file to an Erlang route file.

@burbas
Copy link
Contributor Author

burbas commented Dec 26, 2020

It's not a bad idea. Just thinking if this creates unnecessary complexity, but we should be just fine if we have it as an option that defaults to file:consult.

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