SlideShare a Scribd company logo
ASYNC
Jan Škrášek
@hrachcz
ASYNC
ASYNC JS, PHP
ASYNC JS, C#
ASYNC Kotlin
ASYNC PHP #2
ASYNC
Kolik potřebuji vláken?
Potřebuji k tomu speciální syntaxi v jazyce?
Asynchronous programming
“not existing or occurring at the same time”
Threads
https://en.wikipedia.org/wiki/Thread_(computing)
● Drahé
● Omezené
Async
thread
● Vlastnost jazyka / runtime
● Levné
● Téměř neomezené
Async callbacks
btn.setOnClickListener {
btn.text = "World"
}
btn.text = "Hello"
fetch(uri)
.then({ response ->
response.json()
})
.then({ json ->
val key = json["key"]
})
Async Callback + Promise
Async - EventLoop
while (!taskQueue.isEmpty()) {
val task = taskQueue.dequeue()
task.run()
if (!task->isFinished()) {
taskQueue.enqueue(task)
}
}
Javascript / NodeJS
NodeJS: io & cpu threads for internal functions
Javascript: WebWorkers
Image source: http://synsem.com/SyncNotAsync/
Async - syntax sugar
● CALLBACK
● PROMISE - CALLBACK
● YIELD
● ASYNC AWAIT
● SUSPEND / COROUTINES
Async Expression - YIELD
function download(): Generator {
$download = start_download();
while (true) {
yield;
if (is_download_finished($download)) {
return get_download_status($download);
}
}
}
Async Examples - YIELD
function downloadAndParse(): string {
$response = download(); // is Generator
return json_decode($response) // ???
}
Async Examples - YIELD
function downloadAndParse() {
$response = runAndGet(download());
return json_decode($response)
}
function runAndGet(Generator $generator) {
while ($gen->valid()) $gen->next();
sleep(1);
return $generator->getReturn();
}
Async Examples - YIELD
function downloadAndParse(): Generator {
$generator = download();
yield from $generator;
$response = $generator->getReturn();
return json_decode($response)
}
Async Examples - YIELD
function downloadAndParse(): Generator {
$generator = download();
$response = yield from $generator;
return json_decode($response)
}
YIELD keywords
● PHP
○ yield
○ yield from
○ Generator; getReturn()
● Javascript
○ function*
○ yield
○ yield*
○ result = yield* download();
ASYNC / AWAIT - a syntax sugar 🍬🍭🍩
async function downloadAndParse() {
$response = await download();
return json_decode($response)
}
ASYNC / AWAIT - wrapping callbacks 🍬🍭🍩
async function sleep(miliseconds) {
return new Promise(function(resolve) {
setTimeout(()=>{resolve()}, miliseconds)
});
}
(async () => {
await sleep(2000);
// do something
})()
ASYNC / AWAIT - a syntax sugar 🍬🍭🍩
- Awaitnout funkci mohu spustit pouze z jiné async funkce
nebo async scope
- Async scope:
C#: async main(), async UI events
JS: (async () => { … })() - top-level funkce co nikdy
nerejectuje; nebo pouzit API z Promise
Kotlin: async main(), coroutine launchers
ASYNC / AWAIT - C# - task it all 💻💻💻
- Async funkce vrací Task<T>
- ± Promise instance
- await rozbalí
ASYNC / AWAIT - C# - wrap a callback
public Task<HttpResponse> LoadHtmlAsync(string url)
{
var task = new TaskCompletionSource<HttpResponse>();
LoadHtml(url, result => { task.SetResult(result); });
return task.Task;
}
C#: So, we are ready to … or?
● Cancellation
● Task allocation
● Thread switching
C# ASYNC: cancellation
void Autocomplete(text: string) {
// cancel previous search task
var searchTask = SearchAsync(text);
var result = await searchTask;
// process result
}
C# ASYNC: cancellation
private CancellationTokenSource? cts = null
void Autocomplete(text: string) {
cts?.Cancel()
cts = new CancellationTokenSource();
try {
var result = await SearchAsync(text, cts.Token);
// process result
} catch (OperationCanceledException) {
} finally { cts?.Dispose() }
}
C# ASYNC: task allocation
public async Task<bool> MoveNextAsync()
{
if (_bufferedCount == 0)
{
await FillBuffer();
}
return _bufferedCount > 0;
}
C# ASYNC: task allocation
public async Task<bool> MoveNextAsync()
{
if (_bufferedCount == 0)
{
await FillBuffer();
}
return _bufferedCount > 0;
}
C# ASYNC: task allocation
public async ValueTask<bool> MoveNextAsync()
{
if (_bufferedCount == 0)
{
await FillBuffer();
}
return _bufferedCount > 0;
}
Parallel ASYNC AWAIT
- Main (UI) thread
- Jumping to different threads
C# ASYNC: thread switching
private async void button1_Click(object sender, EventArgs e
{
Button1.enabled = false;
await SynchronizeAsync();
Button1.enabled = true;
}
C# ASYNC: thread switching
C# ASYNC: thread switching
private async void button1_Click(object sender, EventArgs e
{
…
}
async Task Synchronize()
{
Task.Run(() => { … })
…
await httpRequest.executeAsync().configureAwait(false)
}
How it works - internally
https://www.markopapic.com/csharp-under-the-hood-async-await/
static async Task BarAsync()
{
Console.WriteLine("This happens before await");
int i = await QuxAsync();
Console.WriteLine("This happens after await. The result of
await is " + i);
}
static Task BarAsync()
{
Program.<BarAsync>d__2 stateMachine;
stateMachine.<>t__builder = AsyncTaskMethodBuilder.Create();
stateMachine.<>1__state = -1;
stateMachine.<>t__builder.Start<Program.<BarAsync>d__2>(ref
stateMachine);
return stateMachine.<>t__builder.Task;
}
private struct <BarAsync>d__2 : IAsyncStateMachine {
public int <>1__state;
public AsyncTaskMethodBuilder <>t__builder;
private TaskAwaiter<int> <>u__1;
void IAsyncStateMachine.MoveNext()
{
int num1 = this.<>1__state;
try {
TaskAwaiter<int> awaiter;
int num2;
if (num1 != 0)
{
Console.WriteLine("This happens before await");
awaiter = Program.QuxAsync().GetAwaiter();
if (num1 != 0)
{
Console.WriteLine("This happens before await");
awaiter = Program.QuxAsync().GetAwaiter();
if (!awaiter.IsCompleted){
this.<>1__state = num2 = 0;
this.<>u__1 = awaiter;
this.<>t__builder.AwaitUnsafeOnCompleted(ref await..
return;
}
}else{
awaiter = this.<>u__1;
this.<>u__1 = new TaskAwaiter<int>();
this.<>1__state = num2 = -1;
}
if (num1 != 0)
{
Console.WriteLine("This happens before await");
awaiter = Program.QuxAsync().GetAwaiter();
if (!awaiter.IsCompleted){
…
return;
}
}else{
awaiter = this.<>u__1;
this.<>u__1 = new TaskAwaiter<int>();
this.<>1__state = num2 = -1;
}
Console.WriteLine("This happens after await. The result of
await is " + (object) awaiter.GetResult());
Kotlin & Coroutines 💖
Implictní await!
Kotlin & Coroutines
suspend fun download(): HttpResponse {
}
suspend fun myFun() {
val response = download()
}
Kotlin & Coroutines
fun download(c: Continuation<HttpResponse>): HttpResponse {
}
interface Continuation<in T> {
val context: CoroutineContext
fun resume(value: T)
fun resumeWithException(exception: Throwable)
}
Kotlin & Coroutines
suspend fun search(test: String): HttpResponse {
}
private var job: Job? = null
fun autocomplete(text: String) {
job?.cancel()
job = GlobalScope.launch(Dispatchers.IO) {
val response = download(text: String)
...
}
}
Kotlin & Coroutines
fun search(test: String): Deferred<HttpResponse> {
}
private var job: Job? = null
fun autocomplete(text: String) {
job?.cancel()
job = GlobalScope.launch(Dispatchers.IO) {
val response = download(text: String).await()
...
}
}
Kotlin & Coroutines
val jobs = mutableListOf<Deferred<Int>>()
for (i in 0..1_000_000) {
jobs += GlobalScope.async(Dispatchers.Default) {
i + 1
}
}
val nums = jobs.map { it.await() }
https://pl.kotl.in/sf0502yYI
Kotlin & Coroutines
suspend fun fetchId(): Int {
return suspendCoroutine{ continuation ->
api.send(
uri,
{ continuation.resume(it) }
)
}
}
PHP
😶
PHP - async s callbacky
- Potrebuji nejaky event loop
- Tzn. nekde zacne bezet run(), ktere nekonci, dokud jsou tasky
ReactPHP
$loop = ReactEventLoopFactory::create();
$server = new ReactHttpServer(function
(ServerRequestInterface $r) {
...
return new ReactHttpResponse(...);
});
$socket = new ReactSocketServer(8080, $loop);
$server->listen($socket);
echo "Server running at http://127.0.0.1:8080n";
$loop->run();
ReactPHP
PHP a ASYNC - amphp
AmpLoop::run(function() {
$config = AmpMysqlConnectionConfig::fromString("host=
$pool = AmpMysqlpool($config);
$statement = yield $pool->prepare("SELECT * FROM table
$result = yield $statement->execute([1337]);
while (yield $result->advance()) {
$row = $result->getCurrent();
}
});
PHP a ASYNC - amphp
class Promise {
public $result = "Test";
}
function test(): Generator {
$promise = new Promise();
$result = yield $promise;
var_dump($result);
}
$gen = test();
// RUN implementation
$p1 = $gen->current();
$gen->send($p1->result);
PHP a ASYNC - amphp
function test(): Promise {
return Ampcall(function() {
$promise = new Promise();
$result = yield $promise;
var_dump($result);
});
}
Reading
https://github.com/juzna/nette-sandbox-flow/
https://nikic.github.io/2012/12/22/Cooperative-multitasking-using-coroutines-in-PH
P.html
What’s next
● RUST
● GO
● Avoid shared state - flows, RX, channels, ...
Jaké máte otázky?
Díky za pozornost!
Twitter @hrachcz
GitHub hrach

More Related Content

What's hot

RxJS - 封裝程式的藝術
RxJS - 封裝程式的藝術RxJS - 封裝程式的藝術
RxJS - 封裝程式的藝術
名辰 洪
 
Akka.NET streams and reactive streams
Akka.NET streams and reactive streamsAkka.NET streams and reactive streams
Akka.NET streams and reactive streams
Bartosz Sypytkowski
 
Server Side Swift: Vapor
Server Side Swift: VaporServer Side Swift: Vapor
Server Side Swift: Vapor
Paweł Kowalczuk
 
Scalable Angular 2 Application Architecture
Scalable Angular 2 Application ArchitectureScalable Angular 2 Application Architecture
Scalable Angular 2 Application Architecture
FDConf
 
Cascadia.js: Don't Cross the Streams
Cascadia.js: Don't Cross the StreamsCascadia.js: Don't Cross the Streams
Cascadia.js: Don't Cross the Streams
mattpodwysocki
 
RxJS - The Reactive extensions for JavaScript
RxJS - The Reactive extensions for JavaScriptRxJS - The Reactive extensions for JavaScript
RxJS - The Reactive extensions for JavaScript
Viliam Elischer
 
Angular2 rxjs
Angular2 rxjsAngular2 rxjs
Angular2 rxjs
Christoffer Noring
 
Correcting Common .NET Async/Await Mistakes
Correcting Common .NET Async/Await MistakesCorrecting Common .NET Async/Await Mistakes
Correcting Common .NET Async/Await Mistakes
Brandon Minnick, MBA
 
Introduction to kotlin coroutines
Introduction to kotlin coroutinesIntroduction to kotlin coroutines
Introduction to kotlin coroutines
NAVER Engineering
 
Standing the Test of Time: The Date Provider Pattern
Standing the Test of Time: The Date Provider PatternStanding the Test of Time: The Date Provider Pattern
Standing the Test of Time: The Date Provider Pattern
Derek Lee Boire
 
Any event intro
Any event introAny event intro
Any event intro
qiang
 
rx.js make async programming simpler
rx.js make async programming simplerrx.js make async programming simpler
rx.js make async programming simplerAlexander Mostovenko
 
Go Concurrency Basics
Go Concurrency Basics Go Concurrency Basics
Go Concurrency Basics
ElifTech
 
MongoDB World 2019: Life In Stitch-es
MongoDB World 2019: Life In Stitch-esMongoDB World 2019: Life In Stitch-es
MongoDB World 2019: Life In Stitch-es
MongoDB
 
如何「畫圖」寫測試 - RxJS Marble Test
如何「畫圖」寫測試 - RxJS Marble Test如何「畫圖」寫測試 - RxJS Marble Test
如何「畫圖」寫測試 - RxJS Marble Test
名辰 洪
 
Correcting Common Async/Await Mistakes in .NET
Correcting Common Async/Await Mistakes in .NETCorrecting Common Async/Await Mistakes in .NET
Correcting Common Async/Await Mistakes in .NET
Brandon Minnick, MBA
 
Universal JavaScript
Universal JavaScriptUniversal JavaScript
Universal JavaScript
名辰 洪
 
How to send gzipped requests with boto3
How to send gzipped requests with boto3How to send gzipped requests with boto3
How to send gzipped requests with boto3
Luciano Mammino
 
RxJS 5 in Depth
RxJS 5 in DepthRxJS 5 in Depth
RxJS 5 in Depth
C4Media
 
Будь первым
Будь первымБудь первым
Будь первым
FDConf
 

What's hot (20)

RxJS - 封裝程式的藝術
RxJS - 封裝程式的藝術RxJS - 封裝程式的藝術
RxJS - 封裝程式的藝術
 
Akka.NET streams and reactive streams
Akka.NET streams and reactive streamsAkka.NET streams and reactive streams
Akka.NET streams and reactive streams
 
Server Side Swift: Vapor
Server Side Swift: VaporServer Side Swift: Vapor
Server Side Swift: Vapor
 
Scalable Angular 2 Application Architecture
Scalable Angular 2 Application ArchitectureScalable Angular 2 Application Architecture
Scalable Angular 2 Application Architecture
 
Cascadia.js: Don't Cross the Streams
Cascadia.js: Don't Cross the StreamsCascadia.js: Don't Cross the Streams
Cascadia.js: Don't Cross the Streams
 
RxJS - The Reactive extensions for JavaScript
RxJS - The Reactive extensions for JavaScriptRxJS - The Reactive extensions for JavaScript
RxJS - The Reactive extensions for JavaScript
 
Angular2 rxjs
Angular2 rxjsAngular2 rxjs
Angular2 rxjs
 
Correcting Common .NET Async/Await Mistakes
Correcting Common .NET Async/Await MistakesCorrecting Common .NET Async/Await Mistakes
Correcting Common .NET Async/Await Mistakes
 
Introduction to kotlin coroutines
Introduction to kotlin coroutinesIntroduction to kotlin coroutines
Introduction to kotlin coroutines
 
Standing the Test of Time: The Date Provider Pattern
Standing the Test of Time: The Date Provider PatternStanding the Test of Time: The Date Provider Pattern
Standing the Test of Time: The Date Provider Pattern
 
Any event intro
Any event introAny event intro
Any event intro
 
rx.js make async programming simpler
rx.js make async programming simplerrx.js make async programming simpler
rx.js make async programming simpler
 
Go Concurrency Basics
Go Concurrency Basics Go Concurrency Basics
Go Concurrency Basics
 
MongoDB World 2019: Life In Stitch-es
MongoDB World 2019: Life In Stitch-esMongoDB World 2019: Life In Stitch-es
MongoDB World 2019: Life In Stitch-es
 
如何「畫圖」寫測試 - RxJS Marble Test
如何「畫圖」寫測試 - RxJS Marble Test如何「畫圖」寫測試 - RxJS Marble Test
如何「畫圖」寫測試 - RxJS Marble Test
 
Correcting Common Async/Await Mistakes in .NET
Correcting Common Async/Await Mistakes in .NETCorrecting Common Async/Await Mistakes in .NET
Correcting Common Async/Await Mistakes in .NET
 
Universal JavaScript
Universal JavaScriptUniversal JavaScript
Universal JavaScript
 
How to send gzipped requests with boto3
How to send gzipped requests with boto3How to send gzipped requests with boto3
How to send gzipped requests with boto3
 
RxJS 5 in Depth
RxJS 5 in DepthRxJS 5 in Depth
RxJS 5 in Depth
 
Будь первым
Будь первымБудь первым
Будь первым
 

Similar to Asynchronní programování

Workshop: Async and Parallel in C#
Workshop: Async and Parallel in C#Workshop: Async and Parallel in C#
Workshop: Async and Parallel in C#
Rainer Stropek
 
Async Debugging A Practical Guide to survive !
Async Debugging A Practical Guide to survive !Async Debugging A Practical Guide to survive !
Async Debugging A Practical Guide to survive !
Mirco Vanini
 
C#을 이용한 task 병렬화와 비동기 패턴
C#을 이용한 task 병렬화와 비동기 패턴C#을 이용한 task 병렬화와 비동기 패턴
C#을 이용한 task 병렬화와 비동기 패턴
명신 김
 
Алексей Кутумов, Coroutines everywhere
Алексей Кутумов, Coroutines everywhereАлексей Кутумов, Coroutines everywhere
Алексей Кутумов, Coroutines everywhere
Sergey Platonov
 
Sync with async
Sync with  asyncSync with  async
Sync with async
prabathsl
 
.NET Core Summer event 2019 in Brno, CZ - Async demystified -- Karel Zikmund
.NET Core Summer event 2019 in Brno, CZ - Async demystified -- Karel Zikmund.NET Core Summer event 2019 in Brno, CZ - Async demystified -- Karel Zikmund
.NET Core Summer event 2019 in Brno, CZ - Async demystified -- Karel Zikmund
Karel Zikmund
 
Job Queue in Golang
Job Queue in GolangJob Queue in Golang
Job Queue in Golang
Bo-Yi Wu
 
NDC Sydney 2019 - Async Demystified -- Karel Zikmund
NDC Sydney 2019 - Async Demystified -- Karel ZikmundNDC Sydney 2019 - Async Demystified -- Karel Zikmund
NDC Sydney 2019 - Async Demystified -- Karel Zikmund
Karel Zikmund
 
Coroutines in Kotlin. In-depth review
Coroutines in Kotlin. In-depth reviewCoroutines in Kotlin. In-depth review
Coroutines in Kotlin. In-depth review
Dmytro Zaitsev
 
Coroutines in Kotlin. UA Mobile 2017.
Coroutines in Kotlin. UA Mobile 2017.Coroutines in Kotlin. UA Mobile 2017.
Coroutines in Kotlin. UA Mobile 2017.
UA Mobile
 
Asynchronous Programming in ASP.NET
Asynchronous Programming in ASP.NETAsynchronous Programming in ASP.NET
Asynchronous Programming in ASP.NET
Chris Dufour
 
Binary Studio Academy: Concurrency in C# 5.0
Binary Studio Academy: Concurrency in C# 5.0Binary Studio Academy: Concurrency in C# 5.0
Binary Studio Academy: Concurrency in C# 5.0
Binary Studio
 
Deep Dive async/await in Unity with UniTask(EN)
Deep Dive async/await in Unity with UniTask(EN)Deep Dive async/await in Unity with UniTask(EN)
Deep Dive async/await in Unity with UniTask(EN)
Yoshifumi Kawai
 
Async Debugging - A Practical Guide to survive !
Async Debugging - A Practical Guide to survive !Async Debugging - A Practical Guide to survive !
Async Debugging - A Practical Guide to survive !
Mirco Vanini
 
Threads, Queues, and More: Async Programming in iOS
Threads, Queues, and More: Async Programming in iOSThreads, Queues, and More: Async Programming in iOS
Threads, Queues, and More: Async Programming in iOS
TechWell
 
Orsiso
OrsisoOrsiso
Orsisoe27
 
20220529_UniTask_Intro.pptx
20220529_UniTask_Intro.pptx20220529_UniTask_Intro.pptx
20220529_UniTask_Intro.pptx
River Wang
 
Intro to Asynchronous Javascript
Intro to Asynchronous JavascriptIntro to Asynchronous Javascript
Intro to Asynchronous Javascript
Garrett Welson
 
Finagle - an intro to rpc & a sync programming in jvm
Finagle - an intro to rpc & a sync programming in jvmFinagle - an intro to rpc & a sync programming in jvm
Finagle - an intro to rpc & a sync programming in jvm
PrasannaKumar Sathyanarayanan
 

Similar to Asynchronní programování (20)

Workshop: Async and Parallel in C#
Workshop: Async and Parallel in C#Workshop: Async and Parallel in C#
Workshop: Async and Parallel in C#
 
Async Debugging A Practical Guide to survive !
Async Debugging A Practical Guide to survive !Async Debugging A Practical Guide to survive !
Async Debugging A Practical Guide to survive !
 
C#을 이용한 task 병렬화와 비동기 패턴
C#을 이용한 task 병렬화와 비동기 패턴C#을 이용한 task 병렬화와 비동기 패턴
C#을 이용한 task 병렬화와 비동기 패턴
 
Алексей Кутумов, Coroutines everywhere
Алексей Кутумов, Coroutines everywhereАлексей Кутумов, Coroutines everywhere
Алексей Кутумов, Coroutines everywhere
 
Sync with async
Sync with  asyncSync with  async
Sync with async
 
.NET Core Summer event 2019 in Brno, CZ - Async demystified -- Karel Zikmund
.NET Core Summer event 2019 in Brno, CZ - Async demystified -- Karel Zikmund.NET Core Summer event 2019 in Brno, CZ - Async demystified -- Karel Zikmund
.NET Core Summer event 2019 in Brno, CZ - Async demystified -- Karel Zikmund
 
Job Queue in Golang
Job Queue in GolangJob Queue in Golang
Job Queue in Golang
 
NDC Sydney 2019 - Async Demystified -- Karel Zikmund
NDC Sydney 2019 - Async Demystified -- Karel ZikmundNDC Sydney 2019 - Async Demystified -- Karel Zikmund
NDC Sydney 2019 - Async Demystified -- Karel Zikmund
 
Coroutines in Kotlin. In-depth review
Coroutines in Kotlin. In-depth reviewCoroutines in Kotlin. In-depth review
Coroutines in Kotlin. In-depth review
 
Coroutines in Kotlin. UA Mobile 2017.
Coroutines in Kotlin. UA Mobile 2017.Coroutines in Kotlin. UA Mobile 2017.
Coroutines in Kotlin. UA Mobile 2017.
 
Asynchronous Programming in ASP.NET
Asynchronous Programming in ASP.NETAsynchronous Programming in ASP.NET
Asynchronous Programming in ASP.NET
 
Binary Studio Academy: Concurrency in C# 5.0
Binary Studio Academy: Concurrency in C# 5.0Binary Studio Academy: Concurrency in C# 5.0
Binary Studio Academy: Concurrency in C# 5.0
 
Deep Dive async/await in Unity with UniTask(EN)
Deep Dive async/await in Unity with UniTask(EN)Deep Dive async/await in Unity with UniTask(EN)
Deep Dive async/await in Unity with UniTask(EN)
 
Async Debugging - A Practical Guide to survive !
Async Debugging - A Practical Guide to survive !Async Debugging - A Practical Guide to survive !
Async Debugging - A Practical Guide to survive !
 
Threads, Queues, and More: Async Programming in iOS
Threads, Queues, and More: Async Programming in iOSThreads, Queues, and More: Async Programming in iOS
Threads, Queues, and More: Async Programming in iOS
 
Orsiso
OrsisoOrsiso
Orsiso
 
20220529_UniTask_Intro.pptx
20220529_UniTask_Intro.pptx20220529_UniTask_Intro.pptx
20220529_UniTask_Intro.pptx
 
JS everywhere 2011
JS everywhere 2011JS everywhere 2011
JS everywhere 2011
 
Intro to Asynchronous Javascript
Intro to Asynchronous JavascriptIntro to Asynchronous Javascript
Intro to Asynchronous Javascript
 
Finagle - an intro to rpc & a sync programming in jvm
Finagle - an intro to rpc & a sync programming in jvmFinagle - an intro to rpc & a sync programming in jvm
Finagle - an intro to rpc & a sync programming in jvm
 

More from PeckaDesign.cz

Péhápkaři v Pecce: Naše cesta k read-modelu – Vojtěch Buba –18. 5. 2022
Péhápkaři v Pecce: Naše cesta k read-modelu – Vojtěch Buba –18. 5. 2022Péhápkaři v Pecce: Naše cesta k read-modelu – Vojtěch Buba –18. 5. 2022
Péhápkaři v Pecce: Naše cesta k read-modelu – Vojtěch Buba –18. 5. 2022
PeckaDesign.cz
 
Péhápkaři v Pecce: Jak zrefaktorovat letitou aplikaci a zároveň začít na zele...
Péhápkaři v Pecce: Jak zrefaktorovat letitou aplikaci a zároveň začít na zele...Péhápkaři v Pecce: Jak zrefaktorovat letitou aplikaci a zároveň začít na zele...
Péhápkaři v Pecce: Jak zrefaktorovat letitou aplikaci a zároveň začít na zele...
PeckaDesign.cz
 
WebTop100 Case study MEGAPIXEL – Redesign spuštěný proti pravidlům
WebTop100 Case study MEGAPIXEL – Redesign spuštěný proti pravidlůmWebTop100 Case study MEGAPIXEL – Redesign spuštěný proti pravidlům
WebTop100 Case study MEGAPIXEL – Redesign spuštěný proti pravidlům
PeckaDesign.cz
 
Péhápkaři v Pecce: Sbohem PeckaCI, vítej Github Actions – Jakub Englický –27....
Péhápkaři v Pecce: Sbohem PeckaCI, vítej Github Actions – Jakub Englický –27....Péhápkaři v Pecce: Sbohem PeckaCI, vítej Github Actions – Jakub Englický –27....
Péhápkaři v Pecce: Sbohem PeckaCI, vítej Github Actions – Jakub Englický –27....
PeckaDesign.cz
 
Péhápkaři v Pecce: Podpora PHP8 v Kdyby/Redis a Kdyby/RabbitMQ – Václav Čevel...
Péhápkaři v Pecce: Podpora PHP8 v Kdyby/Redis a Kdyby/RabbitMQ – Václav Čevel...Péhápkaři v Pecce: Podpora PHP8 v Kdyby/Redis a Kdyby/RabbitMQ – Václav Čevel...
Péhápkaři v Pecce: Podpora PHP8 v Kdyby/Redis a Kdyby/RabbitMQ – Václav Čevel...
PeckaDesign.cz
 
Péhápkaři v Pecce: Půl roku na cestách jako digitální nomád – Jan Kadeřábek –...
Péhápkaři v Pecce: Půl roku na cestách jako digitální nomád – Jan Kadeřábek –...Péhápkaři v Pecce: Půl roku na cestách jako digitální nomád – Jan Kadeřábek –...
Péhápkaři v Pecce: Půl roku na cestách jako digitální nomád – Jan Kadeřábek –...
PeckaDesign.cz
 
Péhápkaři v Pecce: Vývoj vlastního 'ORM' – Václav Čevela – 20. 11. 2019
Péhápkaři v Pecce: Vývoj vlastního 'ORM' – Václav Čevela – 20. 11. 2019Péhápkaři v Pecce: Vývoj vlastního 'ORM' – Václav Čevela – 20. 11. 2019
Péhápkaři v Pecce: Vývoj vlastního 'ORM' – Václav Čevela – 20. 11. 2019
PeckaDesign.cz
 
Tvorba nových vstupních stránek z pohledu SEO
Tvorba nových vstupních stránek z pohledu SEO Tvorba nových vstupních stránek z pohledu SEO
Tvorba nových vstupních stránek z pohledu SEO
PeckaDesign.cz
 
Péhápkaři v Pecce: pd/forms – Petr Klobás – 16. 10. 2019
Péhápkaři v Pecce: pd/forms – Petr Klobás – 16. 10. 2019Péhápkaři v Pecce: pd/forms – Petr Klobás – 16. 10. 2019
Péhápkaři v Pecce: pd/forms – Petr Klobás – 16. 10. 2019
PeckaDesign.cz
 
Péhápkaři v Pecce: Za hranicemi DateTime – Jiří Pudil – 16. 10. 2019
Péhápkaři v Pecce: Za hranicemi DateTime – Jiří Pudil – 16. 10. 2019Péhápkaři v Pecce: Za hranicemi DateTime – Jiří Pudil – 16. 10. 2019
Péhápkaři v Pecce: Za hranicemi DateTime – Jiří Pudil – 16. 10. 2019
PeckaDesign.cz
 
Péhápkaři v Pecce: Úvod do monitoringu – Tomáš Kozák – 16. 10. 2019
Péhápkaři v Pecce: Úvod do monitoringu – Tomáš Kozák – 16. 10. 2019Péhápkaři v Pecce: Úvod do monitoringu – Tomáš Kozák – 16. 10. 2019
Péhápkaři v Pecce: Úvod do monitoringu – Tomáš Kozák – 16. 10. 2019
PeckaDesign.cz
 
ElasticSearch Dump
ElasticSearch DumpElasticSearch Dump
ElasticSearch Dump
PeckaDesign.cz
 
Pokročilá validace síly hesla
Pokročilá validace síly heslaPokročilá validace síly hesla
Pokročilá validace síly hesla
PeckaDesign.cz
 
Péhápkaři v Pecce: Každodenní problémy s implementací Facebook Api – Marek Hu...
Péhápkaři v Pecce: Každodenní problémy s implementací Facebook Api – Marek Hu...Péhápkaři v Pecce: Každodenní problémy s implementací Facebook Api – Marek Hu...
Péhápkaři v Pecce: Každodenní problémy s implementací Facebook Api – Marek Hu...
PeckaDesign.cz
 
Péhápkaři v Pecce: Čtyři hlavní příčiny dysfunkčních návyků v týmu – Michal A...
Péhápkaři v Pecce: Čtyři hlavní příčiny dysfunkčních návyků v týmu – Michal A...Péhápkaři v Pecce: Čtyři hlavní příčiny dysfunkčních návyků v týmu – Michal A...
Péhápkaři v Pecce: Čtyři hlavní příčiny dysfunkčních návyků v týmu – Michal A...
PeckaDesign.cz
 
Péhápkaři v Pecce: Jak si lokálně spustit Travis CI Build – Jakub Englický – ...
Péhápkaři v Pecce: Jak si lokálně spustit Travis CI Build – Jakub Englický – ...Péhápkaři v Pecce: Jak si lokálně spustit Travis CI Build – Jakub Englický – ...
Péhápkaři v Pecce: Jak si lokálně spustit Travis CI Build – Jakub Englický – ...
PeckaDesign.cz
 
Péhápkaři v Pecce: Jak jsme neposlali pull request do PHP – Milan Pála – 17. ...
Péhápkaři v Pecce: Jak jsme neposlali pull request do PHP – Milan Pála – 17. ...Péhápkaři v Pecce: Jak jsme neposlali pull request do PHP – Milan Pála – 17. ...
Péhápkaři v Pecce: Jak jsme neposlali pull request do PHP – Milan Pála – 17. ...
PeckaDesign.cz
 
Péhápkaři v Pecce: Zend Expressive: PSR framework který vás dostane – Jan Kad...
Péhápkaři v Pecce: Zend Expressive: PSR framework který vás dostane – Jan Kad...Péhápkaři v Pecce: Zend Expressive: PSR framework který vás dostane – Jan Kad...
Péhápkaři v Pecce: Zend Expressive: PSR framework který vás dostane – Jan Kad...
PeckaDesign.cz
 
Péhápkaři v Pecce: Jak na bezpečnostní hlavičky – Marek Humpolík – 23. 1. 2019
Péhápkaři v Pecce: Jak na bezpečnostní hlavičky – Marek Humpolík – 23. 1. 2019Péhápkaři v Pecce: Jak na bezpečnostní hlavičky – Marek Humpolík – 23. 1. 2019
Péhápkaři v Pecce: Jak na bezpečnostní hlavičky – Marek Humpolík – 23. 1. 2019
PeckaDesign.cz
 
PeckaAcademy - Zbožové srovnávače od A-Z - Petra Mariánková
PeckaAcademy - Zbožové srovnávače od A-Z - Petra MariánkováPeckaAcademy - Zbožové srovnávače od A-Z - Petra Mariánková
PeckaAcademy - Zbožové srovnávače od A-Z - Petra Mariánková
PeckaDesign.cz
 

More from PeckaDesign.cz (20)

Péhápkaři v Pecce: Naše cesta k read-modelu – Vojtěch Buba –18. 5. 2022
Péhápkaři v Pecce: Naše cesta k read-modelu – Vojtěch Buba –18. 5. 2022Péhápkaři v Pecce: Naše cesta k read-modelu – Vojtěch Buba –18. 5. 2022
Péhápkaři v Pecce: Naše cesta k read-modelu – Vojtěch Buba –18. 5. 2022
 
Péhápkaři v Pecce: Jak zrefaktorovat letitou aplikaci a zároveň začít na zele...
Péhápkaři v Pecce: Jak zrefaktorovat letitou aplikaci a zároveň začít na zele...Péhápkaři v Pecce: Jak zrefaktorovat letitou aplikaci a zároveň začít na zele...
Péhápkaři v Pecce: Jak zrefaktorovat letitou aplikaci a zároveň začít na zele...
 
WebTop100 Case study MEGAPIXEL – Redesign spuštěný proti pravidlům
WebTop100 Case study MEGAPIXEL – Redesign spuštěný proti pravidlůmWebTop100 Case study MEGAPIXEL – Redesign spuštěný proti pravidlům
WebTop100 Case study MEGAPIXEL – Redesign spuštěný proti pravidlům
 
Péhápkaři v Pecce: Sbohem PeckaCI, vítej Github Actions – Jakub Englický –27....
Péhápkaři v Pecce: Sbohem PeckaCI, vítej Github Actions – Jakub Englický –27....Péhápkaři v Pecce: Sbohem PeckaCI, vítej Github Actions – Jakub Englický –27....
Péhápkaři v Pecce: Sbohem PeckaCI, vítej Github Actions – Jakub Englický –27....
 
Péhápkaři v Pecce: Podpora PHP8 v Kdyby/Redis a Kdyby/RabbitMQ – Václav Čevel...
Péhápkaři v Pecce: Podpora PHP8 v Kdyby/Redis a Kdyby/RabbitMQ – Václav Čevel...Péhápkaři v Pecce: Podpora PHP8 v Kdyby/Redis a Kdyby/RabbitMQ – Václav Čevel...
Péhápkaři v Pecce: Podpora PHP8 v Kdyby/Redis a Kdyby/RabbitMQ – Václav Čevel...
 
Péhápkaři v Pecce: Půl roku na cestách jako digitální nomád – Jan Kadeřábek –...
Péhápkaři v Pecce: Půl roku na cestách jako digitální nomád – Jan Kadeřábek –...Péhápkaři v Pecce: Půl roku na cestách jako digitální nomád – Jan Kadeřábek –...
Péhápkaři v Pecce: Půl roku na cestách jako digitální nomád – Jan Kadeřábek –...
 
Péhápkaři v Pecce: Vývoj vlastního 'ORM' – Václav Čevela – 20. 11. 2019
Péhápkaři v Pecce: Vývoj vlastního 'ORM' – Václav Čevela – 20. 11. 2019Péhápkaři v Pecce: Vývoj vlastního 'ORM' – Václav Čevela – 20. 11. 2019
Péhápkaři v Pecce: Vývoj vlastního 'ORM' – Václav Čevela – 20. 11. 2019
 
Tvorba nových vstupních stránek z pohledu SEO
Tvorba nových vstupních stránek z pohledu SEO Tvorba nových vstupních stránek z pohledu SEO
Tvorba nových vstupních stránek z pohledu SEO
 
Péhápkaři v Pecce: pd/forms – Petr Klobás – 16. 10. 2019
Péhápkaři v Pecce: pd/forms – Petr Klobás – 16. 10. 2019Péhápkaři v Pecce: pd/forms – Petr Klobás – 16. 10. 2019
Péhápkaři v Pecce: pd/forms – Petr Klobás – 16. 10. 2019
 
Péhápkaři v Pecce: Za hranicemi DateTime – Jiří Pudil – 16. 10. 2019
Péhápkaři v Pecce: Za hranicemi DateTime – Jiří Pudil – 16. 10. 2019Péhápkaři v Pecce: Za hranicemi DateTime – Jiří Pudil – 16. 10. 2019
Péhápkaři v Pecce: Za hranicemi DateTime – Jiří Pudil – 16. 10. 2019
 
Péhápkaři v Pecce: Úvod do monitoringu – Tomáš Kozák – 16. 10. 2019
Péhápkaři v Pecce: Úvod do monitoringu – Tomáš Kozák – 16. 10. 2019Péhápkaři v Pecce: Úvod do monitoringu – Tomáš Kozák – 16. 10. 2019
Péhápkaři v Pecce: Úvod do monitoringu – Tomáš Kozák – 16. 10. 2019
 
ElasticSearch Dump
ElasticSearch DumpElasticSearch Dump
ElasticSearch Dump
 
Pokročilá validace síly hesla
Pokročilá validace síly heslaPokročilá validace síly hesla
Pokročilá validace síly hesla
 
Péhápkaři v Pecce: Každodenní problémy s implementací Facebook Api – Marek Hu...
Péhápkaři v Pecce: Každodenní problémy s implementací Facebook Api – Marek Hu...Péhápkaři v Pecce: Každodenní problémy s implementací Facebook Api – Marek Hu...
Péhápkaři v Pecce: Každodenní problémy s implementací Facebook Api – Marek Hu...
 
Péhápkaři v Pecce: Čtyři hlavní příčiny dysfunkčních návyků v týmu – Michal A...
Péhápkaři v Pecce: Čtyři hlavní příčiny dysfunkčních návyků v týmu – Michal A...Péhápkaři v Pecce: Čtyři hlavní příčiny dysfunkčních návyků v týmu – Michal A...
Péhápkaři v Pecce: Čtyři hlavní příčiny dysfunkčních návyků v týmu – Michal A...
 
Péhápkaři v Pecce: Jak si lokálně spustit Travis CI Build – Jakub Englický – ...
Péhápkaři v Pecce: Jak si lokálně spustit Travis CI Build – Jakub Englický – ...Péhápkaři v Pecce: Jak si lokálně spustit Travis CI Build – Jakub Englický – ...
Péhápkaři v Pecce: Jak si lokálně spustit Travis CI Build – Jakub Englický – ...
 
Péhápkaři v Pecce: Jak jsme neposlali pull request do PHP – Milan Pála – 17. ...
Péhápkaři v Pecce: Jak jsme neposlali pull request do PHP – Milan Pála – 17. ...Péhápkaři v Pecce: Jak jsme neposlali pull request do PHP – Milan Pála – 17. ...
Péhápkaři v Pecce: Jak jsme neposlali pull request do PHP – Milan Pála – 17. ...
 
Péhápkaři v Pecce: Zend Expressive: PSR framework který vás dostane – Jan Kad...
Péhápkaři v Pecce: Zend Expressive: PSR framework který vás dostane – Jan Kad...Péhápkaři v Pecce: Zend Expressive: PSR framework který vás dostane – Jan Kad...
Péhápkaři v Pecce: Zend Expressive: PSR framework který vás dostane – Jan Kad...
 
Péhápkaři v Pecce: Jak na bezpečnostní hlavičky – Marek Humpolík – 23. 1. 2019
Péhápkaři v Pecce: Jak na bezpečnostní hlavičky – Marek Humpolík – 23. 1. 2019Péhápkaři v Pecce: Jak na bezpečnostní hlavičky – Marek Humpolík – 23. 1. 2019
Péhápkaři v Pecce: Jak na bezpečnostní hlavičky – Marek Humpolík – 23. 1. 2019
 
PeckaAcademy - Zbožové srovnávače od A-Z - Petra Mariánková
PeckaAcademy - Zbožové srovnávače od A-Z - Petra MariánkováPeckaAcademy - Zbožové srovnávače od A-Z - Petra Mariánková
PeckaAcademy - Zbožové srovnávače od A-Z - Petra Mariánková
 

Recently uploaded

Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
UiPathCommunity
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 

Recently uploaded (20)

Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 

Asynchronní programování

  • 2. ASYNC ASYNC JS, PHP ASYNC JS, C# ASYNC Kotlin ASYNC PHP #2
  • 3. ASYNC Kolik potřebuji vláken? Potřebuji k tomu speciální syntaxi v jazyce?
  • 4. Asynchronous programming “not existing or occurring at the same time”
  • 6. Async thread ● Vlastnost jazyka / runtime ● Levné ● Téměř neomezené
  • 7. Async callbacks btn.setOnClickListener { btn.text = "World" } btn.text = "Hello"
  • 8. fetch(uri) .then({ response -> response.json() }) .then({ json -> val key = json["key"] }) Async Callback + Promise
  • 9. Async - EventLoop while (!taskQueue.isEmpty()) { val task = taskQueue.dequeue() task.run() if (!task->isFinished()) { taskQueue.enqueue(task) } }
  • 10. Javascript / NodeJS NodeJS: io & cpu threads for internal functions Javascript: WebWorkers Image source: http://synsem.com/SyncNotAsync/
  • 11. Async - syntax sugar ● CALLBACK ● PROMISE - CALLBACK ● YIELD ● ASYNC AWAIT ● SUSPEND / COROUTINES
  • 12. Async Expression - YIELD function download(): Generator { $download = start_download(); while (true) { yield; if (is_download_finished($download)) { return get_download_status($download); } } }
  • 13. Async Examples - YIELD function downloadAndParse(): string { $response = download(); // is Generator return json_decode($response) // ??? }
  • 14. Async Examples - YIELD function downloadAndParse() { $response = runAndGet(download()); return json_decode($response) } function runAndGet(Generator $generator) { while ($gen->valid()) $gen->next(); sleep(1); return $generator->getReturn(); }
  • 15. Async Examples - YIELD function downloadAndParse(): Generator { $generator = download(); yield from $generator; $response = $generator->getReturn(); return json_decode($response) }
  • 16. Async Examples - YIELD function downloadAndParse(): Generator { $generator = download(); $response = yield from $generator; return json_decode($response) }
  • 17. YIELD keywords ● PHP ○ yield ○ yield from ○ Generator; getReturn() ● Javascript ○ function* ○ yield ○ yield* ○ result = yield* download();
  • 18. ASYNC / AWAIT - a syntax sugar 🍬🍭🍩 async function downloadAndParse() { $response = await download(); return json_decode($response) }
  • 19. ASYNC / AWAIT - wrapping callbacks 🍬🍭🍩 async function sleep(miliseconds) { return new Promise(function(resolve) { setTimeout(()=>{resolve()}, miliseconds) }); } (async () => { await sleep(2000); // do something })()
  • 20. ASYNC / AWAIT - a syntax sugar 🍬🍭🍩 - Awaitnout funkci mohu spustit pouze z jiné async funkce nebo async scope - Async scope: C#: async main(), async UI events JS: (async () => { … })() - top-level funkce co nikdy nerejectuje; nebo pouzit API z Promise Kotlin: async main(), coroutine launchers
  • 21. ASYNC / AWAIT - C# - task it all 💻💻💻 - Async funkce vrací Task<T> - ± Promise instance - await rozbalí
  • 22. ASYNC / AWAIT - C# - wrap a callback public Task<HttpResponse> LoadHtmlAsync(string url) { var task = new TaskCompletionSource<HttpResponse>(); LoadHtml(url, result => { task.SetResult(result); }); return task.Task; }
  • 23. C#: So, we are ready to … or? ● Cancellation ● Task allocation ● Thread switching
  • 24. C# ASYNC: cancellation void Autocomplete(text: string) { // cancel previous search task var searchTask = SearchAsync(text); var result = await searchTask; // process result }
  • 25. C# ASYNC: cancellation private CancellationTokenSource? cts = null void Autocomplete(text: string) { cts?.Cancel() cts = new CancellationTokenSource(); try { var result = await SearchAsync(text, cts.Token); // process result } catch (OperationCanceledException) { } finally { cts?.Dispose() } }
  • 26. C# ASYNC: task allocation public async Task<bool> MoveNextAsync() { if (_bufferedCount == 0) { await FillBuffer(); } return _bufferedCount > 0; }
  • 27. C# ASYNC: task allocation public async Task<bool> MoveNextAsync() { if (_bufferedCount == 0) { await FillBuffer(); } return _bufferedCount > 0; }
  • 28. C# ASYNC: task allocation public async ValueTask<bool> MoveNextAsync() { if (_bufferedCount == 0) { await FillBuffer(); } return _bufferedCount > 0; }
  • 29. Parallel ASYNC AWAIT - Main (UI) thread - Jumping to different threads
  • 30. C# ASYNC: thread switching private async void button1_Click(object sender, EventArgs e { Button1.enabled = false; await SynchronizeAsync(); Button1.enabled = true; }
  • 31. C# ASYNC: thread switching
  • 32. C# ASYNC: thread switching private async void button1_Click(object sender, EventArgs e { … } async Task Synchronize() { Task.Run(() => { … }) … await httpRequest.executeAsync().configureAwait(false) }
  • 33. How it works - internally https://www.markopapic.com/csharp-under-the-hood-async-await/
  • 34. static async Task BarAsync() { Console.WriteLine("This happens before await"); int i = await QuxAsync(); Console.WriteLine("This happens after await. The result of await is " + i); }
  • 35. static Task BarAsync() { Program.<BarAsync>d__2 stateMachine; stateMachine.<>t__builder = AsyncTaskMethodBuilder.Create(); stateMachine.<>1__state = -1; stateMachine.<>t__builder.Start<Program.<BarAsync>d__2>(ref stateMachine); return stateMachine.<>t__builder.Task; }
  • 36. private struct <BarAsync>d__2 : IAsyncStateMachine { public int <>1__state; public AsyncTaskMethodBuilder <>t__builder; private TaskAwaiter<int> <>u__1; void IAsyncStateMachine.MoveNext() { int num1 = this.<>1__state; try { TaskAwaiter<int> awaiter; int num2; if (num1 != 0) { Console.WriteLine("This happens before await"); awaiter = Program.QuxAsync().GetAwaiter();
  • 37. if (num1 != 0) { Console.WriteLine("This happens before await"); awaiter = Program.QuxAsync().GetAwaiter(); if (!awaiter.IsCompleted){ this.<>1__state = num2 = 0; this.<>u__1 = awaiter; this.<>t__builder.AwaitUnsafeOnCompleted(ref await.. return; } }else{ awaiter = this.<>u__1; this.<>u__1 = new TaskAwaiter<int>(); this.<>1__state = num2 = -1; }
  • 38. if (num1 != 0) { Console.WriteLine("This happens before await"); awaiter = Program.QuxAsync().GetAwaiter(); if (!awaiter.IsCompleted){ … return; } }else{ awaiter = this.<>u__1; this.<>u__1 = new TaskAwaiter<int>(); this.<>1__state = num2 = -1; } Console.WriteLine("This happens after await. The result of await is " + (object) awaiter.GetResult());
  • 39. Kotlin & Coroutines 💖 Implictní await!
  • 40. Kotlin & Coroutines suspend fun download(): HttpResponse { } suspend fun myFun() { val response = download() }
  • 41. Kotlin & Coroutines fun download(c: Continuation<HttpResponse>): HttpResponse { } interface Continuation<in T> { val context: CoroutineContext fun resume(value: T) fun resumeWithException(exception: Throwable) }
  • 42. Kotlin & Coroutines suspend fun search(test: String): HttpResponse { } private var job: Job? = null fun autocomplete(text: String) { job?.cancel() job = GlobalScope.launch(Dispatchers.IO) { val response = download(text: String) ... } }
  • 43. Kotlin & Coroutines fun search(test: String): Deferred<HttpResponse> { } private var job: Job? = null fun autocomplete(text: String) { job?.cancel() job = GlobalScope.launch(Dispatchers.IO) { val response = download(text: String).await() ... } }
  • 44. Kotlin & Coroutines val jobs = mutableListOf<Deferred<Int>>() for (i in 0..1_000_000) { jobs += GlobalScope.async(Dispatchers.Default) { i + 1 } } val nums = jobs.map { it.await() } https://pl.kotl.in/sf0502yYI
  • 45. Kotlin & Coroutines suspend fun fetchId(): Int { return suspendCoroutine{ continuation -> api.send( uri, { continuation.resume(it) } ) } }
  • 47. PHP - async s callbacky - Potrebuji nejaky event loop - Tzn. nekde zacne bezet run(), ktere nekonci, dokud jsou tasky
  • 48. ReactPHP $loop = ReactEventLoopFactory::create(); $server = new ReactHttpServer(function (ServerRequestInterface $r) { ... return new ReactHttpResponse(...); }); $socket = new ReactSocketServer(8080, $loop); $server->listen($socket); echo "Server running at http://127.0.0.1:8080n"; $loop->run();
  • 50. PHP a ASYNC - amphp AmpLoop::run(function() { $config = AmpMysqlConnectionConfig::fromString("host= $pool = AmpMysqlpool($config); $statement = yield $pool->prepare("SELECT * FROM table $result = yield $statement->execute([1337]); while (yield $result->advance()) { $row = $result->getCurrent(); } });
  • 51. PHP a ASYNC - amphp class Promise { public $result = "Test"; } function test(): Generator { $promise = new Promise(); $result = yield $promise; var_dump($result); } $gen = test(); // RUN implementation $p1 = $gen->current(); $gen->send($p1->result);
  • 52. PHP a ASYNC - amphp function test(): Promise { return Ampcall(function() { $promise = new Promise(); $result = yield $promise; var_dump($result); }); }
  • 54. What’s next ● RUST ● GO ● Avoid shared state - flows, RX, channels, ...
  • 56. Díky za pozornost! Twitter @hrachcz GitHub hrach