Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
research:dsal:ridl [2009/02/12 17:17] – created jfabry | research:dsal:ridl [2009/02/13 12:15] (current) – jfabry | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ===== RIDL ===== | ||
+ | (Internal classification: | ||
+ | |||
+ | Reference paper: **" | ||
+ | |||
+ | Another source of detailed information is Lopes' PhD Thesis, which was was published later: **"D: A Language Framework for Distributed Programming" | ||
+ | |||
+ | |||
+ | ===== Domain of the language ===== | ||
+ | |||
+ | Both [[COOL]] and RIDL are designed as part of the **D** framework. "D is a language framework that supports new | ||
+ | kinds of modules for addressing some of the distribution issues that are hard to capture in classes. [...]. The language framework proposed here focuses only on a subset of [distributed system] applications [...]: applications over the Internet, the Web, corporate-wide applications such as calendar managers, network managers, document management systems [...], hospital management systems, front-end applications for database access, interactive multi-user environments, | ||
+ | |||
+ | "[D] really consists of two languages: (1) COOL, for controlling thread synchronization over the execution of the components; and (2) RIDL, for programming interactions between remote components." | ||
+ | |||
+ | ===== Intent of the language ===== | ||
+ | |||
+ | "RIDL provides means for dealing with data transfers between different execution spaces. A RIDL program consists of a set of portal modules [...] Portals are helpers with respect to the implementation of the | ||
+ | classes: they take care of data transfers across space boundaries. Portal declarations [...] identify classes whose instances may be referenced from remote spaces. Such instances are called remote objects. The portal declaration identifies which methods of the class are exported over the network. In the portal, such methods are called remote operations. For each of those operations, the portal declaration describes what data the remote objects | ||
+ | are expecting and what data they send back to the callers." | ||
+ | |||
+ | |||
+ | ===== Join Point Model and Advice Model ===== | ||
+ | * JPM: General-Purpose : Portals act on method invocations to the target object. | ||
+ | * AM: Domain-Specific : A Portal declares which methods are remote and specifies parameter passing modes. | ||
+ | |||
+ | ===== Anatomy of the language ===== | ||
+ | |||
+ | A portal declaration consists of a class name and a portal body. " | ||
+ | |||
+ | To declare that a method can be invoked remotely, the signature of the method is given, with an optional body. The body specified parameter passing modes for the parameters and return values. These can be by reference or by copy. "When objects are to be passed by copy, an optional copying directive may be given in their transfer specifications" | ||
+ | |||
+ | Additionally, | ||
+ | |||
+ | It is important to remark here that RIDL (and [[COOL]]) does not have a strong separation of pointcut and advice, as is now usual. The pointcut is not only defined by the signature part, as this only identifies classes. Additionally, | ||
+ | |||
+ | The grammar of COOL and RIDL is fully described in appendix A of the thesis. | ||
+ | |||
+ | ===== Typical Example ===== | ||
+ | |||
+ | The following code is taken from Lopes' PhD thesis. It solves one of the motivating problems of the thesis, a part of a BookLocator / ProjectManager application. For more details, we refer to the thesis. | ||
+ | |||
+ | portal BookLocator { | ||
+ | void register(Book b, Location l); | ||
+ | void unregister(Book b); | ||
+ | Location locate(Book b); | ||
+ | default: | ||
+ | Book : copy { Book only all.String, all.int; }; | ||
+ | } | ||
+ | portal ProjectManager { | ||
+ | boolean newBook(Book b, Price p) { | ||
+ | Book : copy { Book only owner, all.String, all.int; }; | ||
+ | } | ||
+ | } | ||
+ | |||
+ | ===== Enforced Restrictions ===== | ||
+ | |||
+ | RIDL is an extremely restrictive language, due to its purely declarative nature which only allow remoteness properties of objects to be set. There is no way in which behavior outside of this domain can be triggered, nor it is clear how to ' | ||
+ | |||
+ | ===== Implementation description ===== | ||
+ | |||
+ | The aspect weaver for both [[COOL]] and RIDL is discussed in detail in Appendix C of the dissertation: |