Talks
Speakers
Events
Topics
Sign in
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
We as rubyists tend to write software that runs on the web, without a deep understanding of what it would take to write the plumbing for that same software. I think it's useful to have a basic understanding of how some of the lower level components of a system work. I'll discuss the basics of systems programming, using Ruby. I'll talk about syscalls and kernel space vs user space. I'll cover a bit about file descriptors and what they're for. And hopefully I'll walk through a small example of a working webserver using those primitive syscalls. Help us caption & translate this video! http://amara.org/v/FG7N/
Date
Summarized using AI?
If this talk's summary was generated by AI, please check this box. A "Summarized using AI" badge will be displayed in the summary tab to indicate that the summary was generated using AI.
Show "Summarized using AI" badge on summary page
Summary
Markdown supported
In this video titled 'Ruby Systems Programming,' speaker Andy Delcambre presents an exploration of systems programming with a focus on Ruby. Delcambre begins by establishing the concept of systems programming as software that interacts directly with computer hardware, providing a platform for application software. The main points discussed throughout the presentation include: - **Definition of Systems Programming**: According to Delcambre, systems programming revolves around low-level interactions with hardware and the kernel, which operates system-level software not directly visible to the user. - **Kernel and User Mode**: He explains the differentiation between kernel mode, which has unrestricted access to hardware, and user mode, where applications operate with limited permissions, relying on system calls for privileged operations. - **System Calls**: Delcambre emphasizes the role of system calls, which allow programs to request services from the kernel, detailing how a syscall is invoked and executed. He notes a surprising statistic: despite there being over 120,000 system calls during a certain request, Linux maintains a compact syscall API with only 326 available functions. - **File Descriptors**: The talk explains the concept of file descriptors used in UNIX systems to manage file-like interactions, including handling sockets for network programming. He describes essential syscalls for manipulating file descriptors such as read, write, and close. - **Networking with BSD Sockets API**: Delcambre transitions into discussing networking fundamentals, illustrating the success and longevity of the BSD sockets API. He describes the sequence of creating, binding, and listening with sockets for HTTP connections, highlighting the ability to send and receive requests and responses. - **Example Implementation**: A simple Ruby HTTP server example is presented to demonstrate how to utilize system calls and sockets effectively. The implementation serves files and processes requests, confirming its functionality through live testing during the presentation. In conclusion, Delcambre emphasizes the importance of understanding the lower-level components that support higher-level application development, such as those used in Ruby on Rails. He concludes by suggesting recommended readings, including 'Linux System Programming' by Robert Love and works by Richard Stevens on network programming. These materials provide deeper insights into systems programming and network operations, making them valuable resources for developers interested in enhancing their knowledge of the underlying principles that drive their applications.
Suggest modifications
Cancel