Upgrade to Pro — share decks privately, control downloads, hide ads and more …

アクターモデルの話

tmaeda
October 21, 2017

 アクターモデルの話

tmaeda

October 21, 2017
Tweet

More Decks by tmaeda

Other Decks in Technology

Transcript

  1. &-*9*3ͷίʔυྫ defmodule Greeter do def hello do receive do name

    -> IO.puts "Hello #{name}" end hello() end end greeter = spawn(Greeter, :hello, []) send(greeter, "World")
  2.  1977ͷHewittͷ࿦จ In recent years, there has been a shift

    from the centralized serial computing system to the distributed parallel computing network. (Laws for Communicating Parallel Processes)
 https://dspace.mit.edu/bitstream/handle/1721.1/41962/AI_WP_134A.pdf ڞײͰ͖·͢ʁ ͪΐͬͱ౰࣌ͷ༷ࢠΛௐ΂ͯΈ·͠ΐ͏
  3. ೥ද 1946 ENIAC 1956 SAGE 1965 CDC6600 1971 Intel 4004

    740kHz 1957 Fortran 1958 LISP 1959 COBOL 1972 C, Smalltalk 1972 UNIX 1973 Ethernet 1969 ARPANET 50kbsp ͜ͷลͷࠒͷ࿩ˢ 1967 Thread
  4. ϩοΫͰղܾʁ ͜͜ͰϩοΫΛ͔͚Δ(1౓ʹ1ͭͷεϨου͔͠ڐ͞ͳ͍) if Ҿ͖མͱֹ͠ <= ࢒ߴ ࢒ߴ -= Ҿ͖མͱֹ͠ return

    true else return false end ͜͜ͰϩοΫΛղ์ ϩοΫΛ͠๨ΕΔ ղ์͠๨ΕΔ ΊΜͲ͍͘͞ ෆ҆
  5. ೥ද 1946 ENIAC 1956 SAGE 1965 CDC6600 1971 Intel 4004

    740kHz 1957 Fortran 1958 LISP 1959 COBOL 1972 C, Smalltalk 1972 UNIX 1973 Ethernet 1969 ARPANET 50kbsp ͜ͷลͷࠒͷ࿩ˢ 1967 Thread
  6. ΞΫλʔϞσϧͰղܾ "͞Μ #͞Μ ޱ࠲ SFDFJWF 0, ԁҾ͖མͱ͠ ԁҾ͖མͱ͠ ࢒ߴ10000ԁ ϝʔϧϘοΫε

    ࢒ߴνΣοΫͯ͠ ԁҾ͖མͱ࣮͠ߦ /( SFDFJWF ϝοηʔδ͸ඞͣ
 1݅ͣͭॱ൪ʹ
 ॲཧ͞ΕΔ
  7. &-*9*3ͷίʔυྫ վ defmodule Greeter do def start do spawn(__MODULE__, :loop,

    []) end def hello(greeter, name) do send(greeter, {:hello, name}) end # ͜͜͸privateͬΆ͍ؾ࣋ͪ def loop do receive do {:hello, name} -> IO.puts "Hello #{name}" end loop() end end greeter = Greeter.start Greeter.hello(greeter, name) ࣮૷ͷৄࡉ ϓϩηεͷىಈͱ͔ɺ ϝοηʔδͷ΍ΓऔΓͷੜʑ͍͠ ͱ͜Ζ ͸Ӆ͢