question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Review and refactor configuration for runtime components

See original GitHub issue

Inconsistencies

Sandbox, JSON API, Extractor and Navigator share some common configuration settings (but use different names for these settings), e.g:

  • ledger host (can be shared via daml.yaml)
  • ledger port (can be shared)
  • wall clock time (can be shared)
  • max inbound message size (can be shared)
  • ledger ID (can be shared)
  • max TTL seconds (can be shared)
  • PostresSQL backend configuration (each process uses it for different purposes, for different DB instances, but do it inconsistently)

Sandbox currently does not require username/password, JSON API does, don’t know about Extractor. I strongly believe username/password should be required.

We currently specify PostgreSQL username/password via a command line option, which is not secure, anyone who has access to the machine can do ps -aef and get this username/password.

There is #3147 issue, which talks about adding support for ledger host/port configuration via daml.yaml.

Proposal

We should:

  1. remove command line configuration options and rely on daml.yaml only
  2. standardize common ledger configuration settings and share the ledger config across all DAML assistant components.

We can standardize the command line options too, but it would simplify the main method logic if we only support daml.yaml configuration with an additional option that allows overriding the path to the default configuration, something like: --config-file=<path-to-file-to-override-default-daml-yaml-config>

CC @S11001001 @lima-da @hurryabit @gerolf-da

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
hurryabitcommented, Feb 20, 2020

To emphasize what @cocreature said, daml.yaml is an SDK concern and not be present on platform deployments. Maybe doing it the other way around and only supporting command-line arguments for the platform components (Sandbox and JSON API) and teach daml-helper how to forward them makes more sense. However, to make this pleasant we still need to standardize the command line flags. IMO, Navigator is an SDK tool and should not end up on deployed platforms. I’m not sure about the future plans for extractor.

0reactions
stefanobaghino-dacommented, Mar 15, 2022

At this point, aligning the configuration with Canton’s is also important.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Refactoring source code in Visual Studio Code
Source code refactoring can improve the quality and maintainability of your project by restructuring your code while not modifying the runtime behavior. Visual ......
Read more >
bot components by joshgummersall · Pull Request #3471 ...
Fixes the bulk of #3453 Make service construction sync to better interop with existing services Move to Bot Components instead of ComponentRegistration.
Read more >
Using models to dynamically refactor runtime code
In this work we describe an approach to updating Java software at runtime through the use of runtime models consisting of UML class...
Read more >
Binary Refactoring: Improving Code Behind the Scenes
We present Binary Refactoring: a software engineering technique for improving the implementation of programs without modifying their source code.
Read more >
Refactor into discrete services pattern - IBM
Refactor elements of an IBM Z® application into discrete services. ... Where required, refactored services can be deployed in the same runtime environment ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found