Hybrid concurrency patterns

4 min read Original article ↗

More Related Content

Model with actors and implement with Akka

Actor Patterns and NATS - Boulder Meetup

The Actor Model - Towards Better Concurrency

Bringing Concurrency to Ruby - RubyConf India 2014

Fast, concurrent ruby web applications with EventMachine and EM::Synchrony

Ruby is dying. What languages are cool now?

What's hot

Building GUI App with Electron and Lisp

Actor model : A Different Concurrency Approach

Kevin Whinnery: Write Better JavaScript

Culerity - Headless full stack testing for JavaScript

Clojure Conj 2014 - Paradigms of core.async - Julian Gamble

Functional Programming in Clojure

Applying the paradigms of core.async in Clojure and ClojureScript

Ruby projects of interest for DevOps

JRuby: Pushing the Java Platform Further

Ruby in office time reboot

Rubykaigi 2017-nishimotz-v6

Similar to Hybrid concurrency patterns

TorqueBox at DC:JBUG - November 2011

Concurrency patterns in Ruby

Concurrency patterns in Ruby

Ruby Concurrency Realities

Concurrent Programming with Ruby and Tuple Spaces

Ruby's Concurrency Management: Now and Future

Ruby Performance - The Last Mile - RubyConf India 2016

Concurrent programming with Celluloid (MWRC 2012)

Don’t block the event loop!

Servers with Event Machine - David Troy - RailsConf 2011

Celluloid - Beyond Sidekiq

Recently uploaded

Streaming Apps and Movie Platforms Trends 2026

Top 10 Oscar Wining Block Buster Movies of All Time

Call Sheet Media A Trusted Platform for New Film Writers Worldwide.pdf

The Future of Free Streaming Apps: Movies, TV Shows & Live Channels 2026

VEEPS - Market Analysis Report by William Heredia

Hell’s Heir: The Awakening – Part One (Dark Fantasy Epic)

Releases of Devsaab - Goldie Movies Mumbai

Freedom From The Forge – Part Two (Dark Fantasy Epic)

Female Emcee Keerthi subha | Professional Anchor from Chennai for Corporate, ...

Male Emcee Akshay | Professional Anchor from Chennai for Corporate, Family & ...

Male Emcee Vignesh | Professional Anchor from Chennai for Corporate, Family &...

SlideEgg_502178-2026 Holidays.......pptx

Female Emcee Kavya Shree | Professional Anchor from Chennai for Corporate, Fa...

Hybrid concurrency patterns

  • 1.

    Threads and Events in Harmony with Celluloid Kyle Drake

  • 2.

    Hi, I’m KyleDrake. I work at Geoloqi Esri. We built a geofencing Text and real-time location streaming platform.

  • 3.
  • 4.

    I was reallyinto pure event-driven Text (reactor pattern based) architecture.

  • 5.

    EventMachine, Twisted, Node.js • Event-driven Text • No threads • One CPU core • Process Spawning

  • 6.
  • 7.
  • 8.
  • 9.

    EventMachine is • Afrankenstein - guts the ruby internals • Not in active development Text • Makes non-blocking IO block • Requires special code from Ruby libraries • Hard to use in an OOP way • Is really difficult to work with • Poorly documented

  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 18.

    Ruby MRI: Global InterpreterLock (single CPU core) Rubinius and JRuby: Full threading (multiple CPU cores) ~20KB per thread

  • 19.
  • 20.
  • 21.
  • 22.

    Let’s fix itby abstracting threads into how humans think!

  • 24.
  • 25.

    Each actor isa concurrent object running in its own thread

  • 28.
  • 30.
  • 31.

    “..seasoned engineers are usinga mix of threaded, event-based, and alternative concurrency approaches like Actors” - Alex Payne

  • 32.

    What if wecould combine threads and reactor patterns.. and actors?!

  • 33.

    https://github.com/celluloid/celluloid-io • One reactorpattern per Celluloid object • Multiple reactors? No problem! • Doesn’t mess with code outside of actor • Utilizes all CPU cores (using JRuby and Rubinius) • Websockets, messaging systems, your hugely successful blog

  • 34.
  • 35.
  • 36.

    "I thought ofobjects being like biological cells and/or individual computers on a network, only able to communicate with messages" - Alan Kay

  • 37.

    Guess who wasreally into distributed network objects?

  • 39.

    NeXT experimented with distributed objects in the mid 90s. NeXT was way ahead of its time.

  • 40.

    "Objects can messageobjects transparently that live on other machines over the network, and you don't have to worry about the networking gunk, and you don't have to worry about finding them, and you don't have to worry about anything. It's just as if you messaged an object that's right next door." - Steve Jobs

  • 41.
  • 42.

    https://github.com/celluloid/dcell • Objectstalk over networks! • Uses 0MQ • Aware of eachothers’ existence • Distributed gossip protocol • Web UI • In the early stages, very promising

  • 43.
  • 44.
  • 45.

Editor's Notes