The central idea of DbC is a metaphor on how elements of a software system collaborate with each other, on the basis of mutual obligations and benefits. The metaphor comes from business life, where a "client" and a "supplier" agree on a "contract" which defines for example that:
- The supplier must provide a certain product (obligation) and is entitled to expect that the client has paid its fee (benefit).
- The client must pay the fee (obligation) and is entitled to get the product (benefit).
- Both parties must satisfy certain obligations, such as laws and regulations, applying to all contracts
feature -- Element change deposit (sum: INTEGER) -- Add `sum' to account. require non_negative: sum >= 0 do ... As before ... ensure one_more_deposit: deposit_count = old deposit_count + 1 updated: balance = old balance + sum end
Feature: Daily car maintenance Cars need maintenance Scenario: Fuelling Given a car with 10 litres of fuel in the tank When you fill it with 50 litres of fuel Then the tank contains 60 litres
Now suppose I have incoming IPs, and we have a process which modifies a particular field in each IP (e.g. the Assign component), is it better to destroy the incoming IP and create a new one with the same structure as the incoming one - or can we just modify the incoming one and send it on? Or doesn't it matter? From my point of view, I find the [im]mutability issue confusing :-) Does this have a bearing on the dataflow vs. (?) FBP issue?
If each process is a separate microprocessor, does this change the answer?
http://flow-based-pgmg.svn.sourceforge.net/viewvc/flow-based-pgmg/javaengine/trunk/JavaFBP/src/com/jpmorrsn/fbp/components/ReadFromSocket.java
http://flow-based-pgmg.svn.sourceforge.net/viewvc/flow-based-pgmg/javaengine/trunk/JavaFBP/src/com/jpmorrsn/fbp/components/WriteToSocket.java
I would be happy to cook up some more components if you can send me some
specs... :-)
i guess we all live in our own caves, like i'm learning about fbp :-) :-)
http://en.wikipedia.org/wiki/Representational_state_transfer
by the way, especially for those new-to-rest, i read that in the sense
of "How Brad wants to use REST with JavaFBP" rather than "REST is only
about config time wherever it is used" ja wohl?
sincerely.
> Don't know anything about REST!
It is an architectural style reverse engineered from HTTP, but it is not
necessarily connected with HTTP or even sockets. Rather, it is a pattern
for interacting with key-value stores like file systems or HTTP servers,
that don't maintain session state but just keep the value associated
with each key.
Here's the essence of the REST pattern:
1) Given a key, the store returns the corresponding value. It may
compute the value in an arbitrarily complex way; the pattern does not
require dumb stores.
2) Given the key, a client of the store can read, modify, or delete the
key-value pair, provided it has permissions to do so.
3) Each request contains enough information to determine how the store
should process it.
4) Stores should support the following requests, and as few others as
possible, so as to make blind interaction with a store possible.
* Get, a safe operation that returns a value given the key. This
operation produces no side effects chargeable to the client (the store
may log something). It can be repeated and will produce the same
result, modulo changes on the store side (timestamps may differ, e.g.)
* Put, a safe operation that changes the value associated with a key.
This operation is repeatable with the same effect. When a Put is
complete, a Get will receive the same result, modulo changes on the
store side.
* Post, an operation that creates a new key-value pair given a value.
The client may suggest a key, but the server is always free to create
the key, which is returned to the client.
* Delete, an operation that removes a key-value pair given th ekey.
This operation can be repeated with the same effect.
5) Except for trivial entry points, the client should not assume anything
about keys; keys should be retrieved from parts of values that the client
has already fetched. (This is usually stated as "hyperlinking is the
engine of application state.")
--
John Cowan co...@ccil.org http://ccil.org/~cowan
Linguistics is arguably the most hotly contested property in the academic
realm. It is soaked with the blood of poets, theologians, philosophers,
philologists, psychologists, biologists and neurologists, along with
whatever blood can be got out of grammarians. - Russ Rymer
Thanks, guys!
That helps a lot! Now I am really curious how REST and [Java]FBP go
together - that should be interesting! I could guess, but I want to
hear from the Group!
wow. that was more cogent than anything else i've ever read about REST :-)
> 5) Except for trivial entry points, the client should not assume anything
> about keys; keys should be retrieved from parts of values that the client
> has already fetched. (This is usually stated as "hyperlinking is the
> engine of application state.")
this is apparently to some people a very important win.
http://java.dzone.com/articles/domain-model-rest-anti-pattern
> http://java.dzone.com/articles/domain-model-rest-anti-pattern
That article has substantial problems, but it does correct
the "just expose your data" anti-pattern. Hypertext as
application state is what makes the difference between *just*
being a key-value store and being a REST application. See
http://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypertext-driven
(which is linked from the above article), including particularly Roy's
comments.
--
John Cowan co...@ccil.org http://www.ccil.org/~cowan
C'est la` pourtant que se livre le sens du dire, de ce que, s'y conjuguant
le nyania qui bruit des sexes en compagnie, il supplee a ce qu'entre eux,
de rapport nyait pas. --Jacques Lacan, "L'Etourdit"
Nobody really knows. My best guess is that "nyait" means "goes 'nyah-nyah'"
and "le nyania" is "the condition of everyone going 'nyah-nyah'."
--
John Cowan <co...@ccil.org> http://www.ccil.org/~cowan
The peculiar excellence of comedy is its excellent fooling, and Aristophanes's
claim to immortality is based upon one title only: he was a master maker
of comedy, he could fool excellently. Here Gilbert stands side by side
with him. He, too, could write the most admirable nonsense. There has
never been better fooling than his, and a comparison with him carries
nothing derogatory to the great Athenian. --Edith Hamilton, The Greek Way
"the impenetrability of Lacan's prose... [is] too often regarded as
profundity precisely because it cannot be understood" (Richard
Stevens). I don't feel so bad now :-)
I have uploaded some presentations to my web site, and I hope at least a
few of you will find them intriguing enough to pursue more deeply! Here
are a few of the files:
http://www.jpaulmorrison.com/npedwards/ALTOPS1.pptx
http://www.jpaulmorrison.com/npedwards/ALTPSUM1.pptx
He also sent me an old paper on program verifiability which may interest
a number of you - if you haven't already seen it:
http://www.jpaulmorrison.com/npedwards/PROOFS OF PROCESSES.pdf
and a presentation on the security advantages of the architecture -
ALTOPS believes in complete separation of data and code:
http://www.jpaulmorrison.com/npedwards/SECURITYSYS5.pptx
Hope some of you find this stimulating - and perhaps have suggestions as
to how Nate should proceed going forward. He feels that the
capabilities and challenges of the new hardware might make this timely
(a bit like FBP!).
Brad, maybe you remember Nate...?
On 12/04/2012 7:48 PM, Paul Morrison wrote: