News for hackers. Stuff that matters.
Re:Running PHP fast at the edge with WebAssembly by jw1224 on Thursday May 23, 2024 @02:30PM (#40458140)
The “edge” in this case is the browser (from a pure WASM standpoint, though I see these guys also offer a hosted serverless version too).

For most general-purpose applications, there’s no point to WASM. But some apps may run specific functions which take a long time (e.g. bulk/batch processing), and being able to execute those tasks securely on the client side provides immediate feedback and better UX.

That’s just one use case. Another is that WASM makes PHP portable, in the sense it can run in any web browser without the need for a back-end server. Lots of potential opportunities for distributing software which runs completely locally.

Re:Running PHP fast at the edge with WebAssembly by ahofmann on Thursday May 23, 2024 @02:42PM (#40458296)
Thank you for explaining. As a Web dev, who's using PHP since version 4, I'm still very confused why someone would consider running a CMS like WordPress on the client side, or at the "edge". I guess the good thing here is that someone spends (a lot of) energy in giving PHP new ways to get used by developers.
Re:Running PHP fast at the edge with WebAssembly by makeitdouble on Thursday May 23, 2024 @03:00PM (#40458528)
This is what is referred to by "edge": https://en.wikipedia.org/wiki/Edge_computing
Re:Running PHP fast at the edge with WebAssembly by inezk on Thursday May 23, 2024 @02:41PM (#40458280)
I don't think edge in this case mean browser. I think edge in this case is more similar to a CDN node.
Re:Running PHP fast at the edge with WebAssembly by egeozcan on Thursday May 23, 2024 @03:41PM (#40459000)
Yes, the browser is where you land when you fall off the edge :)
Re:Running PHP fast at the edge with WebAssembly by csomar on Thursday May 23, 2024 @02:55PM (#40458454)
The browser is not the "edge". The browser is the browser. Running WordPress in the browser makes exactly zero sense. Only exception if you are running a test instance.
Re:Running PHP fast at the edge with WebAssembly by pacifika on Thursday May 23, 2024 @03:06PM (#40458638)
Re:Running PHP fast at the edge with WebAssembly by fhuici on Friday May 24, 2024 @08:56AM (#40465747)
The edge within this context means running a server close, in terms of Internet latency, to users. For example, if a user if sending a request from Germany, then the response should come from a server running in say Frankfurt, not the US. There are now many providers that allow devels to deploy services at many different locations at once, and to ensure that client requests are routed to the closest available location. An understandable source of confusion is that wasm comes from the browser world, but it's also possible to run it as standalone (no browser) server code.

Also not to be confused with the term edge within the context of IoT/embedded, where the edge is devices running at the very edge of the Internet, e.g., factory floors, trucks, etc.