-
Notifications
You must be signed in to change notification settings - Fork 18
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
Consider changing to/giving option of couchDB? #212
Comments
Sure, it's a good idea. I think the best would be to abstract more the database access. Some document-based database like Hyperdex has compatible MongoDB compatible database http://hackingdistributed.com/2015/01/12/hyperdex-1.6.0/ . Maybe we should start together to abstract more the database access. Then we see if can split the Document-based access compared to the key-value store access. |
replace posts with ajax requests
Have you ever considered using a more structured DB, e.g. a traditional relational DB? |
We will start migration to Postgres soon |
Stale issue message |
When is the postgres migration planned? |
Not as far as I'm aware off. |
@P-T-I If you have any migration plan, I would like to spend some weeks executing it. I have experience in MongoDB, PostgreSQL, and ElasticSearch. As I see that the cve-search code base is a little bit messy, so a complete rework is needed, maybe a |
@baonq-me Well there where some thoughts (also briefly discussed with @oh2fih) stripping cve-search from all backend code and keep it solely as a front end; then let CveXplore handle all the backend code. So in that case moving towards as little overlap between the two as possible (probably taking care of the messy code base in the process) and let the users choose based on their requirements; if they prefer to work on the cli they would only need to use CveXplore and if they would like a GUI they could simply add cve-search to the mix. So any new database logic should be added to cvexplore. For me this split up in functionality makes sense, so you agree? So coming back on the topic; I believe a sql backend is a nice addition too. But I wouldn't narrow it towards postgres, I would opt for a SqlAlchemy ORM model approach so you could use a variety of sql databases (MySQL, mariadb, postgres etc). |
I agree that letting CveXplore handle all the backend code is a good choice in terms of maintainability. Let's do a quick analysis: As I know, there are three kinds of users:
This analysis led me to the idea that we can use the SqlAlchemy ORM model as you said.
Here are my additional ideas for this big refactor:
|
Agreed with those three groups; I believe for the first CveXplore alone should suffice; for the second both CveXplore and CveSearch should be needed and for the third either CveSearch or CveXplore could suffice depending on 'how' you would facilitate 3rd party integration (CveSearch HTTP API or via the the CveXplore package)
I like this idea; especially the push towards a message queue (Kafka would be the defacto goto I guess). These functionalities should be added into the CveXplore functionality, right?
I'm reluctant to actually add a database dump into the code base (I know I've done this in the CVE-Search-Docker repo); I would opt in hosting database dumps externally, which might already could be provided by the vulnerability-lookup project.
Although I agree; I do not see a way around this; once this path of decoupling is taken, there is no way back. For the long term I would say the configuration effort, maintainability and de-duplication of code benefits outweighs the 'high dependency' downfall. I would suggest we move this discussion into a new project / issue list in the cve-search/CveXplore repo, agreed? If so, I'll transfer this issue into the cve-search/CveXplore repo |
I can update
I agree |
Which specific demonstration are you talking about? |
FWIW, my concern with MongoDB was/is that this is no longer using an open source license. |
Here is my reference architecture. In my use case, Of course, I can add more code to |
Looks very nice; I'll give a more detailed response in an hour or so, let me get to the office first ;-) |
I agree both. I think we can narrow down those ideas to a more detailed task list that needs to be done. |
Ageed; I'll start on that task list right away (in random order), please append as you see fit, I'll create a new issue: #213 as a master issue to track the work |
@pombredanne any specific database whishes? |
closing in favor of #213 |
Should we consider merging to couchDB, or making CVE-Search compatible with both?
I have heard a lot of negative comments about Mongo, and it would be neat to give multiple database options.
Also, the database layer should be abstracted a lot more as well. (I can do this)
My idea would be to make a database abstraction layer, which implements functions for both mongo, couch, postgres,... (we could further this if we see fit), and then we might be able to change databases with the configuration files.
Your thoughts? @adulau @wimremes
The text was updated successfully, but these errors were encountered: