Implementing mRuby (Part 2) | Ruby Creator Yukihiro "Matz" Matsumoto

Yukihiro Matsumoto, Ruby's creator, explains mRuby's design and real-world uses. The lightweight implementation powers web servers like H2O and nginx, game engines, routers, and payment devices. mRuby runs faster than standard Ruby and Lua, making it ideal for embedded systems that need scripting.
Chapters
This is about the introduction of the MRuby. So you understand what MRuby is. So the, then, next part. So how we can use MRuby for? So those applications. For example, the best example of the MRuby application is mod_mruby and nginx-mruby and H2O. All of them are web servers. mod_mruby, nginx-mruby, and H2O. All of them are web servers. So those web servers, using those modules and the web servers, you can configure your web servers using Ruby programs. So, and then they are pretty fast. And then you can configure, so, everything in Ruby. Yeah. So, that means that you don't have to fight against the mod rewrite very complex regular expression rules, or that you can write very straightforward conditionals for configure your programs. Or maybe you can react to the distributed denial of service attack by finding— Yeah. By blacklisting several— some IP addresses or something like that. This can restrict the bandwidth or CPU resource of the certain application under your web servers using the cgroup functionality of Linux. So the, actually, the mod_mruby, which is the, the MRuby module for Apache web server, is even faster than mod_lua, which is kind of doing the same things using root Lua. And the nginx-mruby is the one of the fastest Ruby web servers. So they're fast, faster than factor of 2, 3, or even 5 times than the usual, you know, say Sinatra programs. So if your applications can run on MRuby, which is the subset of the Ruby programming language, so the— not all the programs run in MRuby, just because you can't— you cannot run Rails in MRuby. But we have several, several say, web application framework, which is kind of similar to Sinatra. So you can write the tiny web application in, in MRuby. So in that case, the mod MRuby or nginx-mruby is far faster than usual Ruby. And H2O is recently written, the web server for HTTP/2. And then, which comes with the MRuby by default. So you download the H2O server, so you compile it, and then if the MRuby is installed on your computer, so the H2O is automatically configured to use MRuby. The other example is the gaming systems. So several game companies is working on embedding MRuby into their games. For example, Sid Meier's Starship, which is the Civilization series, the recent one like this. So they sent me a mail to ask me permission to use MRuby logo for their material. So they didn't— I didn't ask them to use it. So they found MRuby. And they decided to use MRuby. And they asked me about the— for permission to use the MRuby logo in their manuals and materials. So, maybe soon we will have the box of game that has the— OK, this program contains the MRuby and this something, something, something. I don't know, maybe in October or November. I don't know, maybe in a month or two. Anyway, so other systems. Yep. Microsatellites. So the QPS Lab company in Japan is working on the microsatellites. Like this big, so the half-inch cube, half-inch cubic size. And microsatellites piggyback in the real satellites. So the real satellites will maybe weigh several tons, the big one for the broadcasting or something like that. The microsatellites piggyback on that rocket. So as a, you know, in an extra space. So they go to space, they, the rockets throw away those satellites. So they control by themselves to get on the Earth's orbit to be a satellite. So these microsatellites go around the Earth for a year or 2. then sensing data or transmitting that data to the control tower or something like that. And those systems are much cheaper to get sat right because it's piggyback. But, you know, the deployment schedule is decided by the other factor, like the rocket, that's not right. So you have to be very quick to implement those satellites. So the QPS Lab company decided to use MRuby. So they use the standard hardware, so that you can configure those hardware by MRuby. So you can— So you can implement your, your application, your satellite, using MRuby. So by configuring MRuby. So the, the sensor controller, or the, the orbit, whatchamacallit, I don't know. The, the gyro or something is controlled by C. So those program— those systems can be combined and configured by MRuby programs. So The other thing is IIJ Company, which is in Japan, sells router which has MRuby in it. So you can have the user menu or some kind of configuration doing, using MRuby. Other thing is the company named Cloudwalk, which is in Brazil, I guess, is the— implemented some kind of payment system, payment devices, like a credit card reader. So it's, it runs MRuby in it, so that you can adapt those kind of the, you know, the payments, the different complex, complicated rules of the payment systems. So the, I believe MRuby has huge potential in the embedding field. Embedding in applications, embedding in systems, embedding in devices. So you, I think we can beat the Lua or Tcl or the JavaScript in this field using MRuby. So the Ruby is, you know, the better impro— Yeah. Productivity. So that you can use MRuby to be more productive, so, or effective, or maybe enthusiastic. And, like, not only in web, to write a web application, but also in the, some kind of embedding field, or the systems to, to be— extendable. So, so I, I believe MRuby has the, you know, the bright future. So, and then, that, that's all, folks. Thanks.
More from Tim

He Sold His Car to Build This Startup, Then Pitched It for $1M 😳 #Startups #AI

This Startup Moves Your Crypto BEFORE Hackers Can Steal It 😳 #Crypto #Cybersecurity

15 Months Without Refrigeration?! This Startup Thinks It Can Go Global 🥥 #FoodTech #Startups







