Coder Social home page Coder Social logo

Add “temporary” mode about mtools HOT 2 OPEN

FGasper avatar FGasper commented on July 21, 2024
Add “temporary” mode

from mtools.

Comments (2)

stennie avatar stennie commented on July 21, 2024

Hi @FGasper,

I think launching multiple non-forking processes adds unnecessary complexity versus the current approach of forking. The data & log paths for an mlaunch deployment share a top-level base directory, so mlaunch kill and rm -rf mlaunchdir/ seems straightforward for cleaning up processes and data. If you want to use a RAM drive or preferred base path, mlaunch init --dir DIR should be useful.

As far as binding all services to port 0 goes: I'm not sure if that would work with a replica set or sharded cluster running on the same host (which would really be the main use case for mlaunch). There is a --port option to set the starting port number if you have prefer not to use the defaults or have multiple deployments running concurrently.

Regards,
Stennie

from mtools.

FGasper avatar FGasper commented on July 21, 2024

@stennie My experience has been that deterministic ports/dirs lead to conflicts: I forget whether I have mongo running, which port(s), where the data dirs are, etc.

It would simplify my own use of this tool greatly if I didn’t have to worry about predetermining ports or storage, and if mlaunch stayed running as long as the mongo instances do: that way there’s minimal chance of cruft corrupting test runs or such.

mongod and mongos do both respond appropriately to --port 0 (on macOS & Linux, anyhow … not sure about Windows). The actual bound port can be found in the log.

Anyhow, thank you for your consideration. :)

from mtools.

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.