We cannot take it for granted that…
The network is reliable
Latency is negligible
bandwidth is infinite
the net is safe
the topology doesn't change
The transport cost is negligible/zero
the network is homogeneous
there is only one administrator
Mauro Servienti - http://www.communitydays.it/events/2014/vs06/
Objects in the Cloud
Can we apply traditional object oriented
principles to the #cloud?
Can we think #state as just #objects value?
Why thinking about #state?
#state does not fits so well in the #cloud with:
What is state?
Is a set of attributes (of something) that allows you
to identify and characterize it
State is something that is maintained in absence of
State and #software
Every software program have a #state
That state is what we want for the program
In #traditional software development we don’t
focus on #state, it’s just there
We focus on behavior and how to express it
What is a behavior?
It’s something you can do on a state to change it
Everything you do is to change yourself (at least!)
Many ways to express behavior
“Run that behavior on that state”!
It’s a relationship between values
It’s a relationship between state (of something) in two different times (before
Why state and behavior are important?
Because statet+1=behaviorj(inputt, st)
Where t and t+1 are two consecutive instants
And there are cases where statet+1=statet
Where is state?
In transient storages (timeout): faster more than infinite
In persistent storage (tinfinite - MTBF)
In structured data
Choose the right representation
Choosing the right representation of the state is
the most difficult part of an application
Relational Database is a choose, not a starting point
State and the Cloud
In the #cloud, the state is the most important thing
Define the correct state and how to represent it
What is an object?
It is state and behavior in the same “place”
What is an attribute?
Is a characteristic (of an object) you can measure
(it has a value)
Everything is an object…
…so everything have a state
…so everything have a behavior
If an object have no behavior, is still an object? Or is
If an object have no state, but only behavior, is still an
What is modeling?
Is the activity of shaping objects
You as programmer…
…model entities into objects
What is OOP (Object Oriented
It’s a way of modeling everything as an object,
with state and behavior
Objects, non classes
We can speak about objects without referring to
What is a class?
A #class is a model for objects
A #class is a way to define a model for objects
A #class is the typical way to define objects models in
a strongly typed (not yet statically typed) language
(C#, Java, but also Python and Ruby)
There are other ways
Does a class-based language imply
No, OOP is a way of thinking and modeling at first
Class-based languages cannot be an excuse to
avoid real principles
What is a prototype
Is an object itself you can use as a model to
create others objects copying from it
Objects in the Cloud