Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How java implement Share Memory?

 
Dragon Liu
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my program system,I need several process exchange data each other.And the speed must be too quickly to satisfy the real time. So I think the RMI of java can not meet my need.
Who can tell me what can I do.
 
Jim Petersen
Ranch Hand
Posts: 241
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
this post (ie RMI) ain't quite right this discussion area - namely SCJP study - you'll be better served by posting to Java in General.. or the RMI/Corba sections
rgds Jim
 
Paul Anilprem
Enthuware Software Support
Ranch Hand
Posts: 3711
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your requirement is too general. Nearly all the industrial apps use some form of data sharing and not all of them use RMI/CORBA etc.
You'll need to give more details like, what kind of data is it, where is it stored, how it is modified, what do the processes do etc.
-Paul.
------------------
SCJP2, SCWCD Resources, Free Question A Day, Mock Exam Results and More!
www.jdiscuss.com
Get Certified, Guaranteed!
JQPlus - For SCJP2
JWebPlus - For SCWCD
JDevPlus - For SCJD
 
Dragon Liu
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jim Petersen:
Thanks for your advice first.
This post is the hottest post area in javaRanch.
So I think I can get reply more eventual in this post than any other post area.
 
Dragon Liu
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Paul Anil:
Thanks a lot for your response.
My industrial apps is for electric power data gather.The system
need several apps to perform different task.For example: data gather app and graphic app for mmi.All of the apps are run on the same computer.The data is from com port of computer.
To insure the response speed,the data need to be stored in memory.In c++ edition of this system,we use share memory technology to share data among apps .But java does not support point to operate memory.
RMI/CORBA can't meet the speed request.
 
Jane Griscti
Ranch Hand
Posts: 3141
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Dragon,
I'm going to move this thread to Java Intermediate as it's not related to Certification Study.
------------------
Jane Griscti
Sun Certified Programmer for the Java� 2 Platform
 
Geoffrey Falk
Ranch Hand
Posts: 171
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<blockquote>In my program system,I need several process exchange data each other.And the speed must be too quickly to satisfy the real time. So I think the RMI of java can not meet my need.
Who can tell me what can I do.
</blockquote>


Assuming all the processes run on the same JVM, you need to create a class which represents your shared memory area. Then use multiple threads to access the data in a synchronized fashion.
------------------
Sun Certified Programmer for the Java 2 Platform
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic