Rethinking Software Connectors or How I Learned To Start Worrying - - PowerPoint PPT Presentation

rethinking software connectors
SMART_READER_LITE
LIVE PREVIEW

Rethinking Software Connectors or How I Learned To Start Worrying - - PowerPoint PPT Presentation

Rethinking Software Connectors or How I Learned To Start Worrying And Love Terminology Stephen Kell Stephen.Kell@cl.cam.ac.uk Computer Laboratory University of Cambridge Rethinking Software Connectors p.1/19 Connectors are cool Whence


slide-1
SLIDE 1

Rethinking Software Connectors

  • r

How I Learned To Start Worrying And Love Terminology Stephen Kell

Stephen.Kell@cl.cam.ac.uk

Computer Laboratory University of Cambridge

Rethinking Software Connectors – p.1/19

slide-2
SLIDE 2

Connectors are cool

Whence “connectors”? computation is old hat communication: the not-so-old frontier high-level design / architecture re-use distribution / parallelisation

Rethinking Software Connectors – p.2/19

slide-3
SLIDE 3

Connectors as a concept

Three oft-cited works conceptualising connectors: Shaw 1993 (intuitions and motivations) Allen 1997 (formalisation) Mehta 2000 (taxonomy) Outstanding question: what are connectors? Not yet a mature concept.

Rethinking Software Connectors – p.3/19

slide-4
SLIDE 4

Connectors are confusing

intuitive extensional definitions only “mediate interactions” (Shaw) “manifest themselves as [examples]” (Mehta, Shaw) “describe the interactions” (Allen) too many kinds of thing servers? data encodings? protocol specifications? distinctions: type, instance, “image”, state, invocation disagreement on relations connectors ∩ components = ∅? coordinators ⊇ connectors? adaptors ⊆ connectors?

Rethinking Software Connectors – p.4/19

slide-5
SLIDE 5

Connectors characterised

Let’s characterise connectors more simply: communication (mechanism, information) coupling (agreement, meaning) To be a connector, it takes mechanism. To use a connector meaningfully, it takes agreement. This could be straight out of a communication theory text. . . . . . but I haven’t yet found which. If you know, tell me! Will return to this later....

Rethinking Software Connectors – p.5/19

slide-6
SLIDE 6

Corollaries

What doesn’t define connectors? Popular red herrings: protocol polymorphism / typelessness lack of state dynamic creation I contend that the following are all connectors: an operating system [kernel] the Internet (or any network) the air in this room the media What defines a component? Good question.

Rethinking Software Connectors – p.6/19

slide-7
SLIDE 7

The connector-component “continuum”

Are these components or connectors? filter in pipe-and-filter style “façade” layers in a layered web app servers / multiplexers protocol adapters marshallers any stateful shared component (covert channels...) Assertion: “connector or component” isn’t intrinsic... . . . it depends on a chosen level of abstraction. It’s valid to consider connectors ⊇ components. . . . . . despite the dogma which says otherwise.

Rethinking Software Connectors – p.7/19

slide-8
SLIDE 8

It’s only terminology, but I like it

Gauging reaction: please pick one (and save for questions): trivially, you are correct no, you are incredibly mistaken I don’t care either way! Aside: why should we care? My tentative answer: credibility communication is one of the hardest parts of research just like software

Rethinking Software Connectors – p.8/19

slide-9
SLIDE 9

Coupling

Coupling is a familiar term. What does it mean? draw a surface around an arbitrary part of a system; evaluate how much the inside needs to know about outside... ... and vice-versa... in order for the system to “work” (in whatever sense) Information theory refines “how much” and “know”. Shannon calls these “knowledges” the “code”. I call them “agreements”. . . . . . because disagreement causes the problems

Rethinking Software Connectors – p.9/19

slide-10
SLIDE 10

Coupling and connectors

Coupling occurs across connectors (and nowhere else). Dealing with (static) coupling: have less of it (minimisation) information hiding late binding, negotiation, discovery

  • nly goes so far (no coupling ↔ no communication)

make it less of a problem (mitigation) localisation of definitions standardisation adaptation Theorem: black-box composition of independently developed code requires adaptation.

Rethinking Software Connectors – p.10/19

slide-11
SLIDE 11

Coupling by “layered” agreements

Choice of mechanism is one agreement. We refine it by shared message (content) coding rules shared timing and sequencing (context) coding rules Disagreements especially problematic:

  • ften not stated explicitly

can’t check statically (or adapt)

  • ften not stated in a single place (not localised)

poor mitigation of coupling; drift ambiguity: mismatches subtle and/or undetected can’t check dynamically (or use negotiation) Solutions: self-description, {localised, static} specification

Rethinking Software Connectors – p.11/19

slide-12
SLIDE 12

Coupling and “coupling”

Recap: whence connectors? Re-use and also concurrency. “Coupling” can mean more than one thing: consider Linda. “loose coupling” oft-cited advantage of send-receive usually means simple, unconstrained (→ parallelism!) but these mean more layered agreements. . . . . . so can worsen coupling! In all cases, simpler mechanisms mean that more layered agreements are required. . . . . . in order to convey a given meaning so more opportunity for disagreement (mismatch)

Rethinking Software Connectors – p.12/19

slide-13
SLIDE 13

Complexity trade-offs

We can trade off complexity between communication abstractions. . . . . . and the computation (and state) (of the components which use them) Canonical example: smart network vs dumb network smarter → simpler clients, fewer layered agreements dumber → less constraint, more flexibility Optima are inherently application-dependent. dumber doesn’t always gain useful flexibility smarter doesn’t always enable simplicity (end-to-end)

Rethinking Software Connectors – p.13/19

slide-14
SLIDE 14

Configuration

Any complex system is a configuration of simpler ones (recursively). A configuration has defining properties: there’s more than one piece to it pieces are joined together in some arrangement pieces may be atomic or recursive pieces may be re-used or novel

Rethinking Software Connectors – p.14/19

slide-15
SLIDE 15

Configuration concretion

Here’s a picture of a fictional configuration.

Process

stream consumer tuple producer tuple space tuple-stream adapter take_contiguous(n)

map project #2; flatten

tuple space

(20, b100101…) (21, b011000…) (22, b111010…) (24, b000110…) …

  • ut

read

Rethinking Software Connectors – p.15/19

slide-16
SLIDE 16

Configuration explaining connectors

Some re-statements of the observations which begat “connectors”: programming languages aren’t great for expressing architecture programming languages aren’t great for expressing configuration communication abstractions are comparatively neglected tool support across configurations is weaker than within them

Rethinking Software Connectors – p.16/19

slide-17
SLIDE 17

Configuration, connectors, components

Any programming language is also a configuration language but some configuration languages are not programming languages e.g. symbol bindings in a linkage language configuration need not be Turing-powerful Configuration and programming unified by primitive connectors. i.e. must unify mechanisms denoted in programming language mechanisms denoted in configuration language they don’t have to be the same. . . why shouldn’t they?

Rethinking Software Connectors – p.17/19

slide-18
SLIDE 18

Configuration coming soon. . .

Some ideas:

  • perating system + adaptation

pluggable checking of configurations adaptation as the default semi-automatic refactoring (to separate communication) extensibility by interposition

Rethinking Software Connectors – p.18/19

slide-19
SLIDE 19

Conclusions

Lack of clarity or of explicit definitions can make much good work appear conceptually confused. Mechanism and agreement may be a useful way to think of connectors and coupling. There are many trade-offs surrounding coupling “Explicit configuration” might be better than “first-class connectors”. Maybe we’re already doing “explicit configuration”

  • research. . .

. . . but just not expressing it right. Questions are welcome.

Rethinking Software Connectors – p.19/19