objects in the cloud - edition 2014

Post on 05-Dec-2014

204 Views

Category:

Technology

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

How do you write objects for cloud computing? Is Object Oriented Programming still THE way to write apps? What about the state that objects contains?

TRANSCRIPT

  • 1. Objects in the Cloud Edizione 2014 Marco Parenzan
  • 2. Objective Thinking about #state, #objects and how #cloud need respect using #state and writing #objects
  • 3. Musing about some modern #misconceptions
  • 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
  • 7. What is #state here?
  • 8. Understanding #state and #behavior
  • 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 dont focus on #state, its just there We focus on behavior and how to express it
  • 11. What is a behavior? Its 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 Its a relationship between values Its 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 (tinfinite - 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
  • 16. Just objects
  • 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?
  • 20. What is modeling? Is the activity of shaping objects
  • 21. What is an entity Is something you can model
  • 22. You as programmer model entities into objects
  • 23. What is OOP (Object Oriented Programming)? Its a way of modeling everything as an object, with state and behavior and classes?
  • 24. Objects, non classes We can speak about objects without referring to classes, ever!
  • 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
  • 28. Objects in the Cloud Edizione 2014 Marco Parenzan

top related