-
Notifications
You must be signed in to change notification settings - Fork 44
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
Refactoring Discussion 20171Q or Gohan2 #362
Comments
Hi @nati, I'm happy to give my feedback. [2] Extension & Gode generationI feel that YAML schema and JS are good way to quickly get into prototype, but they've proven hard to maintain consistency and correctness for a larger system. It's very easy to make an error because we lack static checks when interacting with DB and Gohan also lacks abstractions in JS library to allow validation or skip unnecessary boilerplate. I don't agree with statement that
At least not with dynamic and schema driven nature of Gohan. There are a couple of approaches to build generic API servers:
In any of above cases, we may provide it with schema. Either translate our models to some schema output or use code-gen tool to generate initial Models. If we were to retain dynamic schemas while still requiring user to recompile his extensions, I fear we'd be inheriting the worst from both worlds. Meaning, we'd get no elasticity coming from dynamic schema (restricted to Go extensions) while receiving no benefit from Go being statically typed language, which is [3] OpenAPI / SwaggerI feel that we could provide better contract for UI. Single schema driving DB, API and UI view is not always the best fit. Example: OpenAPI is a good tool for documentation and it's good to provide support for it as output, but I don't think it should be put in the core, since as you've said, it would limit us. [5]?, DB handlingI'd like to suggest another nagging issue. I feel that plugging into some existing ORM would be much easier to handle than Gohan providing it's own DB layer. Gohan DB is very limited. There is no ability to express joins (unless preset in relation_property), the only filters are |
@marcin-ptaszynski Thank you for your feedback! [2] Extension & Gode generation if we allow compiling for server side code (and I feel this isn't an issue from experience with Gohan developments), code generating Typical MVC Framework would work. [3] [5] I'm thinking apply this one |
I would be nice if we can run some integration test for API functional tests using gohan framework. |
Better late than never for comment... UI Schema |
This is an issue for noting think-aloud refactoring discussion. Could you share your pain point in current design here?
I'm wondering if this may end up start new project such as Gohan2 or some small refactoring.
[1] IAM and Policy framework
Current IAM and Policy framework is really tightly coupled with OpenStack Keystone.
This would limit the possibility of this project.
We should support more flexible IAM and policy framework.
[2] Extension & Gode generation
Personally, I feel choosing Javascript for extension was the biggest mistake I made in this project.
I don't rant the Javascript language itself, but given slowness and difficulties for debugging server side logic using go-based javascript implementation, now I believe using Go is the best way in server side.
I tried to implement some MACRO language by myself, but I felt this isn't sustainable effort.
Current API logic code looks complicated to support many use-cases.
One of my goal of this project was to avoid code generation and compiling. This really works for client and WebUI, but it may not makes sense for server side codes which have custom logic on top of what Gohan provides.
so now, I believe we should build server-side code generation tool.
[3] OpenAPI / Swagger
I'm still thinking whether we should adopt OpenAPI / Swagger or not.
We may use more tool around this eco system, but the spec don't fully provides what we need..
[4] Replacing martini to Echo
Echo looks like more high performance,
The text was updated successfully, but these errors were encountered: