text
stringlengths
0
2.35k
[2119.00 --> 2121.14] But I've been thinking about this problem for a while.
[2121.72 --> 2125.54] Basically, in short, if you want to do the multi-tenancy, you're doing it in your application code.
[2125.78 --> 2132.40] Roadrunner is designed to actually work the best in modern, like, Docker environment or container-based environment.
[2132.40 --> 2135.84] It's a single application per application instance, let's say.
[2136.08 --> 2139.14] Single instance of Roadrunner per or single instance of application, sorry.
[2139.34 --> 2139.78] Gotcha.
[2140.20 --> 2140.40] Yeah.
[2140.56 --> 2146.72] And I guess, as for me, it was a lot of challenges in, like, to write all these things.
[2147.10 --> 2154.40] Because basically, Roadrunner, as you can see in, like, Roadrunner repository, is just a CLI interface.
[2154.40 --> 2158.44] So it's just a Roadrunner server, Roadrunner workers command.
[2158.80 --> 2163.62] But everything is hidden under the main, I guess, three parts.
[2164.20 --> 2167.14] Those parts are, it's Azure, as Anton mentioned.
[2167.42 --> 2169.72] It's like, it was a surprise for me.
[2169.84 --> 2172.70] Because, you know, in GoLang, we don't have any containers.
[2172.70 --> 2184.60] So we, because we just don't need them to get something dependency or, so I heard about some project in Uber, like Uber FX or Google Wire, I guess.
[2185.04 --> 2187.70] But I don't think it's much popular solutions.
[2188.72 --> 2192.22] So in my project, I never, I worked with a container.
[2192.22 --> 2198.42] But BHP is everything about containers and everything about dependency injection and so on.
[2198.44 --> 2205.44] So we have to write such algorithmic container, which, like, mutate based on the configuration.
[2206.04 --> 2209.04] So it's not like, please give me some dependency.
[2209.66 --> 2212.60] It's about, I have a configuration.
[2213.18 --> 2217.36] I have a set of, I guess, at the moment we have 20 plugins or more, I guess.
[2217.50 --> 2219.96] I don't know how much exactly.
[2219.96 --> 2227.26] But you provide a bunch of plugins, like provide a configuration and say, okay, now build this.
[2227.76 --> 2231.44] Build this properly, managing the connection, as Anton says.
[2231.84 --> 2239.08] Like, if you provide, for example, initialize, like, a logger and logger needs a configuration.
[2239.56 --> 2246.84] So you have to properly topologically sort all the things to provide first, to initialize first, like, configuration.
[2246.84 --> 2250.22] Then provide this pointer to logger.
[2250.86 --> 2258.52] So the GoLang race flag won't help us here because it's so distributed all over the plugins.
[2258.52 --> 2264.08] So you have to manage and see every, like, race condition by yourself.
[2264.40 --> 2269.16] So you have to be very careful with writing all the things.
[2269.50 --> 2273.02] But we hide all this complexity inside the Endure.
[2273.36 --> 2278.74] And you have to be sure that provided dependency is, like, concurrent free.
[2278.96 --> 2279.12] Yeah.
[2279.12 --> 2282.48] So you can't, like, use it from the different threads.
[2283.18 --> 2285.64] But the second part is also Gorich.
[2286.08 --> 2287.10] It's a protocol.
[2287.58 --> 2290.02] It's in Gorich version 1 and version 2.
[2290.14 --> 2293.12] It was, like Anton said, it's a very basic protocol.
[2293.50 --> 2297.24] Like, I guess, 14 bytes of, correct me if I wrong, Anton.
[2298.02 --> 2299.68] 14 bytes or 18 bytes.
[2299.68 --> 2303.18] So the first person had 17 bytes heater for whatever reason.
[2303.38 --> 2304.66] 17 bytes, yeah.
[2305.08 --> 2311.66] It's, like, a few flags, like, payloads in Big Indian, Little Indian, and payload.
[2312.26 --> 2317.02] But imagine the situation if you pass your payload over the pipes, for example.
[2317.46 --> 2326.26] You don't have any mechanism to CRC or to check if this payload is correct, passing it from the one side of the wire to another.
[2326.26 --> 2334.14] But Roadrunner and Gorich version 3 has a protocol based on IP protocol.
[2334.28 --> 2347.38] So I've wrote, recently, a few protocols, like TCP IP, IP protocol, and combined them all together to have a proper protocol for communicating with PHP parts.
[2347.52 --> 2349.56] So we have, like, a synchronic support.
[2349.86 --> 2352.88] We have a header length, like in IP protocol.
[2353.04 --> 2354.94] We have variable length options.
[2354.94 --> 2361.94] So we have all this funny stuff to extend it and not to break it from version to version.
[2362.84 --> 2368.74] And I guess the third part is decay, which contains all these worker pools.
[2369.08 --> 2375.56] And this is complicating stuff because, you know, you have to, for example, imagine you have a HTTP plugin enabled.
[2375.92 --> 2378.48] The user want to get a statistic about the workers.
[2378.48 --> 2382.08] So the one approach is to stop the world.
[2382.70 --> 2390.76] Okay, stop all the HTTP requests and get all the statistics about, like, get all the pointers to workers.
[2391.22 --> 2395.02] Get the stat, print it with some format and show to the user.
[2395.02 --> 2406.50] And another approach is to have some shared place where you can safely get at any time, like, without logs, even, this pointer and to provide to user.
[2406.72 --> 2412.32] But when the restart happens or some issue happens, it will log only in this case.
[2413.20 --> 2415.34] So it's like statistics in the Roadrunner.
[2415.34 --> 2417.02] It's basically free for users.
[2417.02 --> 2419.80] It's not interrupt the actual request.
[2420.26 --> 2422.64] I mean, not HTTP, not jobs.
[2422.94 --> 2424.76] So it's none of them.
[2425.02 --> 2428.36] It's quite funny how it actually, how we jump into this edge cases.
[2428.54 --> 2434.92] Because most of our users are actually, like, already mature PHP applications and, like, large, large startups.
[2435.20 --> 2437.38] And, like, they don't play with, like, 10 requests.
[2437.50 --> 2439.80] Like, okay, I mean, we just bump a few millions a day.
[2439.80 --> 2441.12] And we see this bug.
[2441.22 --> 2442.08] So what is bug about?
[2442.20 --> 2442.90] Oh, you know what?
[2443.10 --> 2447.98] Over time, it's, like, things which you could never imagine while developing the thing.
[2448.26 --> 2452.34] But when they catch them, thankfully, the user reports them.
[2452.84 --> 2456.46] It's just easy to, like, it's kind of very easy to see how it works on scale.
[2456.74 --> 2456.92] Yeah.
[2457.34 --> 2462.42] And basically, imagine a situation when you have a completely fresh scheduler in Golink.
[2462.60 --> 2465.18] So I guess you saw this ticket recently.
[2465.64 --> 2469.00] It's about to write a completely fresh scheduler.
[2469.00 --> 2480.40] So we started working with that, I guess, a year before to provide a completely fresh scheduler to schedule jobs inside the Roadrunner.
[2480.62 --> 2484.36] So we don't finish it yet, but we're continuously working on it.
[2484.88 --> 2490.12] So to provide, like, a binary HIPs algorithm to sort by priorities all of these jobs.
[2490.12 --> 2500.58] Like, for example, if you have an urgent jobs to execute, you have to set the priority one, and it will be sorted and scheduled properly.
[2500.58 --> 2512.02] So there are a lot of such things, very complicated things, which you should work inside the Roadrunner and hide all of this complexity for users just to specify a few values in the configuration.
[2512.26 --> 2514.94] Just, okay, I don't need a gRPC, so it's removed.
[2515.08 --> 2517.96] But all of this complexity hidden under the hood.
[2517.96 --> 2522.32] That's why it's hard to create very nice user-friendly APIs.
[2522.74 --> 2527.36] You know, there's a lot going on under the hood, but, you know, like, you're making it easy for people to actually use.
[2527.44 --> 2527.98] That's the beauty.
[2528.28 --> 2531.32] What can be easier to make just a Hello World endpoint?
[2531.56 --> 2532.36] Because it's so true.
[2532.36 --> 2537.66] Yeah, well, the loan balancer, Kubernetes cluster, control plane, and a few other things.
[2538.06 --> 2538.70] That's easy.
[2539.54 --> 2539.90] I know.
[2540.08 --> 2543.66] Man, things have changed over the last decade or two.
[2544.22 --> 2554.44] So I do want to switch gears a little bit here, sort of to understand, like, if someone wanted to contribute, because it sounds like there's still a lot of awesome ideas sort of at play and coming to the project.
[2554.44 --> 2560.46] If someone wanted to contribute to that, like, what would basically be sort of a safe expectation of them?
[2560.54 --> 2562.68] Should they know how to work in PHP?
[2562.98 --> 2564.96] Should they know how to do Go?
[2565.42 --> 2567.18] Is there work for both sides of the fence?