We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

I'm Luvin' It

00:00

Formal Metadata

Title
I'm Luvin' It
Subtitle
Introduction to Luvit and Virgo project
Title of Series
Number of Parts
90
Author
License
CC Attribution 2.0 Belgium:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor.
Identifiers
Publisher
Release Date
Language

Content Metadata

Subject Area
Genre
Abstract
Short introduction to Luvit and virgo project. Luvit is an open-source project which uses libuv and exposes Node.js API on top of Lua(jit). Virgo is an open-source framework for building different host agents (e.g. monitoring / metrics collection agent, etc.) built on top of Luvit.
25
Thumbnail
15:46
51
54
Thumbnail
15:34
55
57
Thumbnail
1:02:09
58
Thumbnail
16:08
62
Thumbnail
13:26
65
67
Einheitliche FeldtheorieGoodness of fitProjective planeSoftware frameworkLoop (music)Event horizonLibrary (computing)2 (number)Mobile appService (economics)Windows RegistryComputing platformPhysical systemDifferent (Kate Ryan album)Point cloudBit rateStandard deviationMereologyOpen setProcess (computing)Open sourceCartesian coordinate systemSoftwareFormal languageCross-platformWordSpacetimeLecture/ConferenceComputer animation
Open sourceJust-in-Time-CompilerProjective planePoint (geometry)Lecture/Conference
Server (computing)TelecommunicationCommunications protocolRead-only memoryStructural loadLink (knot theory)Table (information)Fiber bundleMeta elementObject (grammar)Connected spaceBootstrap aggregatingCore dumpCycle (graph theory)Software developerMoment (mathematics)Computing platformSign (mathematics)Projective planeBinary codeWeb pageDifferent (Kate Ryan album)CodeProcess (computing)Revision controlPhysical systemLatent heatFormal languageField (computer science)Java appletCASE <Informatik>Message passingMereologyIndependence (probability theory)Line (geometry)Slide ruleWindowMetric systemLogicSemiconductor memoryServer (computing)Dependent and independent variablesSpeicherbereinigungIntegerOperating systemGraphical user interfaceWeb 2.0Service (economics)Multiplication signProgramming languageFunctional (mathematics)InformationSpacetimePoint cloudSimilarity (geometry)Data centerParsingComputer configurationGroup actionNumberScripting languageInversion (music)Graph (mathematics)Game theoryMobile appLibrary (computing)BitCoroutineType theoryPortable communications deviceProper mapDiagramComputer architectureMatrix (mathematics)Point (geometry)Data managementMultiplicationHigh availabilityCross-platformResultantCommunications protocolUniverse (mathematics)Computer animationLecture/Conference
Windows RegistryService (economics)Point cloudPlotterLipschitz-StetigkeitLecture/Conference
Transcript: English(auto-generated)
Okay, so good morning everyone. I hope everyone is doing okay, even though it's still pretty early My name is Tomas Muros and today. I'm gonna present the Love it and Virgo project I know you're probably thinking what the hell is that because it both of their projects have kind of a cryptic name But I'll dive in soon, and you'll soon find out
so here's a here's the agenda and Who am I? I'm Tomas Muros. I work at Rec Space I used to work on cloud monitoring, which is a rest based fully distributed monitoring system and currently I work on service registry, which is a
rest based API for registering your services and your processes I'm also a project chair of Apache deep cloud project. Which is a project which deals with Working with different cloud api's and also like open source and open standards So what is Love it? Love it is a framework or
Platform for building different network applications written in Lua Love it exposes Node.js API, but on top of Lua I don't know how familiar you are with the Node.js, but Node.js is basically a
server-side JavaScript. Basically you can write your Networking applications in JavaScript and Love it aims to do the same thing But instead of writing your apps in JavaScript you can do it in Lua So Love it stands there basically Love it name is composed of three words. First one is
First letter is L which stands for Lua, which is the language You write your apps in Second abbreviation is uv which stands for the libuv. Libuv is the actual C library which deals with the Cross platform and the event loop stuff, which is also used by Node.js
that's one of the biggest users and also used by Love it and the third part stands for LuaJIT, which is a which is a just-in-time compiler for Lua so Love it is a Open-source project licensed under Apache 2.0
So here's a quick example to get you excited if you're familiar with Node.js you can probably Already see what the example does, but basically it starts an HTTP server and when you hit it you get a back Response which says welcome to Fuzzdom
So the code in JavaScript would actually look pretty similar There's some syntactic differences because Lua doesn't have object But it has like tables and meta tables, and there's some minor differences there, but otherwise the API is pretty similar So some history Love it project was originally developed by Tim Caswell. Tim Caswell is a pretty cool guy
You should probably go check out his github page and follow him there because he has a bunch of cool and crazy projects I think at the moment. He's working on his own language, so basically he has a bunch of cool stuff, but Love it is a pretty young project first version version was released in 2011 and
Soon after the first version was released my team at Rackspace decided to Help with the project because basically We decided to use it for our monitoring agent, which I'll describe more later So yeah like the slide says there were we contributed a lot to the project, and we're still contributing so
If nothing else there were also a bunch of other independent contributors But also a bunch of a couple of paid people working on it So yeah, why should you care first thing? I guess is Lua is cool I personally like Lua more than JavaScript although it does have some bad parts
Which are similar to JavaScript for example JavaScript doesn't have a 64-bit integers it has this messy number type which makes a lot of things difficult and There's pretty much the same problem in Lua, but in Lua you have other things such as coroutines and
other stuff so Lua was primarily developed by I think some academics in from Brazilian University and It's used a lot as a secondary slash scripting language in Different apps and games and so on I guess a couple of popular uses are World of Warcraft game
Well I think the graphical interface and AI is built in Lua and Fsmvm which is a tiling window manager and one of the strong points I guess or one of the many reasons Lua exists is because it's easy to embed it
It provides a simple C-based stack API Which means you push a value on a stack and you can pop it up pop it off And that's basically how you integrate with other languages So here's an example of the C-based stack API as you can see you can you push an integer on a stack and you push integers
and then you call the Function your previous saved a reference to and you get a result back, so it's basically it's pretty easy to embed it So what is Virgo? Virgo is a Monitoring agent we built a direct space for running on many different servers
So when we decided to build the agent we we had some requirements in mind and one of the requirements was I guess decent performance and low memory footprint because This agent is gonna run on your server pretty much all the time And you probably don't want this agent to affect other services like web server or whatever running on your servers
So that's why we decided to go with love it so yeah, basically Virgo is not just a Right space cloud monitoring agent, but is Platform for building other host agents host agent is basically pretty much any kind of
Long-running process which performs some kind of action on host operating system in our case. This is collecting Metrics and sending them back to their endpoint, but you could use it for example to execute commands on your system and so on So yeah, why did we pick love it one of the goals was as previously mentioned was?
low-memory footprint and We basically wanted to Speed up the development cycle if the agent would be written in C. This would probably probably get even lower memory usage, but this means we need to deal with a manual garbage collection and so on and
It will also the whole development cycle would be pretty slow, so we basically have Core which bootstraps which pretty much bootstraps the process which is written in C And the core is pretty much responsible for Handing the option parsing and logging, but the rest of the stuff is outsourced to the
Love it layer, so pretty much all of the business logic is written in Lua which allows us to also besides the faster development cycle it also allows us to Basically if you want to ship the update we can just ship the updated Lua code
And we don't need to restart a whole process. We can just reload the Lua code and without restarting the Whole process we can reload a business logic That's stuff I previously already mentioned and one of the things I also wanted to add is we also wanted to make it really secure Because there are a bunch of other monitoring agents written in
Ruby Python and so on and some of those agents don't even use HTTPS or a secure connection So our goal was to only use a secure connection on all the bundles bundle is basically a tar package which contains a Lua code is signed and also, the binaries are signed the actual signing depends on the platform we use the
Debian specific stuff and Debian systems and on Windows we also use the Microsoft thing for signing the executable so we pretty much Yeah, made it really secure another thing we wanted to do when we build the agent is keep the protocol simple, so We decided to go with the new line delimited JSON. Here's an example of the outgoing
Message in this case we send a heartbeat which is kind of like a ping so we have this semi-structured JSON some of the fields like ID and version and so on are required and Other stuff like brands are optional and depend on the actual method and here's the response from the server for example
Here's a graph which shows memory usage of agents written in different programming languages There's agent written in C++ Ruby and so on and there's our Virgo which only uses around like five megabytes of memory
We could actually go even lower But because of we also wanted to make the whole agent really close cross platform and portable So we decided to statically link all the libraries which does increase memory usage a bit especially because we link against libopenSSL, which is known to take a lot of memory and
Here's a quick diagram of the our endpoint architecture Basically agent connects to multiple endpoints. That's for high availability reasons So if one of the our data centers goes down For example, your agent can still send some metrics for to us and we can process them and send an alert for example
Basically agent establishes three persistent long-running connections, but it actually only sends data Which is metrics and item system information over one connection and if this connection dies Other connection other secondary connection is promoted to a primary connection So I guess that's it
I hope you I got you're interested and if you have a similar problem, for example, if you want to embed something or You need the low memory footprint and fast execution You should probably check love it and Virgo and I also want to add that Yeah, if you're interested in this kind of problems, my company a recspace is looking for new people to join us
so let me know go to this website or send me an email or find me around the On this room after the talk, I guess. Thank you. Oh, yeah I also have some Apache lip cloud to Rex with cloud monitoring and Rex based service registry stickers
I'll leave them on the desk and you can go grab it