import asyncio

Raphael Michel
mail@raphaelmichel.de

Chaostreff Heidelberg, 14.04.2015

Concurrency is about dealing with lots of things at once.
Parallelism is about doing lots of things at once.

– Rob Pike

Warum?

  • Parallele Programmierung hat einige Schwierigkeiten, die man mit Concurrency nicht zwingend hat.
  • Außerordentlich effizient wann immer I/O der Flaschenhals ist.
  • Sorry, Scientific-Computing-Leute, euch nützt das nicht viel.

Aber wie?

JavaScript: Concurrency mit Callbacks


listenOnUserClick(function(event) {
    doHttpGetRequest('https://www.noname-ev.de', function(response) {
        log(response.text);
    });
});
						

Ieh!

Coroutinen

Keine neue Idee, seit Simula (1960er)

Live Coding, yeah!

Locks, Semaphores, Queues

Alternativen

  • Twisted
  • Tornado
  • Andere Sprachen (z.B. Go)

Fragen?

Raphael Michel
mail@raphaelmichel.de