• Email
  • Like
  • Save
  • Private Content
  • Embed
 

Hybrid concurrency patterns

by on Oct 24, 2012

  • 34,497 views

Ruby developers need to stop using EventMachine. It's the wrong direction. ...

Ruby developers need to stop using EventMachine. It's the wrong direction.

Lost in the "Threads vs Event Driven vs Process Spawning" debate is that you can combine them! Learn how Celluloid is improving thread programming by abstracting them using a higher level framework called Celluloid, how you can use Celluloid::IO to throw a reactor pattern into a thread. Using this approach, you can take advantage of threading and use all CPU power on a machine with JRuby or Rubinius. I also discuss the future of distributed objects and computing, and where I think things are going.

Accessibility

Categories

Upload Details

Uploaded via SlideShare as Apple Keynote

Usage Rights

CC Attribution-ShareAlike LicenseCC Attribution-ShareAlike License

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

Cancel

36 Embeds 713

https://twitter.com 330
http://deepencpp.blogspot.com 82
http://deepencpp.blogspot.ru 78
http://reader.afp-group.com 28
http://www.twylah.com 25
http://localhost 21
http://twylah.local 20
http://feeds.feedburner.com 19
http://staging.twylah.com 14
http://nuevospowerpoints.blogspot.com 12
http://nuevospowerpoints.blogspot.com.es 11
https://si0.twimg.com 9
http://twitter.com 9
http://www.linkedin.com 6
http://www.newsblur.com 6
http://nuevospowerpoints.blogspot.mx 5
http://rssminer.net 4
http://deepencpp.blogspot.cz 3
http://deepencpp.blogspot.nl 3
http://x-web-64-5 3
http://videofork.com 3
http://bazqux.com 3
http://deepencpp.blogspot.ca 2
http://127.0.0.1 2
http://www.m.techgig.com 2
http://hydsglorial.blogspot.com 2
http://mundo-powerpoints.blogspot.com.es 2
http://feedspot.com 1
http://deepencpp.blogspot.hu 1
http://deepencpp.blogspot.de 1
http://www.techgig.com 1
http://redis.io 1
http://tweetedtimes.com 1
http://www.crowdlens.com 1
http://moderation.local 1
http://feedproxy.google.com 1

More...

Statistics

Likes
67
Downloads
127
Comments
12
Embed Views
713
Views on SlideShare
33,784
Total Views
34,497

110 of 12 previous next Post a comment

  • arathoward Ara Howard, Owner and Founder at owner at dojo4.com, llc. i really can't tell all you young kids how much of my life i've spent debugging shitty threaded code and writing libraries to make is less error prone. it can't be done. give up. move on. 7 months ago
    Are you sure you want to
    Your message goes here
    Processing…
  • brendte Brendten Eickstaedt, CTO / VP Engineering at Mavizon @bdicasa I certainly agree that detecting bugs caused by non-threadsafe code can be very difficult, my core thesis remains strong and I stick to it. If you focus on making your code threadsafe when you design and build it initially, then you don't NEED to worry about finding bugs due to threading issues. When thread safety is written into every object from the start (which really isn't all that hard, really) then you won't have to address threading bugs, because they won't exist. 7 months ago
    Are you sure you want to
    Your message goes here
    Processing…
  • bdicasa bdicasa @Brendten I'm not arguing the fact that knowing how to write thread-safe code is an absolute for any software developer. I'm also not arguing the fact that learning how to write thread safe code is hard. However issues with threading can be hard to detect, so why not use concurrency patterns that help you to avoid race conditions and deadlocks? 7 months ago
    Are you sure you want to
    Your message goes here
    Processing…
  • brendte Brendten Eickstaedt, CTO / VP Engineering at Mavizon @peterashford9 So true, Peter. I love Ruby, but I'm not a 'Rubyist'. A problem I've always had with a large group of 'rubyists' out there is that they seem to think being a Ruby dev absolves them from learning CS fundamentals in any way. You can't be a ruby developer without being a developer. Just because you started out as a Web designer/developer and found Ruby by way of Rails doesn't mean you can just ignore and/or not learn and practice the skills that are required fundamentals for software engineers using other languages. I would never even considering hiring a Java dev who couldn't write threadsafe code. Why should I consider hiring a 'rubyist' who can't, either? I hire developers who have the skills and knowledge that form the foundations of CS. If you have that, you can learn Java, or Ruby, or Python, or Objective C, or (*gack*) C# (or even more esoteric languages and frameworks we might use from time to time like Erlang, or OCaml, or Haskell, or whatever). 7 months ago
    Are you sure you want to
    Your message goes here
    Processing…
  • brendte Brendten Eickstaedt, CTO / VP Engineering at Mavizon @bdicasa Let's be clear: threads don't introduce problems, programmers who don't know how to use them, or who use them carelessly, introduce the problems. My argument here is that as a developer living and working in a multi-processor, multi-core world, you MUST understand threads and how to write threadsafe code. This should be a core part of everything you do when you design your software. Think about this: Tony has done a really nice job with Celluloid (and I have used it myself on occasion), but what if he gets hit by a bus, or if he suddenly decides to stop open-sourcing the code? Or what if you're not using Celluloid, and developing with MRI in mind, but along comes another developer 5 years after you've moved on to greener pastures, and decides to run your code on JRuby? What will happen to all of this code? It will be broken, and it will be your fault. Why? Because you chose to ignore the 'difficult' problems of multi-threaded concurrency when you originally designed and wrote your code. So, contrary to your assertion that 'it helps to understand how threading works,' I assert that you MUST understand how threading works (and as a corollary, how to write threadsafe code) in order to be even a competent software engineer in the world today. 7 months ago
    Are you sure you want to
    Your message goes here
    Processing…
  • peterashford9 Peter Ashford Agree with Brendten: I'm always bemused with the programmer fashionistas going about how threading is *so hard*. It's not really. Yes, there are a few pitfalls you can fall in to, but there's a lot of information out there about how to do this stuff and in the end, the amount of code that's actually *doing* any threading is a tiny part of any application. I wonder if the whole 'threads are hard' manta is really just an excuse for the fact that a lot of 'cool' languages don't support them? 7 months ago
    Are you sure you want to
    Your message goes here
    Processing…
  • gregorytomei Gregory Tomei, Senior Software Engineer at Handl, Inc. interesting take on this. thanks for the prez 7 months ago
    Are you sure you want to
    Your message goes here
    Processing…
  • bdicasa bdicasa Absolutely it helps to understand how threading works and it will make you a better developer. But many problems can be solved by these higher levels of abstractions which help avoid problems that threading can introduce. 7 months ago
    Are you sure you want to
    Your message goes here
    Processing…
  • brendte Brendten Eickstaedt, CTO / VP Engineering at Mavizon Oh, and by the way, Scala and Go absolutely DO NOT do away with threading. They merely hide it from programmers so they can't 'screw it up' and so they 'don't have to be bothered' with them. That's fine when appropriate, but to ignore that threads exist, and that we must know how to use them correctly, is simply irresponsible. 7 months ago
    Are you sure you want to
    Your message goes here
    Processing…
  • brendte Brendten Eickstaedt, CTO / VP Engineering at Mavizon Of course they are, because people refuse to learn how to use threads properly. It's not hard, it just takes effort and precise thinking. Alternative concurrency models have been around for a very long time (Scala didn't invent Actors), but it seems that no matter what, we always come back to the basics: learn how to properly use threads. An analogy can be drawn from mathematics: to be a mathematician, you must be able to solve differential equations with nothing more than a pencil and a piece of paper, even though you often time will probably choose to use Matlab, or Mathematica, or something like that. You don't go right to the tool that abstracts away the complexity because you don't understand how to do it by hand, you go to it once you know how to do it by hand, and need something to make it more efficient for you to solve. And you only do this when it is appropriate to do so, rather than relying on it as the only way to do it. 7 months ago
    Are you sure you want to
    Your message goes here
    Processing…

110 of 12 previous next

Post Comment
Edit your comment

Hybrid concurrency patterns Hybrid concurrency patterns Presentation Transcript