-
-
Notifications
You must be signed in to change notification settings - Fork 178
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
Decouple preCICE and solver in adapter via proxy #2003
Comments
I understand the problem, but I think that it is not that prominent, and such a solution would only introduce more problems. But a very interesting idea, for sure. We have already done some work in making the binaries more isolated, and I think we should continue thinking in this direction. |
If you are in a situation where a closed-source code links to an ancient version of one of our dependencies such as Boost, and you cannot patch preCICE to work with this dependency or you run into ODR violations as you don't know the exact configuration of the dependency, then one of your last options is to do something like this. In this case, it may be a worthy price to pay. Alternative would be to write files and wrap the whole executable with a preCICE adapter, which may be a way more practicable approach to this. |
Ah, now I understand that you mean this as an additional feature, not redesigning the whole API. In that case, yes, why not (besides the effort to develop and maintain). This means that a closed-source code would already be coupled with preCICE, and we would only change the API implementation to support upgrading. I don't know of any such case at the moment. |
I see this issue primary as "documentation of consideration". We know that in some situation, direct coupling with preCICE is extremely hard. Using such a proxy could be an option to implement this.
The premise of this issue is that it is not possible to couple the closed-source code due to conflicts of dependencies or similar. Hence, an adapter could be planned, but not implemented. Coupling to the REST-API would be the first possible step to implementing a coupling with preCICE. Looking at the sequence diagram in OP, the adapter and the proxy are running in different processes and communicate via a TCP connection. |
I understand the technical aspects. But I still see a lot of "could", "maybe", and "what if" in this discussion. Good to document the idea anyway, who knows what future brings. 👍 |
Please describe the problem you are trying to solve.
We repeatedly have issues with "systems" that ship their own libraries. These can conflict with the libraries used to build preCICE. Examples are:
Describe the solution you propose.
Decouple the preCICE library from the solver via a proxy server.
The proxy links to/uses preCICE and accepts commands via a REST API.
This way, the solver is decoupled from preCICE. There are no library conflicts between the two. The only dependency, the adapter adds to the solver is a sockets library and some format parser.
The downsides:
Describe alternatives you've considered
Theoretically, preCICE is already decoupled from other solvers using TCP/IP connections.
preCICE can be built against the solver-provided libraries. Different preCICE builds of the same preCICE version should be compatible. However, this is extremely fragile.
Further context
This is by no means a feature request. This issue purely exists for the sake of documentation and discussion.
The text was updated successfully, but these errors were encountered: