29
Object-Functional Analysis and Design and Programming 温泉 2012818 浅海智晴

Object-Functional Analysis and Design and Programming温泉

Embed Size (px)

DESCRIPTION

クラウド温泉3.0の資料です。 ディスカッションのネタ提供を目的としています。

Citation preview

  • 1. Object-FunctionalAnalysis and Designand Programming2012818

2. 3. ? 4. Object FunctionalProgramming (OFP) Object Functional Analysis and Design (OFAD) 5. SSD NoSQL 6. DSL OO DSL OO OO 7. () Java + () () UML 8. 9. () () 10. 20OO Haskell Scala(+scalaz) Lisp, ML, OCaml pure Lisp Parametric Subtypepolymorphism polymorphism 11. List, () ()() ( ) 12. 13. (associative law) (semigroup) (monoid) (a + b) + c = a + (b + c) (group) (commutative law) a+b=b+a () (distributive law) (ring) (field)a * (b + c) = a * b + a * c 14. (category) Hask (Scala?) (monad) (kleisli category) Applicative (arrow,functormorphism) (functor) 15. (shared mutability) STM (Software Transactional Memory) () (isolatingmutability) SQL 16. Object Functional Programming (OFP) 17. OFP (trait) mix-in AOP (monad) Monadic (type class) (?) Scala 18. (1) 19. (2) 20. Arrow 21. 22. Object Functional Analysis and Design (OFAP) 23. 24. 25. 26. 27. SparkScaldingval file = spark.textFile("hdfs://...")file.flatMap(line => line.split(" ")).map(word => (word, 1)) Spark.reduceByKey(_ + _)class WordCountJob(args : Args) extends Job(args) {TextLine( args("input") ).read. flatMap(line -> word) { line : String => line.split("s+") }. groupBy(word) { _.size }. write( Tsv( args("output") ) )}Scalding https://github.com/twitter/scalding CascadingScala DSL Collection APIHadoop 28. ? 29. END