Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

Sorry, you do not have permission to ask a question, You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please type your username.

Please type your E-Mail.

Please choose an appropriate title for the post.

Please choose the appropriate section so your post can be easily searched.

Please choose suitable Keywords Ex: post, video.

Browse

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise Logo Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise Logo

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise Navigation

  • Home
  • About Us
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • About Us
  • Contact Us
Home/ Questions/Q 6627

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise Latest Questions

Author
  • 60k
Author
Asked: November 27, 20242024-11-27T08:17:07+00:00 2024-11-27T08:17:07+00:00

Micro CLIs?

  • 60k

CLIs (Command-Line Interface Applications in short) are a damn useful way to facilitate automation. It has one type of input (strings) and one type of output (again strings). Simple, but very fast and effective, also loved by productivity junkies.

This is a blog on asking whether CLIs can be used along with microservices effectively. Because I used it in one of my use cases, and it resulted in major performance and stability for the overall solution.

So why CLIs in the first place? …
Well the list says

  • Doesn't take up lots of space. Generally tiny binary sizes compared to GUI counterparts.
  • Depending on the size of tasks, CLIs generally don't crash as OS usually switches to swap to free up memory when RAM is at full capacity.
  • Easier to develop

But we already have servers for that …. right?

Well, kind of …. even servers are bins and scripts running on the machine, but are very complex. A server has more points of failure than an installed binary. Also updating said binaries is a breeze, just replace the file with a new one.

So, does 1 BIG CLI app that can do all the necessary tasks on the server when deployed be enough? Well, it depends. If the number of tasks to be performed on the server is minimal, then yes. But, if there are 2 or more different tasks, that have a common task to be performed, then distributing the tasks into multiple CLI is beneficial. Let me explain this tho …

Let's say there is a pipeline setup where the repository is cloned, and built and the binary is uploaded to another path. There are 3 tasks on the top layer, they're clone, build and upload. These 3 tasks can be written into 1 binary. But, if you want to add another pipeline, with a bit different build and upload process, you may choose to add it to the same CLI using options. That will work, but in the long run, code maintenance will be complex. So, it's better to split the tasks into 2 different CLIs, one for the first pipeline and another for the second pipeline. This way, the code is easier to maintain and update.

So the clone part of the pipeline is common for both pipelines, so it can be written into a separate CLI. The build and upload part of the pipeline is different for both pipelines, so they can be written into 2 different CLIs. This way, the code for the clone can be maintained in only 1 place.

This is the basic idea of micro CLIs. They're small, simple and easy to maintain. They're also easy to update and deploy. They're also easy to test and debug. They're also easy to scale. They're also easy to monitor. They're also easy to secure. They're also easy to document. They're also easy to use. They're also easy to integrate. They're also easy to …. you get the idea.

This is how I used micro CLIs in my automation solution provided in my previous organization's hackathon. I automated a task that could be deployed by any server. The task to be automated was time-consuming and a few modules in it separately could be used by other teams' solutions to speed up their solutions. That's when I architected the solution to be a micro CLI. It worked like a charm.

backendcliwebdev
  • 0 0 Answers
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

Sidebar

Ask A Question

Stats

  • Questions 4k
  • Answers 0
  • Best Answers 0
  • Users 1k
  • Popular
  • Answers
  • Author

    How to ensure that all the routes on my Symfony ...

    • 0 Answers
  • Author

    Insights into Forms in Flask

    • 0 Answers
  • Author

    Kick Start Your Next Project With Holo Theme

    • 0 Answers

Top Members

Samantha Carter

Samantha Carter

  • 0 Questions
  • 20 Points
Begginer
Ella Lewis

Ella Lewis

  • 0 Questions
  • 20 Points
Begginer
Isaac Anderson

Isaac Anderson

  • 0 Questions
  • 20 Points
Begginer

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help

Footer

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise

Querify Question Shop: Explore, ask, and connect. Join our vibrant Q&A community today!

About Us

  • About Us
  • Contact Us
  • All Users

Legal Stuff

  • Terms of Use
  • Privacy Policy
  • Cookie Policy

Help

  • Knowledge Base
  • Support

Follow

© 2022 Querify Question. All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.