text stringlengths 0 2.35k |
|---|
[620.98 --> 621.66] And that's always awesome. |
[621.78 --> 625.74] That's how, you know, the majority of open source contributions happen, right? |
[625.84 --> 630.52] You know, you find something that you enjoy working on, and you contribute code to it, and that's a beautiful thing. |
[630.52 --> 643.52] Obviously, when I think about my experience with PHP and all sort of the hoops we had to jump through to sort of, to, quote, unquote, make it scale and sort of using today's terminology and whatnot. |
[644.04 --> 655.34] When I sort of read the description of the project, and I'm like, okay, this is a load balancer rolled into some sort of application server rolled into some sort of, I mean, it's trying to do a lot of things. |
[655.34 --> 665.96] So why don't we start with what the difference is between plain-jane PHP application server, like the last one I was used to was like Zen or something like that. |
[666.12 --> 667.20] It was a very long time ago. |
[667.44 --> 668.46] Yeah, exactly. |
[668.90 --> 670.14] I'm dating myself here. |
[670.46 --> 680.48] But what's the difference between sort of those, I guess, for lack of a better terminology, those traditional application servers that are designed to run PHP versus this new approach? |
[680.48 --> 688.48] To answer this question, it's actually important to understand how PHP actually become like this type of language and bottleneck, which is hard to scale. |
[688.72 --> 694.86] So, like, imagine every time you write that golden-link application, which say, let's say, doing some endpoint on HTTP. |
[695.32 --> 705.20] Every time you've been getting an HTTP request, imagine that you have to bootload your application from the disk, start it, answer this request, and then kill this application. |
[705.32 --> 707.46] And do it over and over and over for every request. |
[707.88 --> 709.54] This sounds super expensive, right? |
[709.54 --> 714.62] Well, that's how PHP has been working for 26 plus years. |
[715.00 --> 720.16] And it's quite amazing that you have the tag, which quite literally restarts on every request. |
[720.64 --> 724.70] And it still kind of powers, like, the pretty much majority of backend on internet. |
[725.20 --> 726.98] Well, I mean, public backend, let's say. |
[727.10 --> 727.20] Right. |
[727.54 --> 731.06] So the idea was actually quite simple. |
[731.14 --> 732.40] Let's just remove this overhead. |
[732.40 --> 739.90] I mean, when I started working with Roadrunner, I started working with actually a protocol just making communication between two languages. |
[740.02 --> 741.74] And the first example was quite simple. |
[741.88 --> 748.02] Okay, we have, let's say, a function in Golland to do, let's say, some heavy math, which on PHP might be not optimal. |
[748.02 --> 752.90] And I have this, like, highly OP-strict code in PHP. |
[752.90 --> 759.82] And by the way, like, modern PHP is all about, like, OP, strict types, annotations, attributes. |
[760.06 --> 765.94] Like, it's all very, very similar to Java these days, except it's free, open, and very easy to learn, let's say. |
[765.94 --> 774.12] So then I just tried to make a call from PHP to Golland using this, like, internal socket or Unix socket RPC call. |
[774.42 --> 775.50] And it did work. |
[775.98 --> 778.74] And then I tried to make a very stupid experiment, actually. |
[778.82 --> 783.34] I tried the native PHP library for RabbitMQ to push message. |
[783.88 --> 787.04] And I used the Golland library for RabbitMQ to push message. |
[787.34 --> 790.56] But with additional this RPC overhead from PHP. |
[790.56 --> 802.06] And we ran some tests, and we found out that the PHP to Golland bridge to RabbitMQ works, like, not, like, margin much, but, like, few percent farther than a native solution. |
[802.36 --> 804.08] And it was, like, that's weird. |
[804.76 --> 806.32] This shouldn't be happening, right? |
[806.78 --> 812.30] And this kind of led to the idea that, like, PHP is, like, a very beautiful language to model business processes. |
[812.64 --> 817.94] Not, like, high-scale I.O. operations, like traffic management or, well, ingresses. |
[818.46 --> 819.40] It's single-threaded. |
[819.40 --> 824.32] And it's very dummy, like, in terms of, like, you can go left, you can go right in some cases. |
[824.66 --> 828.18] You still can shoot yourself to the foot, but these days it's much harder. |
[828.56 --> 834.26] But it's very good to have good libraries to explain, like, permission models, document mapping, data mapping. |
[834.44 --> 843.02] If you'll see how to work with mapping JSON in Golland and PHP, you'll definitely see a major difference in favor of PHP because it's, well, dynamic language. |
[843.02 --> 855.58] And the goal, like, on the other side is beautiful to manage, like, all of these long-porting connections, sockets, like, retries, restarts, delays, all of this fun stuff with PHP just by the definition by model can't. |
[855.58 --> 861.76] So then we just tried to create the method which has been invoking code from PHP and worker pools. |
[861.76 --> 867.96] So you have, like, hot processes of PHP, which are already in memory, like, let's say, one per your CPU core. |
[868.18 --> 872.24] And then you just ask one of them, just do this payload, do this work for me. |
[872.40 --> 873.74] You don't kill your application. |
[873.90 --> 874.88] You don't restart it. |
[874.96 --> 876.04] Like, you have no overhead. |
[876.04 --> 881.48] And when we did this code, well, it was working, like, 11 times faster than native approach. |
[881.66 --> 884.96] So we created HTTP layer at top called Roadrunner. |
[885.36 --> 888.14] And it's been, well, kind of with us since then. |
[888.18 --> 892.94] And we haven't written a single application without this model probably, like, since 2019. |
[893.82 --> 893.96] Wow. |
[894.50 --> 895.40] Yeah, pretty amazing. |
[895.90 --> 899.04] So who is this for? |
[899.68 --> 903.80] Is it the Go developer who has to work with PHP or the PHP developer who has to work with Go? |
[903.80 --> 906.68] Or who are you targeting with this approach? |
[906.98 --> 907.78] I guess both. |
[908.44 --> 909.04] Both of them. |
[909.62 --> 911.78] Well, it's actually a very good question. |
[911.94 --> 914.20] I mean, the main auditor is obviously PHP people. |
[914.38 --> 926.24] Because what the main idea of Roadrunner is, like, you can take these complex aspects of, like, queue load balancing, HTTPS traffic, temporal gRPC, and you're going to make them boring for these developers. |
[926.66 --> 927.56] But just out of the box. |
[927.64 --> 928.62] You want gRPC, sure. |
[928.78 --> 929.72] Just plug and play. |
[929.80 --> 931.58] You want a temporal, sure. |
[931.70 --> 932.82] Like, it's already here. |
[932.88 --> 933.60] Just make it work. |
[933.60 --> 934.64] You don't need to install anything. |
[935.04 --> 937.78] It basically manages the complex stuff for you. |
[937.78 --> 945.34] But at the same time, it's kind of for the Go link engineers who typically work in pair or on the same team as PHP engineers. |
[945.84 --> 953.10] Because this is application server, like, it's very easy to intercept and modify the requests and calls which you do with PHP. |
[953.10 --> 957.28] So, like, you can add your own validations, like, author indications. |
[957.28 --> 964.16] And all obviously going to work much faster and possibly, like, with much deeper integration with modern, like, cloud native tools. |
[964.26 --> 969.06] You have metrics, you know, readiness, healthy endpoints. |
[969.06 --> 974.10] Like, all of the stuff you need to make application, basically, like, native to the current environments. |
[974.10 --> 980.64] But obviously, the first target auditorium, well, it's just engineers and companies who are just trying to write scalable code. |
[981.16 --> 985.08] But at the same time, don't necessarily want to hire, like, 10 Rust engineers. |
[985.42 --> 994.40] Like, it's more like a balance between price for the engineer and how fast you can find them and the performance and quality of the software you create. |
[994.40 --> 998.16] Okay, so this is as much a technical decision as it is a business one. |
[998.32 --> 1005.40] Well, in a long term, yes, because how many startups you've seen which come to the point we're going to scrap out PHP and move to something else? |
[1005.52 --> 1006.28] It's been a bunch. |
[1006.70 --> 1006.80] Right. |
[1007.16 --> 1009.20] Facebook invented their own language, you know. |
[1009.30 --> 1009.52] Right. |
[1009.88 --> 1010.26] Hack. |
[1010.66 --> 1015.30] And we've contacted their, there are some Russian competitor who did the same thing, you know. |
[1015.30 --> 1017.64] So it's kind of, like, become so expensive. |
[1017.64 --> 1021.64] So you even have to jump in and make your own compiler for this stuff. |
[1021.64 --> 1028.66] And we can just move this line when you have to move from one tag to another, ideally up to infinity. |
[1028.96 --> 1032.06] Just if you need something fast, do it in other language. |
[1032.20 --> 1035.18] I mean, it's all about microservices these days and C-Bit applications. |
[1035.46 --> 1037.44] So, like, you're no longer stuck to one language. |
[1038.02 --> 1040.64] But at the same time, well, you're a startup. |
[1040.86 --> 1048.02] You're trying to integrate with a few providers, and you need to create 12, 15 API endpoints. |
[1048.70 --> 1050.64] Like, who are you going to be using for that? |
[1050.64 --> 1053.62] Do you really want to hire senior engineers who's going to be doing that? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.