Your SlideShare is downloading. ×
0
TEW4 Yatce deprecated slides
TEW4 Yatce deprecated slides
TEW4 Yatce deprecated slides
TEW4 Yatce deprecated slides
TEW4 Yatce deprecated slides
TEW4 Yatce deprecated slides
TEW4 Yatce deprecated slides
TEW4 Yatce deprecated slides
TEW4 Yatce deprecated slides
TEW4 Yatce deprecated slides
TEW4 Yatce deprecated slides
TEW4 Yatce deprecated slides
TEW4 Yatce deprecated slides
TEW4 Yatce deprecated slides
TEW4 Yatce deprecated slides
TEW4 Yatce deprecated slides
TEW4 Yatce deprecated slides
TEW4 Yatce deprecated slides
TEW4 Yatce deprecated slides
TEW4 Yatce deprecated slides
TEW4 Yatce deprecated slides
TEW4 Yatce deprecated slides
TEW4 Yatce deprecated slides
TEW4 Yatce deprecated slides
TEW4 Yatce deprecated slides
TEW4 Yatce deprecated slides
TEW4 Yatce deprecated slides
TEW4 Yatce deprecated slides
TEW4 Yatce deprecated slides
TEW4 Yatce deprecated slides
TEW4 Yatce deprecated slides
TEW4 Yatce deprecated slides
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

TEW4 Yatce deprecated slides

1,206

Published on

ボツにしたスライド。

ボツにしたスライド。

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,206
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
































  • Transcript

    • 1. (loose|tight) couplings in Erlang 4th Tokyo Erlang Workshop in Aoyama, 2010/2/26 @kuenishi http://creativecommons.org/licenses/by-sa/2.1/jp/
    • 2. S O A
    • 3. SOA :
    • 4. tightly coupled loosely coupled generalized Pros fast failure separation extensible specialized Cons failure companion slow less extensible
    • 5. fast tightly ideal coupled standard specialized loosely useless coupled slow
    • 6. BERT/BERT-RPC Erlang Serialization Specs, with extended specs for RPC, --{call, Module, Function, Arguments} --> {reply, { some, term, Value }} Binary ERlang Term, Older than any of below; Thrift, Protocol Buffers, Avro, MsgPack...
    • 7. BERT/BERT-RPC cont’d Older than any of below; Thrift, Protocol Buffers, Avro, MsgPack... Various Implementations C++, Clojure, Erlang, Factor (?), Go, Haskell, JavaScript, Python, Ruby, Scala.
    • 8. How to use BERT in C #include “ei.h” INCLUDES= -I$(EI)/include LDFLAGS= -L$(EI)/lib -lei EILIB= `code:lib_dir(erl_interface).` erl_interface.h is deprecated.
    • 9. Erlang -> Java JInterface, included in OTP release package by default, vice versa.
    • 10. C -> Erlang C node, CORBA (no way!), any other loose-coupling interface.
    • 11. Erlang -> C With BERT, There are 4 ways-> C node, Port Driver, Linked-in Driver, NIF.
    • 12. C node A process behaves like an Erlang node, BERT/TCP connected, Failure doesn’t involve the other. main(){ ... TCP Erlang C node ... node }
    • 13. Port Driver ==Popen3, BERT/stdin/stdout connected, tolerant for Child process’ failure. fork/exec stdin Erlang any CUI process stdout
    • 14. Linked-in Driver in-process erlang-port, % acts like an Erlang process % Message can be sent/recv’d, less failure-separeted. Erlang process output(..){ ?DEMO. ... }
    • 15. Native Interface Functions Since R13B03, Beta, Built-in code runs inside ERTS, almost hacking ERTS, Erlang process Nothing separated. hello(..){ ... }
    • 16. NIF fast tightly ideal coupled Linked-in Driver standard specialized Port Driver loosely useless coupled C node slow
    • 17. Examples: Erlang TC drivers
    • 18. tcerl Pioneer in TC-Erlang! Port driver, “I couldn’t make it work”, - matthew, seems not being maintained.
    • 19. Toke Most famous in TC-Erlang, Linked-in driver, Simple: just what matthew/LShift wants, to be used in RabbitMQ?.
    • 20. Yatce Made in Japan by me, Linked-in driver (0.10) / NIF (0.20), interface based on tokyocabinet.idl, maybe fastest...(see graphs)
    • 21. Yatce 0.20 fast tightly ideal coupled Toke standard specialized tcerl loosely useless coupled?? slow
    • 22. Comparison
    • 23. less-related Conclusion all these technologies are based on Erlang Binary format. It’s great.
    • 24. Any Questions? or come on to the party and ask me!
    • 25. References ERTS: Interoperability tutorial guide http://www.erlang.org/doc/tutorial/overview.html BERT/BERT-RPC http://github.com/blog/531-introducing-bert-and-bert-rpc http://bert-rpc.org/ Erlang external term format http://erlang.org/doc/apps/erts/erl_ext_dist.html NIF http://erlang.org/doc/man/erl_nif.html Toke, vs tcerl http://bit.ly/8nPhm2 Erlang external term format

    ×