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

You must login to ask a question.

Forgot Password?

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

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

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

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6631195
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T22:30:43+00:00 2026-05-25T22:30:43+00:00

An existing command-line program generates some output when called with some parameters, and then

  • 0

An existing command-line program generates some output when called with some parameters, and then exits.

I would like to modify this program to run on an event loop, and listen through a public API (could be in same machine). There seem to be multiple ways of implementing this:

  • make the API external to the program and do system calls
  • turn the program into a library, and include the necessary functionality into the API itself
  • local sockets (like a TCP line server, for eg.)
  • HTTP server (producing JSON, XML, etc)

Considering efficiency under load, concurrency and scalability, what would be the best approach?

  • 1 1 Answer
  • 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

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T22:30:44+00:00Added an answer on May 25, 2026 at 10:30 pm

    Api-design also depends on the clients, maybe you can give some more information:

    • kind of client (real user, technical client polling things, etc.)
    • trust-level of clients (open to anyone, closed set of clients to be authenticated)

    Regarding scalability requirements:

    • how many users
    • expected load (peak + average)

    Another idea could be a simple ssh-server so anyone can execute the script from outside:

    $ ssh user@yourhost.com yourCLIProgram.sh -param1 value1 -param2 value2

    Then you don’t need a overhead of event-listening loop.

    What does the program do in more detail?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My command line app call looks like this: java -jar myapp.jar --output c:\test.txt c:\test.txt
I've noticed some weird behavior with NSBundle when using it in a command-line program.
I have an existing java command-line program, that takes a bazillion of arguments and
I have an existing app with a command-line interface that I'm adding a GUI
I'm writing a .NET command-line application that will migrate users from an existing database
I'd like to integrate a Python IDLE-esque command prompt interface into an existing NI-CVI
I have an existing utility application, let's call it util.exe. It's a command-line tool
Earlier I asked a question about command-line parameters to automate processing of a file
I'm making a java command line program. How can I change the contents of
This answer to Command line command to auto-kill a command after a certain amount

Explore

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

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

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.