Aaron Piotrowski

993 posts

Aaron Piotrowski banner
Aaron Piotrowski

Aaron Piotrowski

@_trowski

Computer programmer, photographer, and coffee lover. Maintainer of @asyncphp, a library for writing async code in PHP using promises and coroutines.

Minnesota, USA Katılım Haziran 2011
313 Takip Edilen567 Takipçiler
Aaron Piotrowski
Aaron Piotrowski@_trowski·
@goetas_asmir @dunglas @asyncphp @Alli_g83 Don't let the readme frighten you. $pool = new ContextWorkerPool(); for ($i = 0; $i < 10; $i++) { $pool->submit(new EchoTask()); } $pool->shutdown(); EchoTask needs to be defined in another file so it can be autoloaded in the worker, but still simple.
English
1
0
2
129
Asmir Mustafic
Asmir Mustafic@goetas_asmir·
@dunglas @asyncphp @Alli_g83 What I like about ext-parallel is its simplicity. $runtime = new Runtime(); for($i = 0; $i < 10; $i++) { $runtime->run(function($j) { echo "A"; }); } $runtime->close(); When I see the amphp/parallel readme page i get scared and give up!
English
1
0
2
500
Asmir Mustafic
Asmir Mustafic@goetas_asmir·
github.com/krakjoe/parall… (ext-parallel) is one of the most underrated php features ever! - Documentation about it is close to zero :( - Not enabled by default on PHP... :( what is holding us from being used in every single modern php app? Is it because of PHP ZTS stuff? or what?
English
5
3
37
5.6K
Aaron Piotrowski retweetledi
AMPHP
AMPHP@asyncphp·
Thank you to our newest sponsor github.com/nayleen! We really appreciate every contribution toward our efforts to bring #async #PHP forward. Consider sponsoring AMPHP if you use it in one of your projects. Thank you to everyone who supports us! github.com/sponsors/amphp
English
0
3
4
738
Aaron Piotrowski retweetledi
AMPHP
AMPHP@asyncphp·
Continuing our series of accessory libraries compatible with amphp/http-server v3 and AMPHP v3, we've tagged v2 of amphp/http-server-form-parser. 🎉 This helper library provides a utility to parse url-encoded form requests or stream large files from multipart/form-data requests. This provides functionality similar to $_POST and $_FILES for an #async #PHP HTTP server using AMPHP. 🚀 github.com/amphp/http-ser…
AMPHP tweet media
English
0
2
12
1.4K
Aaron Piotrowski retweetledi
AMPHP
AMPHP@asyncphp·
On the heels of last weeks release of amphp/http-server v3, we're working to tag stable releases of the "accessory" libraries. 🛠️ First up is amphp/http-server-router using nikic/fast-route to provide routing for your application. Incoming HTTP requests are directed to various request handlers based on their path. Routes may define parameters constrained using regex. Parameter values are available in request attributes. github.com/amphp/http-ser…
AMPHP tweet media
English
2
4
30
4K
Aaron Piotrowski retweetledi
AMPHP
AMPHP@asyncphp·
Announcing a huge milestone for the AMPHP project – the release of amphp/http-server v3.0, compatible with AMPHP v3 and fibers! 🎉 amphp/http-server provides a non-blocking, concurrent HTTP/1.1 and HTTP/2 application server for #PHP github.com/amphp/http-ser… The example above is based on hello-world.php found in the examples directory. It demonstrates the basics of wiring up a simple HTTP server replying with "Hello, World!" to each request.
AMPHP tweet media
English
5
31
93
10.3K
Simon Podlipský (Accept all 🥠)
@revoltphp 👋🏿 I want to setup a simple http server with Revolt. Should I create reactphp http server and then mix it together with event-loop-adapter-react or is there a better way?
English
1
0
0
19
Aaron Piotrowski retweetledi
Niklas Keller
Niklas Keller@kelunik·
It's incredible how many smooth upgrades have been made possible through my parameter type widening change. I didn't see the potential at the time of writing the RFC, but @nikita_ppv did. Time flies!
PHP-FIG@phpfig

#PSR7 just got 2 new tags! The evolution vote passed, and we got: 1.1 with argument types 2.0 with return types Both require PHP 7.2; more details available in the PSR meta doc, section 7.2, "Type additions": #72-type-additions" target="_blank" rel="nofollow noopener">php-fig.org/psr/psr-7/meta…

English
0
2
5
1.8K
Aaron Piotrowski retweetledi
AMPHP
AMPHP@asyncphp·
Announcing v2.0 of amphp/parallel, compatible with AMPHP v3 and fibers! 🎉 amphp/parallel provides true parallel processing for #PHP using multiple processes or threads, without blocking, no extensions required. Below is an example with parent and child scripts communicating.
AMPHP tweet mediaAMPHP tweet media
English
2
16
40
5.2K
Aaron Piotrowski retweetledi
AMPHP
AMPHP@asyncphp·
Announcing v2.0 of amphp/socket compatible with AMPHP v3 and fibers! 🎊 github.com/amphp/socket/r… This package builds on our stream interfaces to create socket servers and client connections. The example creates a basic HTTP server, replying with the IP and port of the client.
AMPHP tweet media
English
0
5
33
2.8K
Aaron Piotrowski retweetledi
AMPHP
AMPHP@asyncphp·
Calling all #PHP developers! We want to hear about your usage of @asyncphp and how it has helped you in your projects. Share your story with us and be featured on our blog!
English
1
9
15
1.8K
Aaron Piotrowski retweetledi
AMPHP
AMPHP@asyncphp·
Announcing v2.0 of amphp/dns compatible with AMPHP v3 and fibers! 🎉 github.com/amphp/dns/rele… The DNS package implements basic #async DNS resolution in #PHP. Use it for resolving domain names to a host or query any DNS record type, such as MX records as in the example below.
AMPHP tweet media
English
0
7
11
952
Aaron Piotrowski retweetledi
AMPHP
AMPHP@asyncphp·
Announcing v2.0 of amphp/process compatible with AMPHP v3 and fibers! 🚀 github.com/amphp/process/… The process package provides #async execution and communication with child processes from #PHP. This example pings 5 hosts concurrently in 5 separate child processes.
AMPHP tweet media
English
0
6
20
1.1K
Aaron Piotrowski retweetledi
AMPHP
AMPHP@asyncphp·
We've tagged v2.0 of amphp/byte-stream, providing a set of stream interfaces and composable implementations compatible with AMPHP v3 and fibers! 🎉 github.com/amphp/byte-str… The script below reads a gzip stream from stdin, writing the decompressed bytes to stdout.
AMPHP tweet media
English
1
3
6
1.5K
Aaron Piotrowski retweetledi
AMPHP
AMPHP@asyncphp·
Announcing amphp/sync v2.0 which provides synchronization tools compatible with AMPHP v3! 🎊 github.com/amphp/sync/rel… Sync data access across #async coroutines in one process or share data among multiple #PHP processes! Use semaphores, channels, or a parcel as in the example.
AMPHP tweet media
English
1
3
13
1.6K