LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-26-2007, 02:47 AM   #1
hegdeshashi
Member
 
Registered: Dec 2005
Posts: 73
Blog Entries: 3

Rep: Reputation: 15
IPC-shared memory


HI,

I am using shared memory as my IPC.Here I am having some web pages.Using shared memory ,I am opening ,and here this web page every 30 seconds it is refreshing.And aslo,same page is used by both server and client.For Ex=rediff.com home page.If every 30 second ,it is updating means,every client can see the changes.

Now,my problem is how to update it.I mean ,how to save this ?

can any one give me some hints.

Thanks in advance.
 
Old 02-26-2007, 05:31 AM   #2
nmh+linuxquestions.o
Member
 
Registered: Feb 2007
Posts: 135

Rep: Reputation: 15
I do not understand what you are trying to do and why, so it might help for you to restate your situation/question. That said, taking your question at face value:

If you want to save the shared state to disk for later access - maybe you could have a special client process that just saves it.

If you want to update the memory with what you download, I think you can just change it and the clients should see it (if that is what you are doing/want to do, I would suggest that you investigate locking for this).
 
Old 02-26-2007, 11:02 PM   #3
hegdeshashi
Member
 
Registered: Dec 2005
Posts: 73

Original Poster
Blog Entries: 3

Rep: Reputation: 15
Hi,


I am having some web pages ,that is opened by a server,And now one client is opening a same page and that is going to update that page and same page can see by both server and client.Now ,if server is changing some thing on that page,then client can
see the updates.

So ,can anyone one give me some thing good idea?
 
Old 02-27-2007, 01:05 AM   #4
nmh+linuxquestions.o
Member
 
Registered: Feb 2007
Posts: 135

Rep: Reputation: 15
Are you talking about an HTTP server and HTTP clients?
Why do you want to use shared memory? Why not a file?

If you are talking about a mechanism to allow updating a file without restarting the server - why are you trying to impliment this on your own? Is there some reason you are not using thttpd, apache, jigsaw or some other HTTPD?

If you want to have two processes send data to each other, why not use pipes, named pipes, or specific memory segments?
 
Old 02-27-2007, 02:50 AM   #5
hegdeshashi
Member
 
Registered: Dec 2005
Posts: 73

Original Poster
Blog Entries: 3

Rep: Reputation: 15
yes,

I am using shared memory segments to store those parameter values whatever changed by server/client.

Is it not possible from shared memory, if suppose I am using some file?
 
Old 02-27-2007, 03:46 AM   #6
nmh+linuxquestions.o
Member
 
Registered: Feb 2007
Posts: 135

Rep: Reputation: 15
Quote:
Originally Posted by hegdeshashi
yes,

I am using shared memory segments to store those parameter values whatever changed by server/client.

Is it not possible from shared memory, if suppose I am using some file?
Would you be able to post a sample of your code (maybe not everything, but just a small example of what you want to do)?

I do not do much with IPC SHM, but from my understanding, there is nothing to stop you from reading what is in some portion of the SHM. Are you having trouble with that?

Moving on to the scattershot style - could you glance over
http://www-128.ibm.com/developerwork...ibrary/au-ipc/

and maybe also:
http://users.actcom.co.il/~choo/lupg...i-process.html

Do you have that much working for your IPC, or is that the part you are having difficulty with?
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
IPC msgrcv - writing overflows memory extra 4 bytes tara Programming 1 11-08-2005 11:40 PM
is shared memory expandable in memory size? Thinking Programming 4 08-16-2005 09:57 AM
IPC Memory Share - C Program - Why not exiting for(;;) ?? brunnopessoa Programming 4 09-05-2004 09:27 PM
Standard Way To Share Memory Among Processes? Sys-V IPC? overbored Programming 1 06-21-2003 01:33 PM
IPC Shared Memory support in kernel? stevho Linux - General 1 01-17-2002 07:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:22 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