27.03.2014 Views

Programming Model and Protocols for Reconfigurable Distributed ...

Programming Model and Protocols for Reconfigurable Distributed ...

Programming Model and Protocols for Reconfigurable Distributed ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

84 CHAPTER 4. IMPLEMENTATION ASPECTS AND DEVELOPMENT CYCLE SUPPORT<br />

4.8 <strong>Programming</strong> in the Large<br />

We used Apache Maven [184] to organize the structure <strong>and</strong> manage the<br />

artifacts of the reference Kompics implementation [19]. The complete<br />

framework counts more than a hundred modules.<br />

We organized the various framework constituents into abstraction <strong>and</strong><br />

component packages. An abstraction package contains a Kompics port<br />

together with the request <strong>and</strong> indication events of that port. A component<br />

package contains the implementation of one component together with<br />

some component-specific events – typically subtypes of events defined in<br />

required ports. The source code <strong>for</strong> an abstraction or component package<br />

is organized as a Maven module <strong>and</strong> the binary code is packaged into a<br />

Maven artifact, a JAR archive annotated with meta-data about the package’s<br />

version, dependencies, <strong>and</strong> pointers to web repositories from where (binary)<br />

package dependencies are automatically fetched by Maven.<br />

In general, abstraction packages have no dependencies <strong>and</strong> component<br />

packages have dependencies on abstraction packages <strong>for</strong> both their required<br />

<strong>and</strong> provided ports. This is because a component implementation will use<br />

event types defined in abstraction packages, irrespective of the fact that<br />

an abstraction is required or provided. This approach of explicit binary<br />

dependencies also enables deploy-time composition.<br />

Maven enables true reusability of protocol abstractions <strong>and</strong> component<br />

implementations. Users can start a project <strong>for</strong> a new protocol implementation<br />

<strong>and</strong> just specify what existing abstractions their implementation<br />

depends on. These are automatically fetched <strong>and</strong> made available in the<br />

new project. For convenience, our Kompics repositories [19] also contain<br />

JavaDoc <strong>and</strong> source JARs which are also fetched automatically by Maven.<br />

This enables programmers to seamlessly navigate the source code of the<br />

artifacts their projects depend on, thus enhancing developer productivity.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!