Code Monkey home page Code Monkey logo

Comments (12)

r3wt avatar r3wt commented on July 23, 2024

👍

from caddy.

mholt avatar mholt commented on July 23, 2024

So if I understand the docs you linked to, it's essentially the same as proxying to php-fpm? What would need to be done for then Caddy to work with HHVM if it does not already?

fastcgi / 127.0.0.1:9000 php

from caddy.

r3wt avatar r3wt commented on July 23, 2024

@mholt i think he is requesting a manner to embed hhvm directly in the caddy process, like mod_php. else i have no idea what he meant

from caddy.

Immortalin avatar Immortalin commented on July 23, 2024

Maybe hhvm can be embedded into caddy via gobindata to make deployment easier and expose it via a cgo binding?

from caddy.

zorrobyte avatar zorrobyte commented on July 23, 2024

As I am restricted on time, I have yet to dig through caddy's source code for a proper integration suggestions.

As of now, there are parameters such as gzip that can be placed in the caddyfile to enable support: https://caddyserver.com/docs/caddyfile

It would be interesting if HHVM could be activated on a site with param hhvm, much like param gzip in the caddy file. FastCGI is recommended for compatibility and would be default. hhvm param would invoke HHVM instead of FastCGI for PHP handling (and HHVM supports the Hack language, which brings more devs to the caddy project).

As for the link I posted (https://github.com/facebook/hhvm/wiki/FastCGI), as you are using FastCGI now, it should be simple to setup HHVM in proxy mode (localhost:9000).

An auto config script is located here for HHVM (https://github.com/hhvm/packaging/blob/master/hhvm/deb/skeleton/usr/share/hhvm/install_fastcgi.sh) which can give you further idea as to integration.

Here are some templates I baked up for VestaCP: http://forum.vestacp.com/viewtopic.php?f=11&t=8256
I wish I had more time, I'd love to see what I could accomplish!

from caddy.

mholt avatar mholt commented on July 23, 2024

I find HHVM's speed compelling. Thanks for the resources @zorrobyte - they'll surely be helpful!

As for me personally, I do not have time to devote to this right now either, but HHVM seems like a technology that Caddy would do well to support in the long run, assuming PHP keeps being popular. Anyone is welcome to tackle this - just comment here.

from caddy.

el3ctro- avatar el3ctro- commented on July 23, 2024

Hi,

I have some questions regarding adding HHVM. It looks like it is largely written in C++, so how would we include it with Caddy and still have Caddy be cross platform for all the currently supported operating systems? Are you suggesting to gather binaries of HHVM and include it with each version of Caddy? The other option is to have the user compile it themself. How were you imagining shipping it with Caddy?

Not saying this is a bad idea just trying to figure out how it would allow Caddy to be cross platform.... Or do we end up leaving out support for any OS that can't compile HHVM?

This is not a Go question, I'm more concerned about the C++.

from caddy.

mholt avatar mholt commented on July 23, 2024

We would need to use a pure Go library to build HHVM into Caddy for exactly that reason; I was under the impression there was some other way to bind to an external HHVM process - but it does appear that FastCGI can do that already.

from caddy.

zorrobyte avatar zorrobyte commented on July 23, 2024

My two cents,

HHVM is a “nice to have” as in it works very well for most things but fails at certain other things, see http://hhvm.com/frameworks/ http://hhvm.com/frameworks/ . You are right, it isn’t cross platform and adds complexity however, I did mention it for Caddy as it can go far as to help popularize your platform as many others do not currently offer HHVM/Hack integration. I suppose it could come down to a caddy including HHVM as a module, as in a setup script that would be ran to compile and integrate HHVM into caddy. This way HHVM stays an optional, doesn’t clutter core code but is easily added to caddy with minimal setup, keeping it simple per the caddy philosophy.

Anywho, that’s just my high level suggestion. I’m an Advanced Beginner at best :)

On May 7, 2015, at 9:44 AM, Joshua Loper [email protected] wrote:

Hi,

I have some questions regarding adding HHVM. It looks like it is largely written in C++, so how would we include it with Caddy and still have Caddy be cross platform for all the currently supported operating systems? Are you suggesting to to gather binaries of HHVM and include it with each version of Caddy? The other option is to have the user compile it them self. How were you imagining shipping it with Caddy?

Not saying this is a bad idea just trying to figure out how it would allow Caddy to be cross platform.... Or do we end up leaving out support for any OS that can't compile HHVM?


Reply to this email directly or view it on GitHub #12 (comment).

from caddy.

steelbrain avatar steelbrain commented on July 23, 2024

I am a power user of HHVM and I think that fastcgi support should be enough. The protocol is well tested and works. HHVM wasn't built with embedding in mind. Furthermore HHVM also has a builtin web server called Proxygen.

and to @zorrobyte HHVM may fail for the frameworks but I have been using HHVM in production for more than a year and never had a problem with it. It may not be cross-platform at the moment but during the last few months, they have announced an official Homebrew tap and a heavily-under-development windows build. Here's a graph I saw today, I think you should have a look at it too :) https://www.facebook.com/groups/hhvm.general/permalink/539355092884555/

from caddy.

mholt avatar mholt commented on July 23, 2024

Closing this issue since it doesn't seem to be going anywhere, bug discussion is still welcome on it for any interested.

from caddy.

abiosoft avatar abiosoft commented on July 23, 2024

There is actually no discussion. HHVM is accessible via FastCGI.

from caddy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.