LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-08-2021, 03:37 AM   #1
tuxuser1
Member
 
Registered: Nov 2021
Posts: 167

Rep: Reputation: Disabled
Interprocess communication question


Hi,

I'm writing a daemon which populates a data structure (actually it's a real struct type).
Now, there are other little programs (client) which could want read and write on this struct which is located in memory.
You can see this daemon as a server which can access to this little data base.
I'm reading the pipe, named pipe, shared memory, socket etc etc.
Which is the best solution for this use case?
Any advices?

Regards
 
Old 12-08-2021, 03:40 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,068

Rep: Reputation: 7363Reputation: 7363Reputation: 7363Reputation: 7363Reputation: 7363Reputation: 7363Reputation: 7363Reputation: 7363Reputation: 7363Reputation: 7363Reputation: 7363
there is no best solution. It always depends on the actual use cases, the structure of database, the amount of data and other details.
 
Old 12-08-2021, 04:30 AM   #3
tuxuser1
Member
 
Registered: Nov 2021
Posts: 167

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
there is no best solution. It always depends on the actual use cases, the structure of database, the amount of data and other details.
The data base is a simple struct type which contains an array.
The client could be update, remove or add the array entries.
Each array entry is basically another struct type which contains strings, boolean value etc etc....for which i think that the amount the data is very small.
For "the best solution", I mean the appropriate solution.
I don't know what else i have to add to define this use case...
 
Old 12-08-2021, 10:30 AM   #4
boughtonp
Senior Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 3,633

Rep: Reputation: 2558Reputation: 2558Reputation: 2558Reputation: 2558Reputation: 2558Reputation: 2558Reputation: 2558Reputation: 2558Reputation: 2558Reputation: 2558Reputation: 2558

I don't know if I understand the question. Are you asking the best way to write an in-memory data structure store?

The best solution is to use an already written, tested, and documented solution, such as Redis.

 
Old 12-08-2021, 10:35 AM   #5
tuxuser1
Member
 
Registered: Nov 2021
Posts: 167

Original Poster
Rep: Reputation: Disabled
I resolved in other way.
The daemon can expose some functions via DBUS.
Mark as solved.
Thanks all
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What is interprocess communication Ashok_mittal Linux - Kernel 2 12-12-2007 04:04 AM
What is interprocess communication Ashok_mittal Linux - Newbie 1 12-12-2007 04:00 AM
Cross-platform interprocess communication ondrej.ilcik Programming 2 01-30-2004 04:04 AM
Interprocess Communication in linux. hemanexp Linux - Software 0 01-16-2004 06:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration