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

Consider using SQLite for the database #15

Closed
drusteeby opened this issue Jul 25, 2023 · 11 comments
Closed

Consider using SQLite for the database #15

drusteeby opened this issue Jul 25, 2023 · 11 comments
Labels
enhancement New feature or request

Comments

@drusteeby
Copy link
Collaborator

SQLLite would allow the database to be stored as a local file and not require installation of any SQL server programs. More investigation required.

@drusteeby drusteeby added the enhancement New feature or request label Jul 25, 2023
@eabase
Copy link

eabase commented Jul 27, 2023

I was initially thinking about this, but AFAICR there are some MS SQL specific items, that I did not know how to replicate.
Noting that I am in no way a MS SQL expert, but know SQLite3 very well. Another cool thing about SQLite is that it can be run completely in memory.

@silahian
Copy link
Owner

silahian commented Jul 27, 2023

Thanks for the suggestion.
Initially, this system was designed to run inside a corporation infrastructure, so MS SQL Server was used. But we always had in mind to ideally, make it provider-independent.
So, if we can make that happen would be the best scenario. Where we can choose from different database providers.

What do you guys think?

@drusteeby
Copy link
Collaborator Author

I am not an expert in either SQLLite or MS SQL server so I'm using this as a learning experience.

What I do know is that a corporation is likely to be very hesitatnt to hook up a random project to their database server without thorough vetting. Another point is removing the requirement to install a SQL Server will make it much easier for new people to engage with the project.

@silahian
Copy link
Owner

Yes, I agree that MS SQL will be a high friction point.
I would like to brainstorm around using entity framework (EF) and allow any type DB
As far as I know, "EF Core" (we are using just EF) supports seamless integration with databases like: MS SQL Server, MySQL, SQLite, PostgreSQL and more.

Having all that, users can choose any db engine

@ramateur
Copy link
Contributor

Is there any decision about db interface? EF core seems to be a suitable framework.

@silahian
Copy link
Owner

yes, this has changed.
For now, the database access has been moved and encapsulated into the MSSQLServerTradesRetriever class.
However, since the plugin architecture feature was added, I will move the whole class into an external plugin.
So, users will be able to choose how to get "trades" and "positions", which was the reason why we held in DBs.

This will allow us to take out any dependency on databases in the main project.

@ramateur
Copy link
Contributor

So, are all dataretrivers will be realized as plugins? And what about strategy interface? Especially external strategies written with python or c for example.

@HereticSK
Copy link

+1. It would be great if this can integrate with other language than C#

@silahian
Copy link
Owner

So, are all dataretrivers will be realized as plugins?

YES

The strategy interface will be also designed as a plugin, but this time as a UI plugin. I need to think about how exactly. I'm open to new ideas :)

@ramateur
Copy link
Contributor

I have an idea of a strategy as a blackbox, which receives configuration then gets market data and sends signals (buy, sell, hold, etc.)

@silahian
Copy link
Owner

silahian commented Feb 5, 2024

I'm closing this, since we are not dependent on DB any more.
In case anyone needs a database, it could be added as a plug-in instead.

@silahian silahian closed this as completed Feb 5, 2024
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

5 participants