Giter Club home page Giter Club logo

Comments (4)

mortensorensen avatar mortensorensen commented on June 12, 2024

Does 'startp'/'start.csv' solve this? By default all configuration should be set in a config file. Any remaining config which can't be set from a file should be defined in 'start.csv'.

from poetiq.

danielkrizian avatar danielkrizian commented on June 12, 2024

Yes that would be the solution. In the present implementation, startp launches set of processes. We might want to make it more flexible.
Yesterday with @tdfirth we have white-boarded two types of config files (btw q files with namespaces, resembling `config/settings/x.q):

  1. process config - `get(a.k.a load or pull or sync) at initialisation phase of the process; specified by admin/developer;
  2. strategy config - `set (a.k.a push or async) at configuration phase to (re)define behavior of different, already initialised components/processes; set by user; example: use equal weight portfolio construction, later change over life of the strategy to market cap weighted
  3. developer config (terminal multiplexing, graphical preferences etc) - completely custom preferences and specific to each developer tastes and environment.

The advantage of q files is that lists don't impose rectangular (tabular) structure like csv and are easier to parse from, well, q, in bulk :) Environments, directory trees, namespaces - everything is a list - native citizen of q!

Will put up stuff we came up with on the wiki today.

So yeah, I definitely envisage file like:

\d .btfeed
.proc.proctype: `btfeed
.proc.name: `btfeed1
.proc.port: 5016
.other.param.to.replace.your.typical.cmd.line.argument: `iztru

\d .bttickerplant
.proc.proctype: `bttickerplant
.proc.name: `bttickerplant1
.proc.port: @[isavailable; 5012; getnextavailableportfromrange[]]

The above can be split across separate files by (\d namespace) if more convenient - i.e. default/example configuration file for each component, stored in the subdirectory of the process type, e.g. src/bttickerplant/.

q namespaces are easier to manipulate than directory trees or command line arguments.

On a related note, is it possible to spawn new process from within q using system "q torq.q -proc.type bttickerplant -p 5017" ?

from poetiq.

mortensorensen avatar mortensorensen commented on June 12, 2024

Can't 1) and 2) just be done with the normal config files in config/settings?

  1. should be loaded prior to q, so I don't think q files are an option here - they need to be parsed by Bash, which is why they're currently in CSV format.

Regarding spawning processes from within q - sure it's possible. Not quite sure if they will exit when the controlling process exits (unless prefixed with nohup).

from poetiq.

danielkrizian avatar danielkrizian commented on June 12, 2024

Can't 1) and 2) just be done with the normal config files in config/settings?

I actually want to come up with src/processtypeX/configfile.q for 1) and src/strategy/configstrategy1.q for 2).
They will just be init defaults for first, example/demo for latter - not set in stone. Hence separating 1) from 2) and away from global god-like config/settings makes sense. Another reason is that 1) get set at different stage than 2) and by different method ( 1- get, 2- set). More on this later.

  1. should be loaded prior to q, so I don't think q files are an option here

Agreed, just 1) and 2) seem to be q files.

from poetiq.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.