Twisted

531 views

Published on

A twisted lightning talk that i presented in a dojo with some friends

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
531
On SlideShare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
6
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Twisted

  1. 1. Twisted @alepoletto
  2. 2. Twisted and Metal? @alepoletto
  3. 3. Fist things first @alepoletto
  4. 4. @alepoletto
  5. 5. synchronous @alepoletto
  6. 6. WTF@alepoletto
  7. 7. Lets Compare again With Blocks @alepoletto
  8. 8. And the winner is... @alepoletto
  9. 9. AsynchronousAsynchronous is good when:-There is a lot of tasks to perform.-The tasks perform lots of I/O.-Independent tasks.….PERFECT FOR NETWORK!!! @alepoletto
  10. 10. But HOW @alepoletto
  11. 11. Reactor Pattern @alepoletto
  12. 12. Reactor Impl?team = ["superman", "batman", "aquaman"]while team : #event loop t = selectAvailableHero(team) # this method gives a hero when one is available # BLOCK here while wait for a hero doHeroStuff(t) @alepoletto
  13. 13. Let me show you a kick ass Reactor Implementation @alepoletto
  14. 14. @alepoletto
  15. 15. Some Code...A Hero Server @alepoletto
  16. 16. A Hero Client @alepoletto
  17. 17. References• http://krondo.com/?page_id=1327• http://twistedmatrix.com/trac/ @alepoletto
  18. 18. @alepoletto

×