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

Support databases other than JDBC #78

Open
tzipperle opened this issue Jul 31, 2018 · 5 comments
Open

Support databases other than JDBC #78

tzipperle opened this issue Jul 31, 2018 · 5 comments
Labels
enh New features & functionality help welcome

Comments

@tzipperle
Copy link

Are there plans to support open-source relational database management systems (e.g. MySQL)?

@danielhuppmann
Copy link
Member

We currently have half an implementation using PostGreSQL, where half means that it should be fully operational but no-one has really used it in an actual workflow. However, you can open an HSQLDB-database using free software like the DbVisualizer...

@khaeru khaeru changed the title Database support Support databases other than JDBC Aug 9, 2019
@khaeru khaeru added enh New features & functionality help welcome labels Aug 9, 2019
@khaeru
Copy link
Member

khaeru commented Aug 9, 2019

To slightly hijack this issue and add a few points:

  • A similar but broader target is to decouple the Platform and Scenario classes from the ixmp_source/Java backend.
  • With a Backend class defined, Platform/Scenario would depend on the Backend interface, but not care what happened behind it.
  • The current ixmp_source (perhaps named “JDBCBackend” or similar) would continue to provide both remote (Oracle) and local (HSQLDB) connections.
  • Other backends e.g. PostgresBackend, MySQLBackend, FileBackend, etc. could then be developed by anyone motivated to do so.
  • This is related to Support non-GAMS models #119, which is about the interface to models/solvers rather than databases/storage.
  • FWIW HSQLDB is already an “open-source relational database management system” under the BSD license. It is true that it's not currently possible to use a non-local open-source RDBMS. To make use of ixmp based on 100% open-source software, other missing pieces might be:

@zikolach
Copy link
Contributor

@khaeru sorry for maybe outdated comment on your previous comment:

  • decoupling is great idea (slightly different though - it could be something like direct (using ixmp jdbc DAO classes) and remote (using HTTP API)
  • there should not be distinction on python side between different db implementations (as there is already such thing exist in java code)
  • currently supported hsqldb, oracle and postgresql
  • aim of python package is to provide flexibility to implement different models in addition to message and integration with python ecosystem (like tools for data analysis and visualization)
  • support of different solvers might need to be implemented on java side (as e.g. persisting additional data structures in addition to gams ones (parameters, variables etc), timeseries data, layers references)

I hope it does make sense.

@khaeru
Copy link
Member

khaeru commented Nov 7, 2019

@tzipperle note that:

¹ caveat: per iiasa/message_ix#254, there is still work to be done to handle the GDX input/output in Python rather than the Java code underlying JDBCBackend.

@khaeru
Copy link
Member

khaeru commented Aug 27, 2020

The branch backend-xarray contains some experimental code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enh New features & functionality help welcome
Projects
None yet
Development

No branches or pull requests

4 participants