A brief dive into polyglot micro-services architectures from the perspective of Wittgensteinian language-games.
TL;DR: Duckrabbit typing is our best bet for communicating between services.
3. A is building with building stones: there are
blocks, pillars, slabs, and beams. B has to pass
him the stones and to do so in the order in which
A needs them. For this purpose they make use of
a language consisting of the words “block,”
“pillar,” “slab,” “beam.” A calls them out; B brings
the stone which he has learnt to bring at such-
and-such a call. — Conceive of this as a
complete primitive language.
(Wittgenstein, PI, §2)
5. 1. How does data’s meaning change from one context
to another?
2. How do we figure out what data means in a given
context?
3. What can we do about it?
6. 1. Data’s meaning changes from context to context.
2. We can describe data in a given context
3. There are tools and techniques at our disposal to
mitigate confusion.
7. • Chuck Pletcher
• Software Engineering at Assembly (https://
assembly.com)
• Not a philosopher
8. When they (grown-ups) named some object and at the same
time turned towards it, I perceived this, and I grasped that the
thing was signified by the sound they uttered, since they meant
to point it out. This, however, I gathered from their gestures, the
natural language of all peoples, the language that by means of
facial expression and the play of eyes, of the movements of the
limbs and the tone of voice, indicates the affections of the soul
when it desires, or clings to, or rejects, or recoils from,
something. In this way, little by little, I learnt to understand what
things the words, which I heard uttered in their respective
places in various sentences, signified. And once I got my
tongue around these signs, I used them to express my wishes.
(Augustine, Confessions I. 8)
9. 2.1 We make to ourselves pictures of facts.
2.11 The picture presents the facts in logical space, the existence
and non-existence of atomic facts.
2.12 The picture is a model of reality.
2.13 To the objects correspond in the picture the elements of the
picture.
2.131 The elements of the picture stand, in the picture, for the
objects.
2.14 The picture consists in the fact that its elements are combined
with one another in a definite way.
2.141 The picture is a fact.
(Wittgenstein, Tractatus Logico-Philosophocus)
10.
11. Someone suddenly sees something which he
does not recognize (it may be a familiar object,
but in an unusual position or lighting); the lack of
recognition perhaps lasts only a few seconds.
(Wittgenstein, PI, Part II, §141)
12.
13. Is it correct to say that he has a different visual experience
from someone who recognized the object straightaway?
Couldn’t someone describe an unfamiliar shape that
appeared before him just as accurately as I, to whom it is
familiar? And isn’t that the answer?
(Wittgenstein, PI, Part II, §§141-142)
17. import React from 'react'
export default function connectToStores(...stores) {
return function(Component) {
return class StoreConnection extends React.Component {
static willTransitionTo(transition, params, query) {
Component.willTransitionTo &&
Component.willTransitionTo(transition, params, query)
}
constructor(props) {
super(props)
this.state = Component.getPropsFromStores(props)
this.handleStoresChanged = this.handleStoresChanged.bind(this)
}
render() {
return <Component {...this.props} {...this.state} ref="component" />;
}
componentDidMount() {
stores.forEach(store =>
store.addChangeListener(this.handleStoresChanged)
);
}
componentWillUnmount() {
stores.forEach(store =>
store.removeChangeListener(this.handleStoresChanged)
);
}
handleStoresChanged() {
this.setState(Component.getPropsFromStores(this.props))
}
// for testing
static get Component() {
return Component
}
}
}
}
https://medium.com/@dan_abramov/mixins-are-dead-long-live-higher-order-components-94a0d2f9e750
Render the target Component
along with any props and state
Attach listeners to each of the
Component’s stores (declared
in the call to this decorator)
Think of this as ReactRouter
sugar — it’s not super
important for our purposes, but
I’ll explain it if you want
18. import AvailableUsernameInputActions from 'actions/AvailableUsernameInputActions'
import AvailableUsernameInputStore from 'stores/AvailableUsernameInputStore'
import classnames from 'classnames'
import connectToStores from 'lib/connectToStores.jsx'
import React from 'react'
@connectToStores(AvailableUsernameInputStore)
export default class AvailableUsernameInput extends React.Component {
static getPropsFromStores(props) {
return { valid: AvailableUsernameInputStore.isValid(props.id) }
}
static defaultProps = {
id: 'available-input'
}
componentDidMount() {
AvailableUsernameInputActions.validate(this.props.id, this.props.value)
}
constructor(props) {
super(props)
this.handleChange = this._handleChange.bind(this)
}
render() {
const classes = classnames(this.props.className, {
'is-error': this.props.valid === false
})
return (
<div className="clearfix">
<input {...this.props}
className={classes}
onChange={this.handleChange} />
{this.renderMessage()}
</div>
)
}
renderMessage() {
const { valid, value } = this.props
// `valid` can be `null`, in which case we do nothing
if (valid === false) {
return (
<small className="red left mt1">
{value} is taken. Try again!
</small>
)
}
return null
}
_handleChange(e) {
AvailableUsernameInputActions.validate(this.props.id, e.target.value)
this.props.onChange && this.props.onChange(e)
}
}
Pass any changes off to
action creators.
`valid` is ultimately the prop
that we care about
21. [T]he language-games stand there as objects of
comparison which, through similarities and dissimilarities,
are meant to throw light on features of our language.
For we can avoid unfairness or vacuity in our assertions
only by presenting the model as what it is, as an object of
comparison — as a sort of yardstick; not as a
preconception to which reality must correspond. (The
dogmatism into which we fall so easily when doing
philosophy.)
(Wittgenstein, PI, §§130-131)
22. [T]he language-games stand there as objects of
comparison which, through similarities and dissimilarities,
are meant to throw light on features of our language.
For we can avoid unfairness or vacuity in our assertions
only by presenting the model as what it is, as an object of
comparison — as a sort of yardstick; not as a
preconception to which reality must correspond. (The
dogmatism into which we fall so easily when doing
philosophy computer science.)
(Wittgenstein, PI, §§130-131)
24. Can there be a clash between the picture [our data]
and application? Well, they can clash in so far as the
picture makes us expect a different use; because
people in general apply this picture like this.
I want to say: we have here a normal case and
abnormal cases.
(Wittgenstein, PI, §141)
25. Thanks
•
• Wittgenstein, Ludwig. Philosophical Investigations.
Translated by G. E. M. Anscombe, P. M. S. Hacker,
and Joachim Schulte. Fourth Edition. Blackwell
Publishers, Malden, MA: 2009. (Originally
published 1953)
• Wittgenstein, Ludwig. Tractatus Logico-
Philosophicus. Translated by C. K. Ogden. Kegan
Paul, Trench, Trubner and Co., Ltd., London: 1922.