# FaRM

[Article](http://nil.csail.mit.edu/6.824/2020/papers/farm-2015.pdf).

* Super fast with DRAM.
* All within one data center. Doesn't solve geo replication anyhow.
* Bottleneck - CPU.
* Sharded by key between primary/backup pairs.
* All replicas are updated if there's change. You always read from primary. If one replica is available you are good.
* All must fit in the (combined) RAM.
* Tolerate power failures - non-volatile RAM scheme (NVRAM).
* RDMA - network interface cards that can read/write memory directly.
* Kernel Bypass - app code can access network cards directly, without kernel help.
* When the battery system detects main power failure - stop all processes, write all RAM to SSD. Then die.
* RDMA - remote direct memory access. Access memory remotely without involving destination CPU at all. Append messages to a queue.
* API:
  * txCreate()
  * o = txRead(oid)
  * o.f += 1
  * txWrite(oid, o)
  * ok = txCommit()


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wiki.ainzzorl.lol/courses/mit-6.824-distributed-systems/farm.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
