Welcome to the official website for relay (formerly relayfs).
The relay project files (example apps and related stuff) can be found here. relay itself is in the mainline linux kernel and can be found there.
If you're interested in examples of things you can do with relay and/or example code, see the examples page.
NOTE: These pages are in transition and don't yet reflect the latest version of relayfs, which is now called 'relay' due to the 'fs' part of 'relayfs' being removed (the original functionality is exactly the same - the only difference is that the 'fs' role is now played by host filesystems such as debugfs). The examples section and the nice pictures apply to what was once the "new" or "redux" relayfs. I guess the new relay could be called the "new new" relayfs, which these pages haven't yet been updated for. Please see the FAQ for the difference between the "old", "new" and "new new" relayfs.
Basically relayfs is just a bunch of per-cpu kernel buffers that can be efficiently written into from kernel code. These buffers are represented as files which can be mmap'ed and directly read from in user space. The purpose of this setup is to provide the simplest possible mechanism allowing potentially large amounts of data to be logged in the kernel and 'relayed' to user space.
See the official documentation for a more formal answer and a description of the API.
Here's a simple diagram illustrating the basic components of relayfs and a typical relayfs application:
This shows 4 cpus, each logging data to its own per-cpu kernel buffer via
relay_write(), one of a few relayfs API functions used for writing data into a buffer (these functions automatically determine the correct buffer to write into based on the current cpu id). Each of the per-cpu buffers is represented by a user-specified filename in the relayfs file system. Once the filesystem is mounted, the kernel buffers can be mapped into the address space of a user space application by using
mmap(2) on the corresponding relayfs file. As data becomes available in the kernel buffer,
write(2) can be used to write it to disk, for example. That's pretty much all there is to it.
For more information on using relayfs, see the examples page.