Hacker News new | ask | show | jobs
by wwweston 2023 days ago
I really actually like PHP in a lot of contexts (and think I could make a better case for it than the author), but on the project I'm working on now, we recently got hit with the real time requirements and I'm feeling some regrets that I didn't pick Elixir+Phoenix to start with.
1 comments

Phoenix does offer a pleasant, streamlined full stack experience, and it does seem kludgey to bake together PHP and Phoenix without good reason.

If I didn't have a team to deal with a large Elixir codebase (a common issue), I'd glue PHP and BEAM together anyway, even going as far as to pass along the "meat and potatoes" backend work to PHP even for socket interactions (or in some asynchronous way, as needed). In that scenario, the Elixir sockets frontend could be fairly minimal, both in terms of codebase and DB interactions, and would possibly not need a lot of code changes over time.

That's probably where we're heading: the existing PHP code will still control state for the app and push events/messages to a relay app managing websocket connections with the front end (probably written in Elixir, or possibly a websockets-as-a-service offering initially).