Project

General

Profile

Actions

Task #2695

closed

Feature #2620: Keep supports I/O locking

Review 2620-keep-serialize-io

Added by Tim Pierce about 10 years ago. Updated about 10 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Tim Pierce

Description

This is a very large code review. Here are some hints that may make it easier to understand what's going on here:

A Volume interface has been added to provide an abstraction layer for implementing any kind of storage device. The only Volume that has been implemented so far is a UnixVolume (a volume mounted as a local POSIX filesystem).

When Keep receives a GET or PUT request from a remote user, it invokes a Get or Put method on the appropriate Volume. The Volume is responsible for serializing any I/O requests if necessary.

Suggestions for review:

  1. First review volume.go, which describes the Volume interface and implements a MockVolume used for testing the front end.
  2. It may help then to review keep_test.go, to see how the Volume interface is used in unit tests.
  3. At that point, the changes in keep.go should be easier to understand: they chiefly change the Keep front-end to interact with the Volume interface rather than reading and writing files directly to disk.
  4. The underlying UnixVolume type is implemented in volume_unix.go, including the code for managing any serialized I/O requests. volume_unix_test.go supplies unit tests.

Or, you know, review in whatever order makes sense to you. :-P

Actions

Also available in: Atom PDF