I'm Luvin' It
This is a modal window.
The media could not be loaded, either because the server or network failed or because the format is not supported.
Formal Metadata
Title |
| |
Subtitle |
| |
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 | 10.5446/40297 (DOI) | |
Publisher | ||
Release Date | ||
Language |
Content Metadata
Subject Area | ||
Genre | ||
Abstract |
|
FOSDEM 201344 / 90
2
5
8
10
12
13
14
15
17
19
21
24
25
28
29
31
32
34
36
39
40
43
44
46
50
51
52
54
55
57
58
62
65
66
67
78
79
87
88
00:00
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
02:09
Open sourceJust-in-Time-CompilerProjective planePoint (geometry)Lecture/Conference
02:25
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
10:53
Windows RegistryService (economics)Point cloudPlotterLipschitz-StetigkeitLecture/Conference
Transcript: English(auto-generated)
00:00
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
00:24
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
00:42
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
01:06
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
01:22
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
01:44
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
02:04
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
02:24
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
02:41
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
03:03
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
03:22
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
03:45
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
04:05
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
04:23
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
04:44
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
05:02
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
05:23
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
05:43
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
06:03
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
06:21
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?
06:44
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
07:01
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
07:23
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
07:40
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
08:02
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
08:23
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
08:46
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
09:06
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
09:20
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
09:42
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
10:01
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
10:24
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
10:44
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
11:03
I'll leave them on the desk and you can go grab it