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

  • SEARCH
  • Home
  • 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 8274763
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T07:51:00+00:00 2026-06-08T07:51:00+00:00

I have a C simulation for which I’m creating a graphical web interface. I

  • 0

I have a C simulation for which I’m creating a graphical web interface. I used HTML with ajax to call PHP, which in turn calls the shell to run the simulation. The output is then passed back to the webpage.

The script generates an output file (with a link outputted to the webpage) as well as a graph (using a call to gnu plot and referencing the output file). The webpage also allows the user to upload an input file which is used in the C simulation. All of these files are user specific.

If there is only one user on the webpage at a time, there isn’t any problem. However, if 5 people want to run the simulation at the same time, the user-specific files (output, graph, input) would all be getting overwritten and messed up.

I don’t have any MySQL experience, and I also don’t plan on saving the outputs or inputs for a given user (user can download them if he/she wishes), so I was hoping there might be a rather simple solution like, for example, generating a temporary directory on the server with some sort of identifying tag in the name based on the user’s IP address or something. This folder could then be removed some number of minutes after the simulation runs. Anyone have any ideas about something like that?

Or will I have to resort to MySQL?

Edit: It would also be okay to have something like allowing a maximum of 5 users running at the same time and then create a queue for additional users, but that might be even more difficult.

Thanks,
Josh

  • 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-06-08T07:51:03+00:00Added an answer on June 8, 2026 at 7:51 am

    You can’t do it without saving the output somewhere, so your temp dir plan is fine.

    • Assign each new user a unique id, via md5() or sha1() or whatever.
    • Pass the id to the simulator and have it create its output files in a subdirectory named by that id.
    • Render the links and image HREFs according to that id..
    • Write a cron to periodically purge the stale subdirs.

    Each person will get their own output set, on an unguessable URL.

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

Sidebar

Related Questions

I have a class (simulation) which creates an instance of another class (GUI). Inside
I have a simulation in which I need to dump large amount of data,
Reproducible example below. I have a simulation loop, within which I occasionally have rows
I have a situation in which a managed DLL calls some unmanaged DLL. I
have written a stochastic simulation in Java, which loads data from a few CSV
(Note: The project is in Python.) I'm running a simulation in which I have
I have a simulation program which repeats a set of functions in a specific
I am running a simulation in which I have objects of a class which
I have a program which performs a Monte Carlo-type simulation. Currently I have written
Basically, what I am trying to do is have a generic simulator-interface which acts

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.