-
Notifications
You must be signed in to change notification settings - Fork 5
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
Access more spinedb_api functionality in SpineInterface #73
Comments
I think we need to wait for the actual use-case to become apparent, before implementing any of this. I know we agree that it sounds like a good idea, but it's a little bit of work to implement just in case someone wants to use it. We haven't decided if we want to write migration scripts in Julia yet. |
Well, one of the use cases was the data migration script - so we could do it in Julia rather than in toolbox... but perhaps that's not enough right now? |
It is a pretty standard techinque to provide access to certain library from other programming languages. What you need is a wrapper that translates calls from you programming language to the target library. A familiar example would be PySide2 which provides Python bindings for the Qt API. You can write the bindings manually (see e.g. Python's |
Thank you @soininen for the explanation. Ok, so this would mean 'packing' spinedb_api as a C library that can be distributed together with/made accessible to SpineInterface.jl, plus implementing/generating the julia bindings. Right? Feels powerful but nothing I would want to implement right now. |
IMPORTANT: It requires latest spinedb_api Re #73 `run_request` is the single, multipurpose entry point to do stuff on the db. Bump version.
The socket server now has a couple of additional entry points that allow one to do everything that's available in the DatabaseMapping class, so same set of db manipulations. The only caveat is we can't pass keyword args at the moment. |
What does it mean to enable a standalone socket server @DillonJ ? |
IMPORTANT: Bump require SpineInterface version Re spine-tools/SpineInterface.jl#73 The persistent db handler is gone, and now we call `open_connection` and `close_connection` on the normal handler to do the same.
Right. I agree it would be such a big focus shift that we should concentrate on spinedb_api-as-server for now.
I guess this means |
That's right, you can I think we can close this one and then open another if my API extension was insufficient, but as I said, you can now do anything that you can do with the |
I wonder if we want to provide a server 'executable' in the long run: a python script that would start the server as a daemon or service that listens to a port on localhost. The server could then be started from any other programming language. |
I think this is largely irrelevant now, but this was just a note I took from our discussion and I have absolutely no deeper knowledge than that :-) |
This was discussed at our roadmap session earlier today.
Currently SpineOpt allows us to read the contents of a data store and also gives us the functionality of
Spinedb_api.import_data
. However there are many use cases where we would like to access more api functionlity like renaming object classes for example. This would allow us to create database migration scripts within SpineInterface.A problem in all of this is that spinedb_api is written in python and we are trying to minimise use of Julia's PyCall. For this, communications between spinedb_api and SpineInterface happen via sockets where possible.
The options to expose more spinedb_api functionilty to SpineInterface were as follows:
@manuelma have I covered the options here? I may have missed something.
The text was updated successfully, but these errors were encountered: