6 ms·
Expose – A fully open-source ngrok alternative written in PHP
- mromanuk 6y agois there any docker for this?
- 29athrowaway 6y agoPHP, a fractal of nope.
- derision 6y ago80% of the web, a fractal of nope?
- 29athrowaway 6y ago80% of web servers is not the same as 80% of web traffic. I guess at least 80% of web traffic would go to the Alexa top 100 sites. How many of those run on PHP? There was a time where many if not most of them ran on PHP, but today many have migrated away from it for performance reasons.
- revendell_elf 6y agoCurious to know your experience with PHP. Do share.
- deleted 6y ago[deleted]
- smacktoward 6y agoOf all the complaints that could be lodged against PHP, performance is a weird one.
- kyriakos 6y agoPHP is quite fast actually. Its not Go fast but for an interpreted language its doing really well, runs circles round Ruby for example which was very popular for web apps.
- nickv 6y agoFacebook? (I know, it's technically HHVM but the language is basically PHP) Wikipedia? Wordpress? Tumblr? Large chunks of Slack? That's a lot of traffic. Fun fact: Companies typically leave PHP not for performance reasons (it's faster than Python and Ruby, for example) but because it's hard to hire people who know PHP since there's a strong bias against it. (To be fair, I was one of those anti-PHP people, but after seeing PHP7, Laravel, etc, I acknowledge it's vastly improved from the early 2000s).
- 29athrowaway 6y agoWikipedia and Wordpress have massive reverse proxy caches in front of their PHP servers. Those servers are the ones that handle most of the load. 99% of users only read articles and blog posts, which is content that can be aggresively cached. If the workflow was not as cache friendly, they would not be using PHP, for sure.
- deleted 6y ago[deleted]
- nickv 6y agoAgain, is it as performant as compiled/byte code languages like C, Java, GoLang? No. I'm not making that statement. This is why most real reverse proxy caches are not written in Ruby or Python. Does it compare favorably or equally to most interpreted languages? Yes, it is not an outlier in performance (and tends to be one of the fastest cause of all the tuning it's had from use at high load companies). And yes, large chunks of the code in these companies still, today, run PHP. I guarentee you Wikipedia's global editor activity is higher than you think it is. Same with Tumblr and Slack's entire channel communication pipeline (which was an offshoot from Glitch). It generally scales better than Ruby and Python. You can write shitty code in all of these languages and you can write clean code in all of these languages. And every language has it's warts (Python, which I LOVE and had a startup built around it, is FULL of these warts too).
- 29athrowaway 6y ago
- pamperson 6y agoprobably a fresh graduate who thinks python is a “good” language
- kyriakos 6y agoor maybe thats what the author is comfortable in. at the end of the day the outcome matters more.
- 29athrowaway 6y agoThat description does not apply to me, and while I know Python, I don't use it. I do however have respect for Python. PHP would benefit from the Zen of Python: >>> import this The Zen of Python, by Tim Peters Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. Complex is better than complicated. Flat is better than nested. Sparse is better than dense. Readability counts. Special cases aren't special enough to break the rules. Although practicality beats purity. Errors should never pass silently. Unless explicitly silenced. In the face of ambiguity, refuse the temptation to guess. There should be one-- and preferably only one --obvious way to do it. Although that way may not be obvious at first unless you're Dutch. Now is better than never. Although never is often better than *right* now. If the implementation is hard to explain, it's a bad idea. If the implementation is easy to explain, it may be a good idea. Namespaces are one honking great idea -- let's do more of those!
- gjsman-1000 6y agoPHP has improved tremendously since the 5.4 days. Now, it's quite respectable.
- kyriakos 6y agoA lot has changed in PHP since that article was written. The article was not wrong but a lot of the things that were were mentioned are fixed/changed.
- Marc_Bryan 6y agoSeriously, does PHP suitable for this? It can be handled using a single go binary using pgrok which comes less the source code size and not to mention without any dependencies on almost all platforms! This requires unnecessary things to bundle and too complex for some simple stuff. Mileage may vary though. But just my views.
- mpociot 6y agoMy personal take on this was that it's for a lot of people a lot simpler to extend Expose, as it's written in PHP. It also uses ReactPHP as a foundation - which is battle-tested for many years.
- jaden 6y agoIs there a separate Go pgrok, or was that a typo? The reason for asking is I'd like to find a self-hosted ngrok solution for development.
- Phenix88be 6y agoWell it's working and a lot of people already have a PHP server they can use to host it. I don't even know how to run a Go server.
- dirtnugget 6y agoYou don't need to, comes as a compiled binary. That's one of the beauties of Go
- Donckele 6y agoWhat comes as a compiled binary?
- regularjack 6y agoPHP is also a compiled binary.
- stickfigure 6y agoLooks like that is a reference to this: https://github.com/jerson/pgrok https://github.com/jerson/pgrok ...which does look useful indeed.
- antiqueninja 6y agoWould you mind explaining the architecture? Does expose.dev live on AWS somewhere?
- mpociot 6y agoI have an in depth write up about the internals at my personal blog https://pociot.dev/28-introducing-expose-an-easy-to-use-tunneling-service-implemented-in-pure-php https://pociot.dev/28-introducing-expose-an-easy-to-use-tunn...
- thelicx 6y agoyou lost me at "written in PHP"
- PZ81JUXJE7uJ 6y agoVery mature of you, bravo!
- wolco 6y agoDoes everyone at Zapier share a similiar opinion? Zapier is built on Python, Django, React, Node.js, and AWS Were you aware of the tradeoffs you made with that stack. Zapier has many technical issues: https://ca.trustpilot.com/review/zapier.com https://ca.trustpilot.com/review/zapier.com If you went with a different stack I don't think you would have half of the issues your customers are reporting.
- simonhamp 6y agoI can’t get enough of the great stuff mpociot keeps putting out! Going to try Expose soon, really excited by what it brings to the world of PHP without having to support a new stack.
- trog 6y agoFor those like me that didn't know what ngrok is, "ngrok exposes local servers behind NATs and firewalls to the public internet over secure tunnels"[1]. So it allows you to easily expose internal services publicly, letting you (for example) show someone outside your network a website in your local development environment, without having to deploy it externally into some sort of live environment. Also, not sure why so many people seem to take "... written in PHP" as a gauntlet slap to their own face, instead of some additional technical information. If you have nothing to add to the conversation other than witty snark about PHP, maybe your time would be better spent writing a competing open source product in a language of your choice, giving it away for free, and then letting users compare their pros and cons? 1. https://ngrok.com/product https://ngrok.com/product
- MoroCode 6y agoThe whole "PHP bad" shit is really stupid and I bet you 99% of people who make those witty snarks would not be able to build something like this
- Lerain 6y agoOP has been putting out a series of useful tools lately [1] and been very transparent about his process on Twitter [2]. Seeing this thread derail into a discussion about PHP is pretty annoying. It seems to happen to anything PHP-related here. Do that all day long please, if someone comes here saying PHP is the best language... but he created something useful and open sourced it - that deserves more than toxic bike shedding about your favorite toys. [1] https://beyondco.de/software https://beyondco.de/software [2] https://twitter.com/marcelpociot https://twitter.com/marcelpociot
- cookie-monstar 6y agoThey had me in the first half, not gonna lie