Giter Site home page Giter Site logo

Language selection about cct HOT 9 CLOSED

goldmann avatar goldmann commented on July 24, 2024
Language selection

from cct.

Comments (9)

praiskup avatar praiskup commented on July 24, 2024

If this is meant to be just a brainstorming thread, I don't like the idea of
python/golang/perl/whatever. Either POSIX shell should be used or BASH (as
those are widely available in most of the images around).

If that is not suitable, having pre-compiled C program would be also OK.

from cct.

praiskup avatar praiskup commented on July 24, 2024

In case of pre-compiled binary ("almost" without dependencies), it does not matter
what language will be chosen. The point is to not add unnecessary run-time
requirements.

from cct.

goldmann avatar goldmann commented on July 24, 2024

Yes, issues marked with discussion label are meant to be brainstorming threads.

We want to go as far away as we can from Bash/shell. In fact this is exactly the reason to create this tool. We already maintain a lot of custom shell scripts to apply modifications to our containers. This becomes a nightmare to maintain. Another thing is that it's very complicated to do some things (XML modifications) in a stable way.

C is pretty low-level. We can get same thing with golang. As a bonus we get static linking for free.

from cct.

praiskup avatar praiskup commented on July 24, 2024

We want to go as far away as we can from Bash/shell. In fact this is
exactly the reason to create this tool. We already maintain a lot of
custom shell scripts to apply modifications to our containers. This
becomes a nightmare to maintain.

Not really. Even shell scripting allows you to do maintainable, modular
and very portable software.

Another thing is that it's very complicated to do some things (XML
modifications) in a stable way.

Hmm. Yes, if some complicated stuff is really needed, additional
requirement makes sense.

C is pretty low-level. We can get same thing with golang.

Agreed.

As a bonus we get static linking for free.

This is not benefit. The static linking is maintenance nightmare and I
personally don't like golang for that. But yeah that is just IMHO.

from cct.

praiskup avatar praiskup commented on July 24, 2024

Hmm. Yes, if some complicated stuff is really needed, additional
requirement makes sense.

By that ^^ I mean that we could avoid additional "default" requirements pretty
easily and I see no benefits in "avoiding shell scripting" target. Except the
performance - but performance POV is also kind of optional, or?

from cct.

rwngwn avatar rwngwn commented on July 24, 2024

@praiskup
the main benefit of not using shell script is that tool can be easily covered by unit tests, versioned and it also will be more consistent with lesser effort. This is so hard with custom shell scripts. you know its bug difference to write a scripts which configure one application and complete configuration framework - I know all is possible in BASH but I had maintained bash scripts which implemented !!!LDAP!!! protocol and it was a nightmare so bash is great for small specific scripts but i don't like it for more general tools
And also almost no ecosystem like static analyzes, testing framework, mocking, test coverage tool doesn't exist or are not much in use in BASH ecosystem.
And to static linking - I'm not big fun of it either - BUT it is really good in a containers world, especially for stuff like this because you will get single binary which can run in almost any container and can be easily replaced and the HUGE benefit is that update of any library in container will not hit your tool - so in the layered containers is static linking for some tools really beneficial.

from cct.

rwngwn avatar rwngwn commented on July 24, 2024

Also my comment to language selection. I would love to see something like golang "runner" which will spawn language independent modules and will communicate with them via some very lightweight easily implementable RPC mechanism like 9p. In that way you;ll get:

  • robust and stable runner
  • great set of basic modules
  • easy way to implement your modules in almost any language

from cct.

vpavlin avatar vpavlin commented on July 24, 2024

+1 to the previous comment.

I am not a big fan of go either:) (Seems like no one likes it, but still it's user base id getting bigger every day:) but the static linking is a great think for containers as @l-d-j said.

We should solve problems systematically which, I think, shell scripts do not support very well - first problems I was pointing out for containers were that we migrated from initscripts to systemd units, and it was a lot of work, and now we are going to start services in containers with sort of initscripts again..but less structured, more custom...not the best way to go.

from cct.

rwngwn avatar rwngwn commented on July 24, 2024

CCT now support python2/3 + bash for modules. its basically decided

from cct.

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.