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

Allow using a second DJ instance as a database #307

Open
aeberhart opened this issue Oct 11, 2023 · 2 comments
Open

Allow using a second DJ instance as a database #307

aeberhart opened this issue Oct 11, 2023 · 2 comments
Labels
enhancement New feature or request
Milestone

Comments

@aeberhart
Copy link
Contributor

We have three ways of interacting with remote systems:

Setting a relationship that points to another system

  • this requires a small change in the display link logic
  • we'll omit these for incoming links due to the performance impact

Using a RemoteDatabase

  • this allows writing a database adapter in another container / possibly using another language
  • configuration is done via container parameters

Using another DJ as a Database

  • similar to the solution above
  • attached system has its own ACL and user management
  • access is done via the data interface
  • sub system must be configured via UI / App
@aeberhart
Copy link
Contributor Author

aeberhart commented Oct 11, 2023

implementation notes

  • we need to replace the database and query metadata
  • the configuration requires hostname, database, user and pwd
  @Override
  public Map<String, Object> connectAndCollectMetadata() throws Exception {
    Map<String, Object> res =
        (Map<String, Object>) call("crud/config/dj-database/" + e("dj/" + this.database), null);
    res = (Map<String, Object>) res.get("tables");
    for (Entry<String, Object> entry : res.entrySet()) {
      Map<String, Object> table = (Map<String, Object>) entry.getValue();
      table.put("parent", ID);
      table.put("ID", ID + "/" + e(entry.getKey()));
      // TODO: change props also
    }
    System.out.println(res);
    return res;
  }

@aeberhart
Copy link
Contributor Author

if possible, integrate this into the RemoteDatabase driver

  • database set - remote Data
  • database not set - remote Database

@aeberhart aeberhart added the enhancement New feature or request label Jan 9, 2024
@aeberhart aeberhart added this to the backlog milestone Jul 31, 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

1 participant