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 990503
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T05:57:23+00:00 2026-05-16T05:57:23+00:00

i have a design issue regarding sending user data from a mobile phone app

  • 0

i have a design issue regarding sending user data from a mobile phone app to a server (Debian 5 LAMP). I need to send various details such as username , date of birth, customer order no. etc. These will be passed onto a C code app (always on process)running on the server.

I am currently using named pipes for IPC between my external mobile app and the C code server process. I have a permissions issue with this method of communication but instead of just trying to resolve this i was wondering whether i have the correct approach in the first place!

Firstly i was wondering from a design and security point of view is this an acceptable method of IPC in this case or SHOULD i be writing the data into a database and then running a cron job which reads new entries from the database and then sends these to the server process.

With my current method i am concerned that if there are a few users update at the same time some might not get access to the pipe, so maybe the entries need to be queued so in this case picking up entries from database may resolve this.

The only concern i had with this database solution was there would be a delay between receiving data from the mobile and app and passing it on unless the cron job ran every 10 seconds but then it might be running needlessly when there are no new entries.

Not having much server side experience i was just wondering whether there were any standard solutions to this issue.

I currently use the following php code (called from apache) to communicate with the server process

$pipe="/tmp/pipe";
$mode=0600;
if(file_exists($pipe))
{

   $f = fopen($pipe,"w");
   $result = fwrite($f,"some string");
   echo $result;  
}
  • 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-16T05:57:23+00:00Added an answer on May 16, 2026 at 5:57 am

    I’d probably suggest your best bet is to use a shared data store to process these requests asynchronously.

    You’ve not said how the results get back from the process to the web app, but as it seems to be a single-direction pipe, perhaps there are none.

    The technique you’ve alluded to above will not be thread-safe / process-safe, as race conditions will cause the output from different threads to be intermingled, resulting in garbage being received.

    My suggestion would be to write files into a “spool” directory – but be sure to write them under a temporary name and rename them when finished (rename is atomic, writing files is not).

    Have the daemon check for files in this directory (with a non-temporary name) and process them in whatever fashion. Optionally write the results into another directory by a similar mechanism.

    Ensure that your monitoring systems monitor the number of files in these directories, and the age of the oldest one, so that a fault is picked up.

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

Sidebar

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.