SlideShare une entreprise Scribd logo
1  sur  19
Pablo Basanta Val& Marisol García Valls
DREQUIEM Lab.
Universidad Carlos III de Madrid
http://www.it.uc3m.es/drequiem/
Extending Distributed Real-
Time Java with Remote
Memory Areas
Outline
 Context
 {Real-Time Java}Context
 Distributed real-time Java
 Contribution:Remote Memory Areas
 Abstraction Overview
 Developer perspective
 Empirical Evaluation
 Conclusion and Future Work
Introduction
 Industrial applications may benefit from having high-
level programming abstractions
 E.g. MDA, MDE, Java, real-time Java
 Benefits
 Reduced development time
 Kind of applications developed
 More success in producing final products/developments
 Drawbacks
 These technologies are also source of their own issues
 Less tested technology
 Lower execution performance
 Specific research niches
Real-time Java technology
 Centralized efforts
 Leading effort RTSJ (Real-Time Specification for Java)
has
 An specification , several implementations ready to be used
 An high-integrity specification for Java is ongoing
 (SCSJ) Safety Critical Specification for Java
 A specification and partial implementation
 Distributed efforts
 Leading effort DRTSJ (Distributed Real-Time
Specification for Java) is upcoming
 More immature than RTSJ:
 No specification for DRTSJ,
 Only partial prototype implementations for RMI (Java Remote
Method Invocation).
The contribution in a nutshell
 Most approaches for distributed real-time Java
are based on remote invocations included in
Java’s RMI
 Well-known distributed object model
 This paper explores another approach that may
complement the RMI previous model: Remote
Memory Areas
“An RMA is generic set of mechanism that allows
execution of remote code in a remote node”
 Technical approach:
To transform RTSJ’s MemoryAreainto remote objects
 DRTSJ may benefit from RMAs.
Remote Memory Areas
 Based on the semantics
of the enter method of
RTSJ
 This method changes the
allocation context of a
thread when calling the
method
 RMAs extend the
semantic to a distributed
system
 Applications invoke on
remote memory areas
API of a Memory Area in RTSJ
01: public abstract class MemoryArea{
02: MemoryArea(long size)
03: void enter(Runnable logic)
04: void executeInArea(Runnable logic)
05: Object newInstance();
…
06: }
Local JVM
Local JVM Remote JVM
enter( )
enter( ) enter( )
(1)
(2)
Local
invocation
Remote
invocation
ss.run();
client server
Runnable
Schedulable
Remote Memory Areas: Interface
 Based on the semantics of the enter method of
RTSJ
 This method changes the allocation context of a
thread when calling the method
 RMAs extend the semantic to a distributed system
 Applications may invoke on remote memory areas
Remote Memory Area interface
01: RemoteMemoryArea extends java.rmi.Remote{
02: Schedulable enterSchedulable(Schedulable s)
03: throws RemoteException;
04: void enterAsyncSchedulable(Schedulable s)
05: throws RemoteException;
06:}
Remote Memory Areas: Issues
 Relationship with CPU
 Server defined
 Each remote objet has its own scheduling information
 Client-propagated Scheduling information
 Mainly Priorities
 Relationship with the garbage collector
 Heap dependant on a
 Interaction with the GC
 No-heap behavior in applications that do want
 No interaction with the GC
 Very specific programming model (NhRo-paradigm)
Type of application with RMAs
 Applications are defined
 as runnable objects with scheduling
information
 Each server
 Changes its scheduling parameters
 Executes the run method
 Restores its previous state
01: public class NormalizerFilter
02: implements Runnable, Serializable, Schedulable{
03: long samples[1024]; //Input and Output
03: public void run(){
04: for (int=0;i<1024; i++){
05: samples[i]=normalize(samples, i);
06: }
07:}
Heap remote memory area
00:class RemoteHeapMemory implements
01: RemoteMemoryArea, Schedulable{
02: public RemoteHeapMemory() {
03: }
04: public Schedulable enterSchedulable(Schedulable ss)
05: { Schedulable th=set_thread_parameters(ss);
06: ss.run();
07: restore_thead_parameters(th);
08: return ss;
09: }
10: public void enterAsyncSchedulable (Schedulable ss)
11: { RealtimeThread th= threadpool.getThread();
12: set_thread_parameters(ss);
13: th.runAsync(ss);
12: return;
13: }
...
14:}
No-GC Remote Memory Area
Implementation
Objects allocated in a LTMemory Instance from the LTMemoryAreaPool
Objects allocated in a LTMemory Instance from the LTMemoryAreaPool.
00:class RemoteLTMemoryAreaPool implements
01: RemoteMemoryArea, Schedulable{
02: public RemoteLTMemoryAreaPool(int ltmemory_size,
03: int element_size) {
04: ltmpool= new LTMemoryAreaPool(size,element_size);
05: }
06: public Schedulable enterSchedulable(Schedulable ss)
07: { Schedulable th=set_thread_parameters(ss);
08: ss.run();
09: restore_thead_parameters(th);
10: return ss;
11: }
11: public void enterAsyncSchedulable (Schedulable ss)
12: { threadpool.getThread().runAsync(ss);
13: return;
14: }
...
15:}
Developer Perspective
 An industrial
inspired use-
case
 A simple
distributed
application for
control that
i) reads data,
ii) processes
these data,
iii) and stores the
data
End-to-end application deadline
ProcessDataReadData WriteOutput
input
RTSJ-JVM
Server1
RTSJ-JVM
Server2
RTSJ-JVM
Server3
outputprocess
SRC
RMA
PROC
RMA
DEST
RMA
RMI RMI RMI
RMI
Registry
SRC
RMA
PROC
RMA
DEST
RMA
RTSJ-JVM
Client
RMI
enteSch
enterSch
enterSch
Step 1 Step 2 Step 3
ThreeStepsApp
The application in a
single Runnable class
 Three is a internal
counter (scount) that
decides in which step
is the application
 All public and
serializable attributes
are transferred from a
to the server
 (namely:
05: array
04: local
02: scount
)
00: public class ThreeStepsApp
01: extends Schedulable, Serializable{
02: int scount=0;
03: ...
04: boolean local=true;
05: long[] array= null;
06: ThreeStepsApp(...){
07: array=new long[1024];
08: }
09: public void run(){
10: scount ++;
11: switch(scount)
13: {
14: case 1: //First execution
15: for (int i=0; i<1024; i++)
16: { array[i]=input();
17: }
18: break;
19: case 2: //Second execution
20: for (int i=0; i<1024; i++)
21: { array[i]=process(array[i]);
22: }
23: case 3:
24: output(array[1023]);
25: break;
26: }
27: private trace(long){ … }
28: }
Running the example
 Periodically, it runs the three steps application
 At a 32 priority which is propagated from client to
servers
01:new RealtimeThread(){
02: public void run(){
03: setSchedulingParameters
04: (PriorityParamters(32));
05: ThreeStepsApp tsc= new ThreeStepsApp();
06: RemoteMemoryArea src=lookupSrc();
07: RemoteMemoryArea proc=lookupDest();
08: RemoteMemoryArea dest=lookupRemoteHeap();
09: tsc.setSchedulingParameters
10: (PriorityParamters(8));
11: do{
12: tsc=(TestSchedulable3)src.enterSchedulable(tsc);
12: tsc=(TestSchedulable3)proc.enterSchedulable(tsc);
13: tsc=(TestSchedulable3)dest.enterSchedulable(tsc);
14: waitForTheNextPeriod();
15: }while(true);
16:}.start();
Empirical evaluation
 Derived from the previous
application
 Control benchmark application
 The extension
 + RMAs
 + Lightweight RT-RMI Extensions
 Software stack
 Oracle’ JRTS.
 Two virtual machines running on an
800 MHz processor+100 Mbps
Ethernet.
 The underlying kernel is a real-time
Linux 3.0 rt-patched kernel on a
Debian 6.0 distribution
RT-RMI extensions
Oracle JRTS
Debian 3.0 rt-patch
Intel 800 Mhz -100 Mbits
RMAs
Extension
Control Application
Empirical evaluation results
 Parametric benchmark
 Array sizes from
 100 bytes,
 to
 1E05 bytes
 Not much overhead when
compared against
traditional RMI
 Similar results
 Overhead reduces with
high data volumes
 From [15% to less than
5%] in 100 bytes to 1E5
bytes
Conclusions
 A new way of performing remote communications
was proposed
 Remote Memory Area (RMA)s based on runnable
objects
 More low-level (& flexible than traditional remote
invocations)
 RMAs was evaluated with a distributed control
applications
 With an use case three steps application
 RMAs empirical evidence showed that
 They do not produce too much overhead
Ongoing Work
 Security issues:
 Safe execution of runnable objects in
servers
 Merging the model with other
architectural models
 With support from distributable threads
 As a means to provide real-time
reconfiguration
Any questions???
http://www.it.uc3m.es/drequiem/

Contenu connexe

Similaire à Remote Memory Areas for distributed real-time Java

Shree krishna 20140214
Shree krishna 20140214Shree krishna 20140214
Shree krishna 20140214Shree Shrestha
 
Embedded Mirror Maker
Embedded Mirror MakerEmbedded Mirror Maker
Embedded Mirror MakerSimon Suo
 
(DEV204) Building High-Performance Native Cloud Apps In C++
(DEV204) Building High-Performance Native Cloud Apps In C++(DEV204) Building High-Performance Native Cloud Apps In C++
(DEV204) Building High-Performance Native Cloud Apps In C++Amazon Web Services
 
Cloud patterns - NDC Oslo 2016 - Tamir Dresher
Cloud patterns - NDC Oslo 2016 - Tamir DresherCloud patterns - NDC Oslo 2016 - Tamir Dresher
Cloud patterns - NDC Oslo 2016 - Tamir DresherTamir Dresher
 
SF Big Analytics 20191112: How to performance-tune Spark applications in larg...
SF Big Analytics 20191112: How to performance-tune Spark applications in larg...SF Big Analytics 20191112: How to performance-tune Spark applications in larg...
SF Big Analytics 20191112: How to performance-tune Spark applications in larg...Chester Chen
 
Mobility insights at Swisscom - Understanding collective mobility in Switzerland
Mobility insights at Swisscom - Understanding collective mobility in SwitzerlandMobility insights at Swisscom - Understanding collective mobility in Switzerland
Mobility insights at Swisscom - Understanding collective mobility in SwitzerlandFrançois Garillot
 
Spark Summit EU talk by Francois Garillot and Mohamed Kafsi
Spark Summit EU talk by Francois Garillot and Mohamed KafsiSpark Summit EU talk by Francois Garillot and Mohamed Kafsi
Spark Summit EU talk by Francois Garillot and Mohamed KafsiSpark Summit
 
VideoMR - A Map and Reduce Framework for Real-time Video Processing
VideoMR - A Map and Reduce Framework for Real-time Video ProcessingVideoMR - A Map and Reduce Framework for Real-time Video Processing
VideoMR - A Map and Reduce Framework for Real-time Video ProcessingMatthias Trapp
 
Java rmi example program with code
Java rmi example program with codeJava rmi example program with code
Java rmi example program with codekamal kotecha
 
ST-Toolkit, a Framework for Trajectory Data Warehousing
ST-Toolkit, a Framework for Trajectory Data WarehousingST-Toolkit, a Framework for Trajectory Data Warehousing
ST-Toolkit, a Framework for Trajectory Data WarehousingSimone Campora
 
Hadoop cluster performance profiler
Hadoop cluster performance profilerHadoop cluster performance profiler
Hadoop cluster performance profilerIhor Bobak
 
Distributes objects and Rmi
Distributes objects and RmiDistributes objects and Rmi
Distributes objects and RmiMayank Jain
 
4CS4-25-Java-Lab-Manual.pdf
4CS4-25-Java-Lab-Manual.pdf4CS4-25-Java-Lab-Manual.pdf
4CS4-25-Java-Lab-Manual.pdfamitbhachne
 

Similaire à Remote Memory Areas for distributed real-time Java (20)

Shree krishna 20140214
Shree krishna 20140214Shree krishna 20140214
Shree krishna 20140214
 
my accadanic project ppt
my accadanic project pptmy accadanic project ppt
my accadanic project ppt
 
Anti patterns
Anti patternsAnti patterns
Anti patterns
 
Embedded Mirror Maker
Embedded Mirror MakerEmbedded Mirror Maker
Embedded Mirror Maker
 
(DEV204) Building High-Performance Native Cloud Apps In C++
(DEV204) Building High-Performance Native Cloud Apps In C++(DEV204) Building High-Performance Native Cloud Apps In C++
(DEV204) Building High-Performance Native Cloud Apps In C++
 
Cloud patterns - NDC Oslo 2016 - Tamir Dresher
Cloud patterns - NDC Oslo 2016 - Tamir DresherCloud patterns - NDC Oslo 2016 - Tamir Dresher
Cloud patterns - NDC Oslo 2016 - Tamir Dresher
 
SF Big Analytics 20191112: How to performance-tune Spark applications in larg...
SF Big Analytics 20191112: How to performance-tune Spark applications in larg...SF Big Analytics 20191112: How to performance-tune Spark applications in larg...
SF Big Analytics 20191112: How to performance-tune Spark applications in larg...
 
Mobility insights at Swisscom - Understanding collective mobility in Switzerland
Mobility insights at Swisscom - Understanding collective mobility in SwitzerlandMobility insights at Swisscom - Understanding collective mobility in Switzerland
Mobility insights at Swisscom - Understanding collective mobility in Switzerland
 
Spark Summit EU talk by Francois Garillot and Mohamed Kafsi
Spark Summit EU talk by Francois Garillot and Mohamed KafsiSpark Summit EU talk by Francois Garillot and Mohamed Kafsi
Spark Summit EU talk by Francois Garillot and Mohamed Kafsi
 
VideoMR - A Map and Reduce Framework for Real-time Video Processing
VideoMR - A Map and Reduce Framework for Real-time Video ProcessingVideoMR - A Map and Reduce Framework for Real-time Video Processing
VideoMR - A Map and Reduce Framework for Real-time Video Processing
 
Enhancing the region model of RTSJ
Enhancing the region model of RTSJEnhancing the region model of RTSJ
Enhancing the region model of RTSJ
 
2011.jtr.pbasanta.
2011.jtr.pbasanta.2011.jtr.pbasanta.
2011.jtr.pbasanta.
 
Java rmi example program with code
Java rmi example program with codeJava rmi example program with code
Java rmi example program with code
 
ST-Toolkit, a Framework for Trajectory Data Warehousing
ST-Toolkit, a Framework for Trajectory Data WarehousingST-Toolkit, a Framework for Trajectory Data Warehousing
ST-Toolkit, a Framework for Trajectory Data Warehousing
 
Hadoop cluster performance profiler
Hadoop cluster performance profilerHadoop cluster performance profiler
Hadoop cluster performance profiler
 
Java
JavaJava
Java
 
Rmi
RmiRmi
Rmi
 
Distributes objects and Rmi
Distributes objects and RmiDistributes objects and Rmi
Distributes objects and Rmi
 
Ajila (1)
Ajila (1)Ajila (1)
Ajila (1)
 
4CS4-25-Java-Lab-Manual.pdf
4CS4-25-Java-Lab-Manual.pdf4CS4-25-Java-Lab-Manual.pdf
4CS4-25-Java-Lab-Manual.pdf
 

Plus de Universidad Carlos III de Madrid (9)

Tecnicas y extensiones para Java de tiempo real
Tecnicas y extensiones para Java de tiempo realTecnicas y extensiones para Java de tiempo real
Tecnicas y extensiones para Java de tiempo real
 
A simple data muling protocol
A simple data muling protocolA simple data muling protocol
A simple data muling protocol
 
Mejoras a la predictibilidad de la tecnología Java EE
Mejoras a la predictibilidad de la tecnología Java EEMejoras a la predictibilidad de la tecnología Java EE
Mejoras a la predictibilidad de la tecnología Java EE
 
Fine
FineFine
Fine
 
Basanta jtr2009
Basanta jtr2009Basanta jtr2009
Basanta jtr2009
 
No Heap Remote Objects for Distributed real-time Java
No Heap Remote Objects for Distributed real-time JavaNo Heap Remote Objects for Distributed real-time Java
No Heap Remote Objects for Distributed real-time Java
 
A synchronous scheduling service for distributed real-time Java
A synchronous scheduling service for distributed real-time JavaA synchronous scheduling service for distributed real-time Java
A synchronous scheduling service for distributed real-time Java
 
Simple asynchronous remote invocations for distributed real-time Java
Simple asynchronous remote invocations for distributed real-time JavaSimple asynchronous remote invocations for distributed real-time Java
Simple asynchronous remote invocations for distributed real-time Java
 
Pbasanta@jtres06 extendedportal
Pbasanta@jtres06 extendedportalPbasanta@jtres06 extendedportal
Pbasanta@jtres06 extendedportal
 

Dernier

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 

Dernier (20)

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 

Remote Memory Areas for distributed real-time Java

  • 1. Pablo Basanta Val& Marisol García Valls DREQUIEM Lab. Universidad Carlos III de Madrid http://www.it.uc3m.es/drequiem/ Extending Distributed Real- Time Java with Remote Memory Areas
  • 2. Outline  Context  {Real-Time Java}Context  Distributed real-time Java  Contribution:Remote Memory Areas  Abstraction Overview  Developer perspective  Empirical Evaluation  Conclusion and Future Work
  • 3. Introduction  Industrial applications may benefit from having high- level programming abstractions  E.g. MDA, MDE, Java, real-time Java  Benefits  Reduced development time  Kind of applications developed  More success in producing final products/developments  Drawbacks  These technologies are also source of their own issues  Less tested technology  Lower execution performance  Specific research niches
  • 4. Real-time Java technology  Centralized efforts  Leading effort RTSJ (Real-Time Specification for Java) has  An specification , several implementations ready to be used  An high-integrity specification for Java is ongoing  (SCSJ) Safety Critical Specification for Java  A specification and partial implementation  Distributed efforts  Leading effort DRTSJ (Distributed Real-Time Specification for Java) is upcoming  More immature than RTSJ:  No specification for DRTSJ,  Only partial prototype implementations for RMI (Java Remote Method Invocation).
  • 5. The contribution in a nutshell  Most approaches for distributed real-time Java are based on remote invocations included in Java’s RMI  Well-known distributed object model  This paper explores another approach that may complement the RMI previous model: Remote Memory Areas “An RMA is generic set of mechanism that allows execution of remote code in a remote node”  Technical approach: To transform RTSJ’s MemoryAreainto remote objects  DRTSJ may benefit from RMAs.
  • 6. Remote Memory Areas  Based on the semantics of the enter method of RTSJ  This method changes the allocation context of a thread when calling the method  RMAs extend the semantic to a distributed system  Applications invoke on remote memory areas API of a Memory Area in RTSJ 01: public abstract class MemoryArea{ 02: MemoryArea(long size) 03: void enter(Runnable logic) 04: void executeInArea(Runnable logic) 05: Object newInstance(); … 06: } Local JVM Local JVM Remote JVM enter( ) enter( ) enter( ) (1) (2) Local invocation Remote invocation ss.run(); client server Runnable Schedulable
  • 7. Remote Memory Areas: Interface  Based on the semantics of the enter method of RTSJ  This method changes the allocation context of a thread when calling the method  RMAs extend the semantic to a distributed system  Applications may invoke on remote memory areas Remote Memory Area interface 01: RemoteMemoryArea extends java.rmi.Remote{ 02: Schedulable enterSchedulable(Schedulable s) 03: throws RemoteException; 04: void enterAsyncSchedulable(Schedulable s) 05: throws RemoteException; 06:}
  • 8. Remote Memory Areas: Issues  Relationship with CPU  Server defined  Each remote objet has its own scheduling information  Client-propagated Scheduling information  Mainly Priorities  Relationship with the garbage collector  Heap dependant on a  Interaction with the GC  No-heap behavior in applications that do want  No interaction with the GC  Very specific programming model (NhRo-paradigm)
  • 9. Type of application with RMAs  Applications are defined  as runnable objects with scheduling information  Each server  Changes its scheduling parameters  Executes the run method  Restores its previous state 01: public class NormalizerFilter 02: implements Runnable, Serializable, Schedulable{ 03: long samples[1024]; //Input and Output 03: public void run(){ 04: for (int=0;i<1024; i++){ 05: samples[i]=normalize(samples, i); 06: } 07:}
  • 10. Heap remote memory area 00:class RemoteHeapMemory implements 01: RemoteMemoryArea, Schedulable{ 02: public RemoteHeapMemory() { 03: } 04: public Schedulable enterSchedulable(Schedulable ss) 05: { Schedulable th=set_thread_parameters(ss); 06: ss.run(); 07: restore_thead_parameters(th); 08: return ss; 09: } 10: public void enterAsyncSchedulable (Schedulable ss) 11: { RealtimeThread th= threadpool.getThread(); 12: set_thread_parameters(ss); 13: th.runAsync(ss); 12: return; 13: } ... 14:}
  • 11. No-GC Remote Memory Area Implementation Objects allocated in a LTMemory Instance from the LTMemoryAreaPool Objects allocated in a LTMemory Instance from the LTMemoryAreaPool. 00:class RemoteLTMemoryAreaPool implements 01: RemoteMemoryArea, Schedulable{ 02: public RemoteLTMemoryAreaPool(int ltmemory_size, 03: int element_size) { 04: ltmpool= new LTMemoryAreaPool(size,element_size); 05: } 06: public Schedulable enterSchedulable(Schedulable ss) 07: { Schedulable th=set_thread_parameters(ss); 08: ss.run(); 09: restore_thead_parameters(th); 10: return ss; 11: } 11: public void enterAsyncSchedulable (Schedulable ss) 12: { threadpool.getThread().runAsync(ss); 13: return; 14: } ... 15:}
  • 12. Developer Perspective  An industrial inspired use- case  A simple distributed application for control that i) reads data, ii) processes these data, iii) and stores the data End-to-end application deadline ProcessDataReadData WriteOutput input RTSJ-JVM Server1 RTSJ-JVM Server2 RTSJ-JVM Server3 outputprocess SRC RMA PROC RMA DEST RMA RMI RMI RMI RMI Registry SRC RMA PROC RMA DEST RMA RTSJ-JVM Client RMI enteSch enterSch enterSch Step 1 Step 2 Step 3 ThreeStepsApp
  • 13. The application in a single Runnable class  Three is a internal counter (scount) that decides in which step is the application  All public and serializable attributes are transferred from a to the server  (namely: 05: array 04: local 02: scount ) 00: public class ThreeStepsApp 01: extends Schedulable, Serializable{ 02: int scount=0; 03: ... 04: boolean local=true; 05: long[] array= null; 06: ThreeStepsApp(...){ 07: array=new long[1024]; 08: } 09: public void run(){ 10: scount ++; 11: switch(scount) 13: { 14: case 1: //First execution 15: for (int i=0; i<1024; i++) 16: { array[i]=input(); 17: } 18: break; 19: case 2: //Second execution 20: for (int i=0; i<1024; i++) 21: { array[i]=process(array[i]); 22: } 23: case 3: 24: output(array[1023]); 25: break; 26: } 27: private trace(long){ … } 28: }
  • 14. Running the example  Periodically, it runs the three steps application  At a 32 priority which is propagated from client to servers 01:new RealtimeThread(){ 02: public void run(){ 03: setSchedulingParameters 04: (PriorityParamters(32)); 05: ThreeStepsApp tsc= new ThreeStepsApp(); 06: RemoteMemoryArea src=lookupSrc(); 07: RemoteMemoryArea proc=lookupDest(); 08: RemoteMemoryArea dest=lookupRemoteHeap(); 09: tsc.setSchedulingParameters 10: (PriorityParamters(8)); 11: do{ 12: tsc=(TestSchedulable3)src.enterSchedulable(tsc); 12: tsc=(TestSchedulable3)proc.enterSchedulable(tsc); 13: tsc=(TestSchedulable3)dest.enterSchedulable(tsc); 14: waitForTheNextPeriod(); 15: }while(true); 16:}.start();
  • 15. Empirical evaluation  Derived from the previous application  Control benchmark application  The extension  + RMAs  + Lightweight RT-RMI Extensions  Software stack  Oracle’ JRTS.  Two virtual machines running on an 800 MHz processor+100 Mbps Ethernet.  The underlying kernel is a real-time Linux 3.0 rt-patched kernel on a Debian 6.0 distribution RT-RMI extensions Oracle JRTS Debian 3.0 rt-patch Intel 800 Mhz -100 Mbits RMAs Extension Control Application
  • 16. Empirical evaluation results  Parametric benchmark  Array sizes from  100 bytes,  to  1E05 bytes  Not much overhead when compared against traditional RMI  Similar results  Overhead reduces with high data volumes  From [15% to less than 5%] in 100 bytes to 1E5 bytes
  • 17. Conclusions  A new way of performing remote communications was proposed  Remote Memory Area (RMA)s based on runnable objects  More low-level (& flexible than traditional remote invocations)  RMAs was evaluated with a distributed control applications  With an use case three steps application  RMAs empirical evidence showed that  They do not produce too much overhead
  • 18. Ongoing Work  Security issues:  Safe execution of runnable objects in servers  Merging the model with other architectural models  With support from distributable threads  As a means to provide real-time reconfiguration