Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
kdunglas
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
1.
▲
FrankenPHP (Caddy-based) is now officially supported by the PHP Foundation
(thephp.foundation)
20 points
by
kdunglas
1y ago
|
0 comments
2.
▲
by
kdunglas
2y ago
WebSub cannot be used by browsers because browsers cannot receive POST requests. WebSub is for server to server communications. Mercure is basically WebSub over SSE. The draft has been discussed several times on the HTTP WG.
3.
▲
by
kdunglas
2y ago
Yes, as it 's "just" SSE, this works pretty well behind Cloudflare and other similar solutions. Mercure also automatically sends the NGINX-specific headers required to allow unbuffered connections. Native mobile apps are also
4.
▲
by
kdunglas
2y ago
Once the connection is upgraded, you loose all metadata included in the HTTP headers (because it’s not HTTP) and all protections relying on it. Also CORS and SOP can be bypassed: https://dev.to/pssingh21/websockets-byp
5.
▲
by
kdunglas
2y ago
This limitation is gone with HTTP/2 and HTTP/3 and the Mercure hub automatically use the most recent protocol supported by the browser.
6.
▲
by
kdunglas
2y ago
Hi, Mercure author here. Indeed that's how it works. One of the key point of the solution is that you don't need anything client-side. The native EventSource class is all you need (but you can use more advanced SSE client librarie
7.
▲
by
kdunglas
2y ago
Hi, Mercure author here. WebSockets are hard to secure (they totally bypass CORS as well as other browser built-in protections), don't work (yet) with HTTP/3 and for most use cases require to implement many features by yourself: r
8.
▲
by
kdunglas
2y ago
SSE/Mercure (as WebSockets) is much battery-efficient than polling (push vs poll, less bandwidth used). Additionally, on controlled environnements, SSE can use a « push proxy » to wake up the device only when necessary: https:/&#
9.
▲
by
kdunglas
2y ago
A while ago I created Mercure: an open pub-sub protocol built on top of SSE that is a replacement for WebSockets-based solutions such as Pusher. Mercure is now used by hundreds of apps in production. At the core of Mercure is the hub. It is
10.
▲
Show HN: API Platform for Laravel
(api-platform.com)
10 points
by
kdunglas
2y ago
|
0 comments
11.
▲
by
kdunglas
2y ago
The Symfony framework (PHP) provides a similar feature, which also relies on LISTEN/NOTIFY and FOR UPDATE SKIP LOCKED: https://symfony.com/doc/current/messenger.html#doctrine-tran... It also supports many ot
12.
▲
by
kdunglas
2y ago
That's not the case with other engines able to keep the booted app in memory to handle several requests (FPM doesn't support this).
13.
▲
by
kdunglas
2y ago
This script is entirely optional and is only used to create static builds of FrankenPHP or to create self-executable PHP apps. It doesn't require a Docker image but does need some system dependencies. It is not necessary to create a st
14.
▲
by
kdunglas
2y ago
Optionally, you can embed the PHP scripts in the final binary using a Go feature similar to `include_bytes`: https://frankenphp.dev/docs/embed/ But for PHP, it's even simpler: PHP is available as a C library,
15.
▲
by
kdunglas
2y ago
This means that in addition to any PSR-7 implementation, you can run apps using HttpFoundation (Symfony, Laravel, Drupal, etc) and "legacy" code using superglobals without the need for an adapter.
16.
▲
by
kdunglas
2y ago
Unlike Laravel and Symfony, WordPress doesn't support the worker mode of FrankenPHP (yet?), so there are not many benefits in terms of performance (except the ability to preload assets using 103 Early Hints, which can reduce the latenc
17.
▲
by
kdunglas
2y ago
Hi, FrankenPHP author here. We would very much appreciate a reproducer. According to most benchmarks, FrankenPHP is generally much faster (~3 times) than FPM when worker mode is enabled, but there are still some outliers, and we're wor
18.
▲
by
kdunglas
2y ago
I maintain the Mercure protocol (built on SSE) and the reference implementation (written in Go, available as a standalone binary and a Caddy module) which does exactly that: https://mercure.rocks In addition to the free and open
19.
▲
Show HN: Package PHP apps as standalone, self-executable binaries
(frankenphp.dev)
29 points
by
kdunglas
3y ago
|
7 comments
20.
▲
Twitter bans a popular French activist and the spokeswoman of the Pirate Party
(mastodon.social)
27 points
by
kdunglas
3y ago
|
13 comments
21.
▲
by
kdunglas
4y ago
I haven't tested it yet, but yes it's a stated goal.
22.
▲
by
kdunglas
4y ago
Definitely! (using xcaddy and compiling PHP yourself, for now)
23.
▲
by
kdunglas
4y ago
The approach isn't the same: Roadrunner executes php-cli and connects it to its web server through GRPC; FrankenPHP uses an ad-hoc SAPI, it is more like Apache's mod_php, the Go code uses the PHP interpreter as a library, it'
24.
▲
Show HN: FrankenPHP, an app server for PHP written in Go
(frankenphp.dev)
368 points
by
kdunglas
4y ago
|
83 comments
25.
▲
Caddy 2.6 is out, the biggest release since Caddy 2
(github.com)
56 points
by
kdunglas
4y ago
|
7 comments
26.
▲
Show HN: A library to build Solid decentralized applications in PHP
(dunglas.fr)
4 points
by
kdunglas
4y ago
|
0 comments
27.
▲
by
kdunglas
5y ago
The OP is probably referring to this well known article (in French): "In 2020, 27 deaths as a result of law enforcement response, including 12 during containment" https://basta.media/recensement-interventions-polic
28.
▲
by
kdunglas
5y ago
API Platform is a popular and easy to use semantic web framework: 1. You design your data model as a set of PHP classes, or you generate the class from any RDF vocabulary such as Schema.org 2. API Platform uses the classes to expose a JSON-
29.
▲
Preventing CORS Preflight Requests Using Content Negotiation
(dunglas.fr)
1 points
by
kdunglas
5y ago
|
0 comments
30.
▲
Show HN: Automatic management of Docker images by the Symfony PHP framework
(symfony.com)
3 points
by
kdunglas
5y ago
|
0 comments
More ›