×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User
    Join Date
    Aug 2006
    Posts
    20

    Question IPC to use in case of large data transfer

    Hi,

    I want to pass large amount of data in order of 1mb between two processes running in the same machine. I want to implement an Interprocess mechanism without using client server and files.

    Can anyone suggest which IPC mechanism will be best in this case? Will it be proper to use message que or system wide global variable? I would like to use a descriptor as a message structure, but the amout of data i need to transact is huge and needs to be transferred at one go! any idea? how do i implement the requirement? Is there any alternatives within IPC mechanism?

    Thanks in advance.

    Arunangshu

  2. #2
    Registered User
    Join Date
    Apr 2005
    Location
    Barcelona
    Posts
    1,678

    Re: IPC to use in case of large data transfer

    One option is shared memory. See RChunk in the sdk docs for some pointers.

  3. #3
    Registered User
    Join Date
    Aug 2006
    Posts
    20

    Re: IPC to use in case of large data transfer

    Hi,

    Yes, but I also need to get notified whenever the data is added into shared memory region,it is not mandetory, as for now,to send data at one go. There is no notification service available in RChunk.

    If i use message que in order to transfer data between processes repeatedly; as and when required.

    In that case, is it possible to send large data (say of the order of 500Kb) using message que?

    I will be grateful if you clarify !!

    Thanks,
    Arunangshu

  4. #4
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    28,567

    Re: IPC to use in case of large data transfer

    Quote Originally Posted by arunangshu
    Yes, but I also need to get notified whenever the data is added into shared memory region,it is not mandetory, as for now,to send data at one go. There is no notification service available in RChunk.
    You might try to send the notification via a parallel channel (like client-server communication, RSemaphore, etc.)

  5. #5
    Super Contributor
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644

    Re: IPC to use in case of large data transfer

    I would suggest as a previous poster did that you use a shared chunk and protect against concurrent access by using RSemaphore or RMutex. These can be accessed by a name or by duplicating the handle

    You cannot share that amount of data between processes by copying which is what you would have to do if you were doing IPC.

    Without knowing exactly what kind of data you are trying to shift, it difficult to know what to suggest.

  6. #6
    Registered User
    Join Date
    Aug 2006
    Posts
    20

    Re: IPC to use in case of large data transfer

    Quote Originally Posted by Paul.Todd
    Without knowing exactly what kind of data you are trying to shift, it difficult to know what to suggest.
    Hi Paul!

    Thanks for the reply :-) I will be passing text data. The data sturcture i would like to use while passing data is TBuf8.

    As of the concern regarding the capacity of transferring large amount of data among the processes, if i pass the data in pieces, will there be any problem in case i use IPC?

    If i use RChunk along with RSemaphore/RMutex class will i be able to share that large data chunk among two processes?

    Actually, there is a main process which will be executing other processes(exes) one after the other. now those exes, while executing, will write text data(say, error code or the results) into that shared memory area. Those datas whenever written, need to be read by the main process.

    So at a time only one process will be writing data.

    Now, what data sharing mechanism should i use in this case?

    I hope i have clearly stated the problem...

    arunangshu,

  7. #7
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    28,567

    Re: IPC to use in case of large data transfer

    Quote Originally Posted by arunangshu
    As of the concern regarding the capacity of transferring large amount of data among the processes, if i pass the data in pieces, will there be any problem in case i use IPC?
    Theoretically there should be no problems. Practically I do not know the performance limits of IPC.
    If i use RChunk along with RSemaphore/RMutex class will i be able to share that large data chunk among two processes?
    Nobody knows :-P, but it is possible to share that chunk between processes ;-)
    Actually, there is a main process which will be executing other processes(exes) one after the other. now those exes, while executing, will write text data(say, error code or the results) into that shared memory area. Those datas whenever written, need to be read by the main process.
    You should estimate the typical ammount of produced data, and the frequency of its production. And what does the recipient process do (write it into a file? send it via... SMS/UDP/TCP/RFCOMM/IRCOMM? Compress and Fourier-transform it?)?

    Indeed if you try to generate 0.5 megabytes of data 40 times a second, nothing will help.

  8. #8
    Super Contributor
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644

    Re: IPC to use in case of large data transfer

    If your data is 500k then you would be required to both read and write 500K to transfer data between processes so I expect that to be out of the question

    As I said in my previous post use RSemaphore to coordinate requests amongst processes and use the RChunk to share data between processes.

    Personally there is a wealth of data avaliable on string handling that I suggest you research as you will always get better performance from a better algorithm.

  9. #9
    Registered User
    Join Date
    Aug 2006
    Posts
    20

    Smile Re: IPC to use in case of large data transfer

    thanks, let me do some thinking on the issue...

Similar Threads

  1. Nokia 6230: data storage and data transfer
    By ripiajo in forum Mobile Java General
    Replies: 0
    Last Post: 2005-02-19, 12:21
  2. Replies: 2
    Last Post: 2004-09-15, 22:47
  3. Large data transmission PC to PC using 3310
    By mahibrahman in forum Nokia M2M
    Replies: 0
    Last Post: 2004-04-20, 10:15
  4. Transfer data to PC
    By helloworld100 in forum Mobile Java General
    Replies: 0
    Last Post: 2004-03-01, 02:19
  5. sending large amount of data over ir
    By kumardeepak in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2003-06-23, 11:08

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •