4. 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/
5. Objects in the Cloud
īCan we apply traditional object oriented
principles to the #cloud?
īCan we think #state as just #objects value?
6. Why thinking about #state?
ī#state does not fits so well in the #cloud with:
ī#network
ī#scaling
ī#mainteinance
ī#performances
9. 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
inputs
10. 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
11. 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
ī Imperative
ī âRun that behavior on that stateâ!
ī Functional
ī Itâs a relationship between values
ī Itâs a relationship between state (of something) in two different times (before
and after)
12. 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
13. Where is state?
ī In memory
ī Variables
ī In transient storages (timeout): faster more than infinite
ī Caches
ī Sessions
ī In persistent storage (tī¨infinite - MTBF)
ī Blobs
ī In structured data
ī Files
ī Databases
14. 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
15. State and the Cloud
īIn the #cloud, the state is the most important thing
īDefine the correct state and how to represent it
17. What is an object?
īIt is state and behavior in the same âplaceâ
18. What is an attribute?
īIs a characteristic (of an object) you can measure
(it has a value)
19. Some quotes
ī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
just state?
īIf an object have no state, but only behavior, is still an
object?
25. 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
26. Does a class-based language imply
OOP?
īNo, OOP is a way of thinking and modeling at first
īClass-based languages cannot be an excuse to
avoid real principles
27. What is a prototype
īIs an object itself you can use as a model to
create others objects copying from it
ī#javascript teaches us that we can write #objects
without #classes