SlideShare a Scribd company logo
1 of 37
Download to read offline
www.italiancpp.org
C++ Actor Model
You’ve Got Mail ...
Italian C++ Community
Why are we here?
Italian C++ Community
std::thread/async, isn’t it enough?
Italian C++ Community
std::thread/async, isn’t it enough?
Example code: double_poll
Poll Left Poll Right
Thread 1 Thread 2
Acc
Increment
Add Add
Italian C++ Community
Concurrency model
- Single Thread → Node.js
- Actor Model → Erlang
- CSP → GO
- STM → Clojure
- etc ...
Italian C++ Community
Node.js
It’s simple
One thread
Asynchronous I/O (event-loop)
Italian C++ Community
Node.js - Examples
var fs = require("fs");
fs.readFile('/etc/passwd', function (err, data) {
if (err) throw err;
console.log("-> " + data + " <-");
});
----
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello Worldn');
}).listen(1337, "127.0.0.1");
console.log('Server running at http://127.0.0.1:1337/');
Italian C++ Community
Node.js - Is it fast?
ab -n 10000 -c 1000 http://127.0.0.1:1337/
Time taken for tests: 1.283 seconds
Complete requests: 10000
Total transferred: 1130000 bytes
Requests per second: 7797.21 [#/sec] (mean)
Time per request: 128.251 [ms] (mean)
Time per request: 0.128 [ms] (mean, across all concurrent requests)
Transfer rate: 860.43 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 58 232.7 0 1000
Processing: 5 20 27.1 13 420
Waiting: 5 20 27.1 13 420
Total: 13 78 246.5 13 1234
Italian C++ Community
Node.js - Is it fast?
YES!!!
Italian C++ Community
Concurrency model
Single Thread → Node.js (Good)
Can we do better?
Copy from others ...
Italian C++ Community
Erlang
Erlang is a programming language used to build massively
scalable soft real-time systems with requirements on high
availability.
Italian C++ Community
Actor Model
Italian C++ Community
A model of concurrent computation
that treats "actors" as the primitives
and fundamental units of computation.
Actor Model
Italian C++ Community
Actor Model
It should embody three properties:
● Processing → Can do something
● Storage → Can remember something
● Communication → Can communicate with
others
Italian C++ Community
Actor Model
In an actors system:
● Everything is an actor
● An actor is an entity that sends, receives
messages
● An actor is an entity with a behaviour
Italian C++ Community
In response to a message that it receives, an
actor can:
● create more actors
● send messages to other actors
● determine how to respond to the next
message received
Actor Model
Italian C++ Community
Actor Model
A1
A3
M1
A21
A22
A23
M2
M3
A2
Italian C++ Community
Actor Model
Does it work?
Is it fast?
Italian C++ Community
Erlang - Results
ab -n 10000 -c 1000 http://127.0.0.1:8080/
Time taken for tests: 0.538 seconds
Complete requests: 10000
Total transferred: 1300000 bytes
Requests per second: 18604.20 [#/sec] (mean)
Time per request: 53.751 [ms] (mean)
Time per request: 0.054 [ms] (mean, across all concurrent requests)
Transfer rate: 2361.86 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 10 4.8 10 27
Processing: 7 16 4.8 16 39
Waiting: 5 13 4.2 13 34
Total: 8 26 8.3 26 59
Italian C++ Community
Erlang vs Node.js - Results
Node.js
Time taken for tests: 1.461 seconds
Total transferred: 1140000 bytes
Requests per second: 6843.55 [#/sec]
Time per request: 146.123 [ms]
Time per request: 0.146 [ms]
Transfer rate: 761.88 [Kbytes/sec]
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 59 234.5 0 1001
Processing: 8 22 40.7 14 443
Waiting: 7 22 40.7 14 443
Total: 10 81 262.9 14 1443
Erlang
Time taken for tests: 0.538 seconds
Total transferred: 1300000 bytes
Requests per second: 18604.20 [#/sec]
Time per request: 53.751 [ms]
Time per request: 0.054 [ms]
Transfer rate: 2361.86 [Kbytes/sec]
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 10 4.8 10 27
Processing: 7 16 4.8 16 39
Waiting: 5 13 4.2 13 34
Total: 8 26 8.3 26 59
Italian C++ Community
Actor Model - Is it Fast?
YES!!!
Italian C++ Community
Erlang - Example
https://github.com/extend/cowboy
Italian C++ Community
C++ - Actor model
Italian C++ Community
C++ library
● http://neverlord.github.io/libcppa/ - Erlang inspired
● http://www.theron-library.com/ - No fault - No Event IO
● https://code.google.com/p/actor-cpp/source/list - Not developed since
2012
● https://code.google.com/p/libactor/ - Right now it is usable, although it
may not be ready for production
● https://casablanca.codeplex.com/ - Removed actor?!?!
● http://www.stdthread.co.uk/ - No OSS
Italian C++ Community
libcppa - Features
● Lightweight actor implementations
● Pattern matching for messages
● Error handling based on Erlang’s failure
model
● etc ..
Italian C++ Community
libcppa - Is it enough?
Can it solve the initial problem?
example code: double_poll_actor
Italian C++ Community
libcppa - Is it enough?
Main
Poll
Left
Poll
Right
Acc
poll
poll
at
incLeft
incRight
inc
beast
beast
threshold
fire
fire
Italian C++ Community
libcppa - Actor == thread?
How many actors can I spawn?
A lot!!!!
example code: how_many_actors
Italian C++ Community
libcppa - Errors
● Isolated
● Linked
● Monitored
example code: err_mng
Italian C++ Community
libcppa - I/O - brokers
A broker is an event-based actor running in the
middleman that multiplexes socket I/O
Italian C++ Community
libcppa - I/O - brokers
● Create in particular way
● Receive special messages from “system”
● Can take ownership of given connection
example code: http_actor
Italian C++ Community
libcppa - Is it fast???
ab -n 10000 -c 1000 http://127.0.0.1:1339/
Time taken for tests: 0.438 seconds
Complete requests: 10000
Total transferred: 1480000 bytes
Requests per second: 22848.00 [#/sec] (mean)
Time per request: 43.767 [ms] (mean)
Time per request: 0.044 [ms] (mean, across all concurrent requests)
Transfer rate: 3302.25 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 1 5 5.6 3 26
Processing: 1 6 5.9 4 222
Waiting: 1 4 4.8 3 221
Total: 3 11 10.6 7 231
Italian C++ Community
libcppa vs Erlang - Results
libcppa
Time taken for tests: 0.438 seconds
Total transferred: 1480000 bytes
Requests per second: 22848.00 [#/sec]
Time per request: 43.767 [ms]
Time per request: 0.044 [ms]
Transfer rate: 3302.25 [Kbytes/sec]
Connection Times (ms)
min mean[+/-sd] median max
Connect: 1 5 5.6 3 26
Processing: 1 6 5.9 4 222
Waiting: 1 4 4.8 3 221
Total: 3 11 10.6 7 231
Erlang
Time taken for tests: 0.538 seconds
Total transferred: 1300000 bytes
Requests per second: 18604.20 [#/sec]
Time per request: 53.751 [ms]
Time per request: 0.054 [ms]
Transfer rate: 2361.86 [Kbytes/sec]
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 10 4.8 10 27
Processing: 7 16 4.8 16 39
Waiting: 5 13 4.2 13 34
Total: 8 26 8.3 26 59
Italian C++ Community
libcppa - Is it fast???
YES!!!
Italian C++ Community
Actor Model
Gianluca Padovani
SW craftsmanship, TDD addicted, agile coach. I like Ruby,
NodeJs and everything is interesting. I also work a lot on C#,
C++. I like to code, a lot :-)
https://www.linkedin.com/pub/gianluca-padovani/2/261/a92
https://twitter.com/GPad619
https://github.com/gpad
http://www.slideshare.net/gpadovani
Italian C++ Community
Reference
● Carl Hewitt's Homepage
● Hewitt, Meijer and Szyperski: The Actor Model
● Takeaways from Hewitt, Meijer and Szyperski’s talk on the Actor model
● https://github.com/Neverlord/libcppa
● http://libcppa.blogspot.de/
● Dominik Charousset and Matthias Vallentin: libcppa -- Designing an Actor
Semantic for C++11
● https://github.com/mavam/vast
● Learn you some Erlang
● https://github.com/extend/cowboy
● Actors are not a good concurrency model
● Seven Languages in Seven Weeks: A Pragmatic Guide to Learning
Programming Languages
Italian C++ Community
Actor Model
Thank You!

More Related Content

What's hot

Dark Silicon, Mobile Devices, and Possible Open-Source Solutions
Dark Silicon, Mobile Devices, and Possible Open-Source SolutionsDark Silicon, Mobile Devices, and Possible Open-Source Solutions
Dark Silicon, Mobile Devices, and Possible Open-Source SolutionsKoan-Sin Tan
 
Need for Async: Hot pursuit for scalable applications
Need for Async: Hot pursuit for scalable applicationsNeed for Async: Hot pursuit for scalable applications
Need for Async: Hot pursuit for scalable applicationsKonrad Malawski
 
Future of Kotlin - How agile can language development be?
Future of Kotlin - How agile can language development be?Future of Kotlin - How agile can language development be?
Future of Kotlin - How agile can language development be?Andrey Breslav
 
Introduction to the intermediate Python - v1.1
Introduction to the intermediate Python - v1.1Introduction to the intermediate Python - v1.1
Introduction to the intermediate Python - v1.1Andrei KUCHARAVY
 
Introduction to Kotlin for Java developer
Introduction to Kotlin for Java developerIntroduction to Kotlin for Java developer
Introduction to Kotlin for Java developerShuhei Shogen
 
A Taste of Clojure
A Taste of ClojureA Taste of Clojure
A Taste of ClojureDavid Leung
 
Kotlin Language powerpoint show file
Kotlin Language powerpoint show fileKotlin Language powerpoint show file
Kotlin Language powerpoint show fileSaurabh Tripathi
 
A gentle introduction into AKKA and the actor model
A gentle introduction into AKKA and the actor modelA gentle introduction into AKKA and the actor model
A gentle introduction into AKKA and the actor modelMykhailo Kotsur
 
Xtext beyond the defaults - how to tackle performance problems
Xtext beyond the defaults -  how to tackle performance problemsXtext beyond the defaults -  how to tackle performance problems
Xtext beyond the defaults - how to tackle performance problemsHolger Schill
 
Real world functional reactive programming
Real world functional reactive programmingReal world functional reactive programming
Real world functional reactive programmingEric Polerecky
 
Working With Concurrency In Java 8
Working With Concurrency In Java 8Working With Concurrency In Java 8
Working With Concurrency In Java 8Heartin Jacob
 
ScalaSwarm 2017 Keynote: Tough this be madness yet theres method in't
ScalaSwarm 2017 Keynote: Tough this be madness yet theres method in'tScalaSwarm 2017 Keynote: Tough this be madness yet theres method in't
ScalaSwarm 2017 Keynote: Tough this be madness yet theres method in'tKonrad Malawski
 
Erlang For Five Nines
Erlang For Five NinesErlang For Five Nines
Erlang For Five NinesBarcamp Cork
 

What's hot (20)

Dark Silicon, Mobile Devices, and Possible Open-Source Solutions
Dark Silicon, Mobile Devices, and Possible Open-Source SolutionsDark Silicon, Mobile Devices, and Possible Open-Source Solutions
Dark Silicon, Mobile Devices, and Possible Open-Source Solutions
 
Need for Async: Hot pursuit for scalable applications
Need for Async: Hot pursuit for scalable applicationsNeed for Async: Hot pursuit for scalable applications
Need for Async: Hot pursuit for scalable applications
 
Future of Kotlin - How agile can language development be?
Future of Kotlin - How agile can language development be?Future of Kotlin - How agile can language development be?
Future of Kotlin - How agile can language development be?
 
Introduction to the intermediate Python - v1.1
Introduction to the intermediate Python - v1.1Introduction to the intermediate Python - v1.1
Introduction to the intermediate Python - v1.1
 
Introduction to Kotlin for Java developer
Introduction to Kotlin for Java developerIntroduction to Kotlin for Java developer
Introduction to Kotlin for Java developer
 
A Taste of Clojure
A Taste of ClojureA Taste of Clojure
A Taste of Clojure
 
Kotlin Language powerpoint show file
Kotlin Language powerpoint show fileKotlin Language powerpoint show file
Kotlin Language powerpoint show file
 
Android with kotlin course
Android with kotlin courseAndroid with kotlin course
Android with kotlin course
 
Kotlin - Better Java
Kotlin - Better JavaKotlin - Better Java
Kotlin - Better Java
 
Fork Join
Fork JoinFork Join
Fork Join
 
Erlang OTP
Erlang OTPErlang OTP
Erlang OTP
 
A gentle introduction into AKKA and the actor model
A gentle introduction into AKKA and the actor modelA gentle introduction into AKKA and the actor model
A gentle introduction into AKKA and the actor model
 
Fork/Join for Fun and Profit!
Fork/Join for Fun and Profit!Fork/Join for Fun and Profit!
Fork/Join for Fun and Profit!
 
Xtext beyond the defaults - how to tackle performance problems
Xtext beyond the defaults -  how to tackle performance problemsXtext beyond the defaults -  how to tackle performance problems
Xtext beyond the defaults - how to tackle performance problems
 
Kotlin
KotlinKotlin
Kotlin
 
Fork Join (BeJUG 2012)
Fork Join (BeJUG 2012)Fork Join (BeJUG 2012)
Fork Join (BeJUG 2012)
 
Real world functional reactive programming
Real world functional reactive programmingReal world functional reactive programming
Real world functional reactive programming
 
Working With Concurrency In Java 8
Working With Concurrency In Java 8Working With Concurrency In Java 8
Working With Concurrency In Java 8
 
ScalaSwarm 2017 Keynote: Tough this be madness yet theres method in't
ScalaSwarm 2017 Keynote: Tough this be madness yet theres method in'tScalaSwarm 2017 Keynote: Tough this be madness yet theres method in't
ScalaSwarm 2017 Keynote: Tough this be madness yet theres method in't
 
Erlang For Five Nines
Erlang For Five NinesErlang For Five Nines
Erlang For Five Nines
 

Viewers also liked

Actor Model and C++: what, why and how?
Actor Model and C++: what, why and how?Actor Model and C++: what, why and how?
Actor Model and C++: what, why and how?Yauheni Akhotnikau
 
The Actor Model applied to the Raspberry Pi and the Embedded Domain
The Actor Model applied to the Raspberry Pi and the Embedded DomainThe Actor Model applied to the Raspberry Pi and the Embedded Domain
The Actor Model applied to the Raspberry Pi and the Embedded DomainOmer Kilic
 
CodeFest 2012. Трескин М. — Разработка Web-приложений на Comet-сервере Nitrogen
CodeFest 2012. Трескин М. — Разработка Web-приложений на Comet-сервере NitrogenCodeFest 2012. Трескин М. — Разработка Web-приложений на Comet-сервере Nitrogen
CodeFest 2012. Трескин М. — Разработка Web-приложений на Comet-сервере NitrogenCodeFest
 
Erlang vs. Java
Erlang vs. JavaErlang vs. Java
Erlang vs. JavaArtan Cami
 
Модель акторов и C++ что, зачем и как?
Модель акторов и C++ что, зачем и как?Модель акторов и C++ что, зачем и как?
Модель акторов и C++ что, зачем и как?Yauheni Akhotnikau
 
Шишки, набитые за 15 лет использования акторов в C++
Шишки, набитые за 15 лет использования акторов в C++Шишки, набитые за 15 лет использования акторов в C++
Шишки, набитые за 15 лет использования акторов в C++Yauheni Akhotnikau
 
맛만 보자 액터 모델이란
맛만 보자 액터 모델이란 맛만 보자 액터 모델이란
맛만 보자 액터 모델이란 jbugkorea
 
thread-clustering
thread-clusteringthread-clustering
thread-clusteringdavidkftam
 
Использование юнит-тестов для повышения качества разработки
Использование юнит-тестов для повышения качества разработкиИспользование юнит-тестов для повышения качества разработки
Использование юнит-тестов для повышения качества разработкиvictor-yastrebov
 
Евгений Рыжков, Андрей Карпов Как потратить 10 лет на разработку анализатора ...
Евгений Рыжков, Андрей Карпов Как потратить 10 лет на разработку анализатора ...Евгений Рыжков, Андрей Карпов Как потратить 10 лет на разработку анализатора ...
Евгений Рыжков, Андрей Карпов Как потратить 10 лет на разработку анализатора ...Platonov Sergey
 
Алексей Кутумов, C++ без исключений, часть 3
Алексей Кутумов,  C++ без исключений, часть 3Алексей Кутумов,  C++ без исключений, часть 3
Алексей Кутумов, C++ без исключений, часть 3Platonov Sergey
 
Фитнес для вашего кода: как держать его в форме
Фитнес для вашего кода: как держать его в формеФитнес для вашего кода: как держать его в форме
Фитнес для вашего кода: как держать его в формеIlia Shishkov
 
Galvin-operating System(Ch8)
Galvin-operating System(Ch8)Galvin-operating System(Ch8)
Galvin-operating System(Ch8)dsuyal1
 
Lecture5
Lecture5Lecture5
Lecture5jntu
 

Viewers also liked (20)

Actor Model and C++: what, why and how?
Actor Model and C++: what, why and how?Actor Model and C++: what, why and how?
Actor Model and C++: what, why and how?
 
The Actor Model applied to the Raspberry Pi and the Embedded Domain
The Actor Model applied to the Raspberry Pi and the Embedded DomainThe Actor Model applied to the Raspberry Pi and the Embedded Domain
The Actor Model applied to the Raspberry Pi and the Embedded Domain
 
Erlang&rails
Erlang&railsErlang&rails
Erlang&rails
 
CodeFest 2012. Трескин М. — Разработка Web-приложений на Comet-сервере Nitrogen
CodeFest 2012. Трескин М. — Разработка Web-приложений на Comet-сервере NitrogenCodeFest 2012. Трескин М. — Разработка Web-приложений на Comet-сервере Nitrogen
CodeFest 2012. Трескин М. — Разработка Web-приложений на Comet-сервере Nitrogen
 
Erlang vs. Java
Erlang vs. JavaErlang vs. Java
Erlang vs. Java
 
Модель акторов и C++ что, зачем и как?
Модель акторов и C++ что, зачем и как?Модель акторов и C++ что, зачем и как?
Модель акторов и C++ что, зачем и как?
 
Шишки, набитые за 15 лет использования акторов в C++
Шишки, набитые за 15 лет использования акторов в C++Шишки, набитые за 15 лет использования акторов в C++
Шишки, набитые за 15 лет использования акторов в C++
 
Http streaming
Http streamingHttp streaming
Http streaming
 
Java Threading
Java ThreadingJava Threading
Java Threading
 
Deadlock
DeadlockDeadlock
Deadlock
 
맛만 보자 액터 모델이란
맛만 보자 액터 모델이란 맛만 보자 액터 모델이란
맛만 보자 액터 모델이란
 
thread-clustering
thread-clusteringthread-clustering
thread-clustering
 
Использование юнит-тестов для повышения качества разработки
Использование юнит-тестов для повышения качества разработкиИспользование юнит-тестов для повышения качества разработки
Использование юнит-тестов для повышения качества разработки
 
Евгений Рыжков, Андрей Карпов Как потратить 10 лет на разработку анализатора ...
Евгений Рыжков, Андрей Карпов Как потратить 10 лет на разработку анализатора ...Евгений Рыжков, Андрей Карпов Как потратить 10 лет на разработку анализатора ...
Евгений Рыжков, Андрей Карпов Как потратить 10 лет на разработку анализатора ...
 
Алексей Кутумов, C++ без исключений, часть 3
Алексей Кутумов,  C++ без исключений, часть 3Алексей Кутумов,  C++ без исключений, часть 3
Алексей Кутумов, C++ без исключений, часть 3
 
Фитнес для вашего кода: как держать его в форме
Фитнес для вашего кода: как держать его в формеФитнес для вашего кода: как держать его в форме
Фитнес для вашего кода: как держать его в форме
 
Galvin-operating System(Ch8)
Galvin-operating System(Ch8)Galvin-operating System(Ch8)
Galvin-operating System(Ch8)
 
Ch05
Ch05Ch05
Ch05
 
Threading
ThreadingThreading
Threading
 
Lecture5
Lecture5Lecture5
Lecture5
 

Similar to C++ Actor Model - You’ve Got Mail ...

Apidays Paris 2023 - Forget TypeScript, Choose Rust to build Robust, Fast and...
Apidays Paris 2023 - Forget TypeScript, Choose Rust to build Robust, Fast and...Apidays Paris 2023 - Forget TypeScript, Choose Rust to build Robust, Fast and...
Apidays Paris 2023 - Forget TypeScript, Choose Rust to build Robust, Fast and...apidays
 
Kernel Recipes 2019 - Metrics are money
Kernel Recipes 2019 - Metrics are moneyKernel Recipes 2019 - Metrics are money
Kernel Recipes 2019 - Metrics are moneyAnne Nicolas
 
Docker and Fluentd
Docker and FluentdDocker and Fluentd
Docker and FluentdN Masahiro
 
The Onward Journey: Porting Twisted to Python 3
The Onward Journey: Porting Twisted to Python 3The Onward Journey: Porting Twisted to Python 3
The Onward Journey: Porting Twisted to Python 3Craig Rodrigues
 
Pylons + Tokyo Cabinet
Pylons + Tokyo CabinetPylons + Tokyo Cabinet
Pylons + Tokyo CabinetBen Cheng
 
Static Code Analysis and AutoLint
Static Code Analysis and AutoLintStatic Code Analysis and AutoLint
Static Code Analysis and AutoLintLeander Hasty
 
OnAndroidConf 2013: Accelerating the Android Platform Build
OnAndroidConf 2013: Accelerating the Android Platform BuildOnAndroidConf 2013: Accelerating the Android Platform Build
OnAndroidConf 2013: Accelerating the Android Platform BuildDavid Rosen
 
Internazionalizza le tue applicazioni
Internazionalizza le tue applicazioniInternazionalizza le tue applicazioni
Internazionalizza le tue applicazioniQT-day
 
Node.js meetup 17.05.2017 ember.js - escape the javascript fatigue
Node.js meetup 17.05.2017   ember.js - escape the javascript fatigueNode.js meetup 17.05.2017   ember.js - escape the javascript fatigue
Node.js meetup 17.05.2017 ember.js - escape the javascript fatigueTobias Braner
 
How my visualization tools use little memory: A tale of incrementalization an...
How my visualization tools use little memory: A tale of incrementalization an...How my visualization tools use little memory: A tale of incrementalization an...
How my visualization tools use little memory: A tale of incrementalization an...Eugene Kirpichov
 
Experience with C++11 in ArangoDB
Experience with C++11 in ArangoDBExperience with C++11 in ArangoDB
Experience with C++11 in ArangoDBMax Neunhöffer
 
Use React tools for better Angular apps
Use React tools for better Angular appsUse React tools for better Angular apps
Use React tools for better Angular appsMartin Hochel
 
Original slides from Ryan Dahl's NodeJs intro talk
Original slides from Ryan Dahl's NodeJs intro talkOriginal slides from Ryan Dahl's NodeJs intro talk
Original slides from Ryan Dahl's NodeJs intro talkAarti Parikh
 
Building scalable and language independent java services using apache thrift
Building scalable and language independent java services using apache thriftBuilding scalable and language independent java services using apache thrift
Building scalable and language independent java services using apache thriftTalentica Software
 
.Net Architecture and Performance Tuning
.Net Architecture and Performance Tuning.Net Architecture and Performance Tuning
.Net Architecture and Performance TuningGauranG Bajpai
 
Node.js: A Guided Tour
Node.js: A Guided TourNode.js: A Guided Tour
Node.js: A Guided Tourcacois
 
Per aspera ad grid To the grid computing through difficulties
Per aspera ad grid To the grid computing through difficultiesPer aspera ad grid To the grid computing through difficulties
Per aspera ad grid To the grid computing through difficultiesFerenc Szalai
 

Similar to C++ Actor Model - You’ve Got Mail ... (20)

Apidays Paris 2023 - Forget TypeScript, Choose Rust to build Robust, Fast and...
Apidays Paris 2023 - Forget TypeScript, Choose Rust to build Robust, Fast and...Apidays Paris 2023 - Forget TypeScript, Choose Rust to build Robust, Fast and...
Apidays Paris 2023 - Forget TypeScript, Choose Rust to build Robust, Fast and...
 
Code is art
Code is artCode is art
Code is art
 
Kernel Recipes 2019 - Metrics are money
Kernel Recipes 2019 - Metrics are moneyKernel Recipes 2019 - Metrics are money
Kernel Recipes 2019 - Metrics are money
 
Docker and Fluentd
Docker and FluentdDocker and Fluentd
Docker and Fluentd
 
The Onward Journey: Porting Twisted to Python 3
The Onward Journey: Porting Twisted to Python 3The Onward Journey: Porting Twisted to Python 3
The Onward Journey: Porting Twisted to Python 3
 
Return of c++
Return of c++Return of c++
Return of c++
 
Pylons + Tokyo Cabinet
Pylons + Tokyo CabinetPylons + Tokyo Cabinet
Pylons + Tokyo Cabinet
 
Static Code Analysis and AutoLint
Static Code Analysis and AutoLintStatic Code Analysis and AutoLint
Static Code Analysis and AutoLint
 
OnAndroidConf 2013: Accelerating the Android Platform Build
OnAndroidConf 2013: Accelerating the Android Platform BuildOnAndroidConf 2013: Accelerating the Android Platform Build
OnAndroidConf 2013: Accelerating the Android Platform Build
 
Internazionalizza le tue applicazioni
Internazionalizza le tue applicazioniInternazionalizza le tue applicazioni
Internazionalizza le tue applicazioni
 
Node.js meetup 17.05.2017 ember.js - escape the javascript fatigue
Node.js meetup 17.05.2017   ember.js - escape the javascript fatigueNode.js meetup 17.05.2017   ember.js - escape the javascript fatigue
Node.js meetup 17.05.2017 ember.js - escape the javascript fatigue
 
netty_qcon_v4
netty_qcon_v4netty_qcon_v4
netty_qcon_v4
 
How my visualization tools use little memory: A tale of incrementalization an...
How my visualization tools use little memory: A tale of incrementalization an...How my visualization tools use little memory: A tale of incrementalization an...
How my visualization tools use little memory: A tale of incrementalization an...
 
Experience with C++11 in ArangoDB
Experience with C++11 in ArangoDBExperience with C++11 in ArangoDB
Experience with C++11 in ArangoDB
 
Use React tools for better Angular apps
Use React tools for better Angular appsUse React tools for better Angular apps
Use React tools for better Angular apps
 
Original slides from Ryan Dahl's NodeJs intro talk
Original slides from Ryan Dahl's NodeJs intro talkOriginal slides from Ryan Dahl's NodeJs intro talk
Original slides from Ryan Dahl's NodeJs intro talk
 
Building scalable and language independent java services using apache thrift
Building scalable and language independent java services using apache thriftBuilding scalable and language independent java services using apache thrift
Building scalable and language independent java services using apache thrift
 
.Net Architecture and Performance Tuning
.Net Architecture and Performance Tuning.Net Architecture and Performance Tuning
.Net Architecture and Performance Tuning
 
Node.js: A Guided Tour
Node.js: A Guided TourNode.js: A Guided Tour
Node.js: A Guided Tour
 
Per aspera ad grid To the grid computing through difficulties
Per aspera ad grid To the grid computing through difficultiesPer aspera ad grid To the grid computing through difficulties
Per aspera ad grid To the grid computing through difficulties
 

More from Gianluca Padovani

A Gentle introduction to microservices
A Gentle introduction to microservicesA Gentle introduction to microservices
A Gentle introduction to microservicesGianluca Padovani
 
Beam me up, scotty (PUG Roma)
Beam me up, scotty (PUG Roma)Beam me up, scotty (PUG Roma)
Beam me up, scotty (PUG Roma)Gianluca Padovani
 
Tdd is not about testing (C++ version)
Tdd is not about testing (C++ version)Tdd is not about testing (C++ version)
Tdd is not about testing (C++ version)Gianluca Padovani
 
Tdd is not about testing (OOP)
Tdd is not about testing (OOP)Tdd is not about testing (OOP)
Tdd is not about testing (OOP)Gianluca Padovani
 
DDD loves Actor Model and Actor Model loves Elixir
DDD loves Actor Model and Actor Model loves ElixirDDD loves Actor Model and Actor Model loves Elixir
DDD loves Actor Model and Actor Model loves ElixirGianluca Padovani
 
From a web application to a distributed system
From a web application to a distributed systemFrom a web application to a distributed system
From a web application to a distributed systemGianluca Padovani
 
System integration through queues
System integration through queuesSystem integration through queues
System integration through queuesGianluca Padovani
 
La mia prima lezione di pozioni
La mia prima lezione di pozioniLa mia prima lezione di pozioni
La mia prima lezione di pozioniGianluca Padovani
 
Keynote meetup Elixir/Erlang 17 ottobre 2015
Keynote meetup Elixir/Erlang 17 ottobre 2015Keynote meetup Elixir/Erlang 17 ottobre 2015
Keynote meetup Elixir/Erlang 17 ottobre 2015Gianluca Padovani
 

More from Gianluca Padovani (16)

A Gentle introduction to microservices
A Gentle introduction to microservicesA Gentle introduction to microservices
A Gentle introduction to microservices
 
Beam me up, scotty (PUG Roma)
Beam me up, scotty (PUG Roma)Beam me up, scotty (PUG Roma)
Beam me up, scotty (PUG Roma)
 
Tdd is not about testing (C++ version)
Tdd is not about testing (C++ version)Tdd is not about testing (C++ version)
Tdd is not about testing (C++ version)
 
Tdd is not about testing (OOP)
Tdd is not about testing (OOP)Tdd is not about testing (OOP)
Tdd is not about testing (OOP)
 
DDD loves Actor Model and Actor Model loves Elixir
DDD loves Actor Model and Actor Model loves ElixirDDD loves Actor Model and Actor Model loves Elixir
DDD loves Actor Model and Actor Model loves Elixir
 
Tdd is not about testing
Tdd is not about testingTdd is not about testing
Tdd is not about testing
 
From a web application to a distributed system
From a web application to a distributed systemFrom a web application to a distributed system
From a web application to a distributed system
 
Beam way of life
Beam way of lifeBeam way of life
Beam way of life
 
Cook your KV
Cook your KVCook your KV
Cook your KV
 
System integration through queues
System integration through queuesSystem integration through queues
System integration through queues
 
Beam me up, Scotty
Beam me up, ScottyBeam me up, Scotty
Beam me up, Scotty
 
Docker e git lab
Docker e git labDocker e git lab
Docker e git lab
 
La mia prima lezione di pozioni
La mia prima lezione di pozioniLa mia prima lezione di pozioni
La mia prima lezione di pozioni
 
Keynote meetup Elixir/Erlang 17 ottobre 2015
Keynote meetup Elixir/Erlang 17 ottobre 2015Keynote meetup Elixir/Erlang 17 ottobre 2015
Keynote meetup Elixir/Erlang 17 ottobre 2015
 
Ferrara Linux Day 2011
Ferrara Linux Day 2011Ferrara Linux Day 2011
Ferrara Linux Day 2011
 
OOP vs COP
OOP vs COPOOP vs COP
OOP vs COP
 

Recently uploaded

eAuditor Audits & Inspections - conduct field inspections
eAuditor Audits & Inspections - conduct field inspectionseAuditor Audits & Inspections - conduct field inspections
eAuditor Audits & Inspections - conduct field inspectionsNirav Modi
 
online pdf editor software solutions.pdf
online pdf editor software solutions.pdfonline pdf editor software solutions.pdf
online pdf editor software solutions.pdfMeon Technology
 
Your Vision, Our Expertise: TECUNIQUE's Tailored Software Teams
Your Vision, Our Expertise: TECUNIQUE's Tailored Software TeamsYour Vision, Our Expertise: TECUNIQUE's Tailored Software Teams
Your Vision, Our Expertise: TECUNIQUE's Tailored Software TeamsJaydeep Chhasatia
 
AI Embracing Every Shade of Human Beauty
AI Embracing Every Shade of Human BeautyAI Embracing Every Shade of Human Beauty
AI Embracing Every Shade of Human BeautyRaymond Okyere-Forson
 
Top Software Development Trends in 2024
Top Software Development Trends in  2024Top Software Development Trends in  2024
Top Software Development Trends in 2024Mind IT Systems
 
Cybersecurity Challenges with Generative AI - for Good and Bad
Cybersecurity Challenges with Generative AI - for Good and BadCybersecurity Challenges with Generative AI - for Good and Bad
Cybersecurity Challenges with Generative AI - for Good and BadIvo Andreev
 
Generative AI for Cybersecurity - EC-Council
Generative AI for Cybersecurity - EC-CouncilGenerative AI for Cybersecurity - EC-Council
Generative AI for Cybersecurity - EC-CouncilVICTOR MAESTRE RAMIREZ
 
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...OnePlan Solutions
 
Optimizing Business Potential: A Guide to Outsourcing Engineering Services in...
Optimizing Business Potential: A Guide to Outsourcing Engineering Services in...Optimizing Business Potential: A Guide to Outsourcing Engineering Services in...
Optimizing Business Potential: A Guide to Outsourcing Engineering Services in...Jaydeep Chhasatia
 
How Does the Epitome of Spyware Differ from Other Malicious Software?
How Does the Epitome of Spyware Differ from Other Malicious Software?How Does the Epitome of Spyware Differ from Other Malicious Software?
How Does the Epitome of Spyware Differ from Other Malicious Software?AmeliaSmith90
 
Big Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/ML
Big Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/MLBig Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/ML
Big Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/MLAlluxio, Inc.
 
Watermarking in Source Code: Applications and Security Challenges
Watermarking in Source Code: Applications and Security ChallengesWatermarking in Source Code: Applications and Security Challenges
Watermarking in Source Code: Applications and Security ChallengesShyamsundar Das
 
20240319 Car Simulator Plan.pptx . Plan for a JavaScript Car Driving Simulator.
20240319 Car Simulator Plan.pptx . Plan for a JavaScript Car Driving Simulator.20240319 Car Simulator Plan.pptx . Plan for a JavaScript Car Driving Simulator.
20240319 Car Simulator Plan.pptx . Plan for a JavaScript Car Driving Simulator.Sharon Liu
 
Kawika Technologies pvt ltd Software Development Company in Trivandrum
Kawika Technologies pvt ltd Software Development Company in TrivandrumKawika Technologies pvt ltd Software Development Company in Trivandrum
Kawika Technologies pvt ltd Software Development Company in TrivandrumKawika Technologies
 
Streamlining Your Application Builds with Cloud Native Buildpacks
Streamlining Your Application Builds  with Cloud Native BuildpacksStreamlining Your Application Builds  with Cloud Native Buildpacks
Streamlining Your Application Builds with Cloud Native BuildpacksVish Abrams
 
Introduction-to-Software-Development-Outsourcing.pptx
Introduction-to-Software-Development-Outsourcing.pptxIntroduction-to-Software-Development-Outsourcing.pptx
Introduction-to-Software-Development-Outsourcing.pptxIntelliSource Technologies
 
ERP For Electrical and Electronics manufecturing.pptx
ERP For Electrical and Electronics manufecturing.pptxERP For Electrical and Electronics manufecturing.pptx
ERP For Electrical and Electronics manufecturing.pptxAutus Cyber Tech
 
ARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdf
ARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdfARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdf
ARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdfTobias Schneck
 
Deep Learning for Images with PyTorch - Datacamp
Deep Learning for Images with PyTorch - DatacampDeep Learning for Images with PyTorch - Datacamp
Deep Learning for Images with PyTorch - DatacampVICTOR MAESTRE RAMIREZ
 

Recently uploaded (20)

eAuditor Audits & Inspections - conduct field inspections
eAuditor Audits & Inspections - conduct field inspectionseAuditor Audits & Inspections - conduct field inspections
eAuditor Audits & Inspections - conduct field inspections
 
online pdf editor software solutions.pdf
online pdf editor software solutions.pdfonline pdf editor software solutions.pdf
online pdf editor software solutions.pdf
 
Your Vision, Our Expertise: TECUNIQUE's Tailored Software Teams
Your Vision, Our Expertise: TECUNIQUE's Tailored Software TeamsYour Vision, Our Expertise: TECUNIQUE's Tailored Software Teams
Your Vision, Our Expertise: TECUNIQUE's Tailored Software Teams
 
AI Embracing Every Shade of Human Beauty
AI Embracing Every Shade of Human BeautyAI Embracing Every Shade of Human Beauty
AI Embracing Every Shade of Human Beauty
 
Top Software Development Trends in 2024
Top Software Development Trends in  2024Top Software Development Trends in  2024
Top Software Development Trends in 2024
 
Cybersecurity Challenges with Generative AI - for Good and Bad
Cybersecurity Challenges with Generative AI - for Good and BadCybersecurity Challenges with Generative AI - for Good and Bad
Cybersecurity Challenges with Generative AI - for Good and Bad
 
Generative AI for Cybersecurity - EC-Council
Generative AI for Cybersecurity - EC-CouncilGenerative AI for Cybersecurity - EC-Council
Generative AI for Cybersecurity - EC-Council
 
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...
 
Optimizing Business Potential: A Guide to Outsourcing Engineering Services in...
Optimizing Business Potential: A Guide to Outsourcing Engineering Services in...Optimizing Business Potential: A Guide to Outsourcing Engineering Services in...
Optimizing Business Potential: A Guide to Outsourcing Engineering Services in...
 
How Does the Epitome of Spyware Differ from Other Malicious Software?
How Does the Epitome of Spyware Differ from Other Malicious Software?How Does the Epitome of Spyware Differ from Other Malicious Software?
How Does the Epitome of Spyware Differ from Other Malicious Software?
 
Big Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/ML
Big Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/MLBig Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/ML
Big Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/ML
 
Watermarking in Source Code: Applications and Security Challenges
Watermarking in Source Code: Applications and Security ChallengesWatermarking in Source Code: Applications and Security Challenges
Watermarking in Source Code: Applications and Security Challenges
 
20240319 Car Simulator Plan.pptx . Plan for a JavaScript Car Driving Simulator.
20240319 Car Simulator Plan.pptx . Plan for a JavaScript Car Driving Simulator.20240319 Car Simulator Plan.pptx . Plan for a JavaScript Car Driving Simulator.
20240319 Car Simulator Plan.pptx . Plan for a JavaScript Car Driving Simulator.
 
Kawika Technologies pvt ltd Software Development Company in Trivandrum
Kawika Technologies pvt ltd Software Development Company in TrivandrumKawika Technologies pvt ltd Software Development Company in Trivandrum
Kawika Technologies pvt ltd Software Development Company in Trivandrum
 
Streamlining Your Application Builds with Cloud Native Buildpacks
Streamlining Your Application Builds  with Cloud Native BuildpacksStreamlining Your Application Builds  with Cloud Native Buildpacks
Streamlining Your Application Builds with Cloud Native Buildpacks
 
Introduction-to-Software-Development-Outsourcing.pptx
Introduction-to-Software-Development-Outsourcing.pptxIntroduction-to-Software-Development-Outsourcing.pptx
Introduction-to-Software-Development-Outsourcing.pptx
 
Salesforce AI Associate Certification.pptx
Salesforce AI Associate Certification.pptxSalesforce AI Associate Certification.pptx
Salesforce AI Associate Certification.pptx
 
ERP For Electrical and Electronics manufecturing.pptx
ERP For Electrical and Electronics manufecturing.pptxERP For Electrical and Electronics manufecturing.pptx
ERP For Electrical and Electronics manufecturing.pptx
 
ARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdf
ARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdfARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdf
ARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdf
 
Deep Learning for Images with PyTorch - Datacamp
Deep Learning for Images with PyTorch - DatacampDeep Learning for Images with PyTorch - Datacamp
Deep Learning for Images with PyTorch - Datacamp
 

C++ Actor Model - You’ve Got Mail ...

  • 4. Italian C++ Community std::thread/async, isn’t it enough? Example code: double_poll Poll Left Poll Right Thread 1 Thread 2 Acc Increment Add Add
  • 5. Italian C++ Community Concurrency model - Single Thread → Node.js - Actor Model → Erlang - CSP → GO - STM → Clojure - etc ...
  • 6. Italian C++ Community Node.js It’s simple One thread Asynchronous I/O (event-loop)
  • 7. Italian C++ Community Node.js - Examples var fs = require("fs"); fs.readFile('/etc/passwd', function (err, data) { if (err) throw err; console.log("-> " + data + " <-"); }); ---- var http = require('http'); http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/plain'}); res.end('Hello Worldn'); }).listen(1337, "127.0.0.1"); console.log('Server running at http://127.0.0.1:1337/');
  • 8. Italian C++ Community Node.js - Is it fast? ab -n 10000 -c 1000 http://127.0.0.1:1337/ Time taken for tests: 1.283 seconds Complete requests: 10000 Total transferred: 1130000 bytes Requests per second: 7797.21 [#/sec] (mean) Time per request: 128.251 [ms] (mean) Time per request: 0.128 [ms] (mean, across all concurrent requests) Transfer rate: 860.43 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 58 232.7 0 1000 Processing: 5 20 27.1 13 420 Waiting: 5 20 27.1 13 420 Total: 13 78 246.5 13 1234
  • 9. Italian C++ Community Node.js - Is it fast? YES!!!
  • 10. Italian C++ Community Concurrency model Single Thread → Node.js (Good) Can we do better? Copy from others ...
  • 11. Italian C++ Community Erlang Erlang is a programming language used to build massively scalable soft real-time systems with requirements on high availability.
  • 13. Italian C++ Community A model of concurrent computation that treats "actors" as the primitives and fundamental units of computation. Actor Model
  • 14. Italian C++ Community Actor Model It should embody three properties: ● Processing → Can do something ● Storage → Can remember something ● Communication → Can communicate with others
  • 15. Italian C++ Community Actor Model In an actors system: ● Everything is an actor ● An actor is an entity that sends, receives messages ● An actor is an entity with a behaviour
  • 16. Italian C++ Community In response to a message that it receives, an actor can: ● create more actors ● send messages to other actors ● determine how to respond to the next message received Actor Model
  • 17. Italian C++ Community Actor Model A1 A3 M1 A21 A22 A23 M2 M3 A2
  • 18. Italian C++ Community Actor Model Does it work? Is it fast?
  • 19. Italian C++ Community Erlang - Results ab -n 10000 -c 1000 http://127.0.0.1:8080/ Time taken for tests: 0.538 seconds Complete requests: 10000 Total transferred: 1300000 bytes Requests per second: 18604.20 [#/sec] (mean) Time per request: 53.751 [ms] (mean) Time per request: 0.054 [ms] (mean, across all concurrent requests) Transfer rate: 2361.86 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 10 4.8 10 27 Processing: 7 16 4.8 16 39 Waiting: 5 13 4.2 13 34 Total: 8 26 8.3 26 59
  • 20. Italian C++ Community Erlang vs Node.js - Results Node.js Time taken for tests: 1.461 seconds Total transferred: 1140000 bytes Requests per second: 6843.55 [#/sec] Time per request: 146.123 [ms] Time per request: 0.146 [ms] Transfer rate: 761.88 [Kbytes/sec] Connection Times (ms) min mean[+/-sd] median max Connect: 0 59 234.5 0 1001 Processing: 8 22 40.7 14 443 Waiting: 7 22 40.7 14 443 Total: 10 81 262.9 14 1443 Erlang Time taken for tests: 0.538 seconds Total transferred: 1300000 bytes Requests per second: 18604.20 [#/sec] Time per request: 53.751 [ms] Time per request: 0.054 [ms] Transfer rate: 2361.86 [Kbytes/sec] Connection Times (ms) min mean[+/-sd] median max Connect: 0 10 4.8 10 27 Processing: 7 16 4.8 16 39 Waiting: 5 13 4.2 13 34 Total: 8 26 8.3 26 59
  • 21. Italian C++ Community Actor Model - Is it Fast? YES!!!
  • 22. Italian C++ Community Erlang - Example https://github.com/extend/cowboy
  • 23. Italian C++ Community C++ - Actor model
  • 24. Italian C++ Community C++ library ● http://neverlord.github.io/libcppa/ - Erlang inspired ● http://www.theron-library.com/ - No fault - No Event IO ● https://code.google.com/p/actor-cpp/source/list - Not developed since 2012 ● https://code.google.com/p/libactor/ - Right now it is usable, although it may not be ready for production ● https://casablanca.codeplex.com/ - Removed actor?!?! ● http://www.stdthread.co.uk/ - No OSS
  • 25. Italian C++ Community libcppa - Features ● Lightweight actor implementations ● Pattern matching for messages ● Error handling based on Erlang’s failure model ● etc ..
  • 26. Italian C++ Community libcppa - Is it enough? Can it solve the initial problem? example code: double_poll_actor
  • 27. Italian C++ Community libcppa - Is it enough? Main Poll Left Poll Right Acc poll poll at incLeft incRight inc beast beast threshold fire fire
  • 28. Italian C++ Community libcppa - Actor == thread? How many actors can I spawn? A lot!!!! example code: how_many_actors
  • 29. Italian C++ Community libcppa - Errors ● Isolated ● Linked ● Monitored example code: err_mng
  • 30. Italian C++ Community libcppa - I/O - brokers A broker is an event-based actor running in the middleman that multiplexes socket I/O
  • 31. Italian C++ Community libcppa - I/O - brokers ● Create in particular way ● Receive special messages from “system” ● Can take ownership of given connection example code: http_actor
  • 32. Italian C++ Community libcppa - Is it fast??? ab -n 10000 -c 1000 http://127.0.0.1:1339/ Time taken for tests: 0.438 seconds Complete requests: 10000 Total transferred: 1480000 bytes Requests per second: 22848.00 [#/sec] (mean) Time per request: 43.767 [ms] (mean) Time per request: 0.044 [ms] (mean, across all concurrent requests) Transfer rate: 3302.25 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 1 5 5.6 3 26 Processing: 1 6 5.9 4 222 Waiting: 1 4 4.8 3 221 Total: 3 11 10.6 7 231
  • 33. Italian C++ Community libcppa vs Erlang - Results libcppa Time taken for tests: 0.438 seconds Total transferred: 1480000 bytes Requests per second: 22848.00 [#/sec] Time per request: 43.767 [ms] Time per request: 0.044 [ms] Transfer rate: 3302.25 [Kbytes/sec] Connection Times (ms) min mean[+/-sd] median max Connect: 1 5 5.6 3 26 Processing: 1 6 5.9 4 222 Waiting: 1 4 4.8 3 221 Total: 3 11 10.6 7 231 Erlang Time taken for tests: 0.538 seconds Total transferred: 1300000 bytes Requests per second: 18604.20 [#/sec] Time per request: 53.751 [ms] Time per request: 0.054 [ms] Transfer rate: 2361.86 [Kbytes/sec] Connection Times (ms) min mean[+/-sd] median max Connect: 0 10 4.8 10 27 Processing: 7 16 4.8 16 39 Waiting: 5 13 4.2 13 34 Total: 8 26 8.3 26 59
  • 34. Italian C++ Community libcppa - Is it fast??? YES!!!
  • 35. Italian C++ Community Actor Model Gianluca Padovani SW craftsmanship, TDD addicted, agile coach. I like Ruby, NodeJs and everything is interesting. I also work a lot on C#, C++. I like to code, a lot :-) https://www.linkedin.com/pub/gianluca-padovani/2/261/a92 https://twitter.com/GPad619 https://github.com/gpad http://www.slideshare.net/gpadovani
  • 36. Italian C++ Community Reference ● Carl Hewitt's Homepage ● Hewitt, Meijer and Szyperski: The Actor Model ● Takeaways from Hewitt, Meijer and Szyperski’s talk on the Actor model ● https://github.com/Neverlord/libcppa ● http://libcppa.blogspot.de/ ● Dominik Charousset and Matthias Vallentin: libcppa -- Designing an Actor Semantic for C++11 ● https://github.com/mavam/vast ● Learn you some Erlang ● https://github.com/extend/cowboy ● Actors are not a good concurrency model ● Seven Languages in Seven Weeks: A Pragmatic Guide to Learning Programming Languages
  • 37. Italian C++ Community Actor Model Thank You!