<commit_before># toy_afs
A toy filesystem which is AFS-like

## Todo
- (Done) build grpc (https://github.com/grpc/grpc)
- (Done) build protobuf (https://github.com/google/protobuf/releases/download/v3.0.0-alpha-1/protobuf-cpp-3.0.0-alpha-1.tar.gz)
- (Done) build Fuse (http://fuse.sourceforge.net)
- rewrite the sync_files.sh
- implement the user-level filesystem
- implement the local update protocol for crash consistency


## Func
- int open(const char *path, int oflags);
- int  read(  int  handle,  void  *buffer,  int  nbyte );
- int  write(  int  handle,  void  *buffer,  int  nbyte  );

## RPC Calls
- int tafs_read(const char *path, char *buf, size_t size)
- int tafs_open(const char *path, int flag)
- int tafs_getattr(const char *path, struct stat *stbuf)

## Important References:
- How to initialize a struct using the c style while using the g++ compiler? 
  This is to solve the `static struct fuse_operations` problem, which cause a error message of 'non-trivial designated initializers not supported' when compiled with g++.

  - http://stackoverflow.com/questions/12122234/how-to-initialize-a-struct-using-the-c-style-while-using-the-g-compiler
  - http://stackoverflow.com/questions/16622434/clarification-for-implementing-a-fuse-filesystem-in-c

- Tutorial: HowTo integrate a C++ library/class into a C program
  How to use extern "C" {} to integrate c++ codes into c
  - http://www.teddy.ch/c++_library_in_c/

- An IBM example of using FUSE+RPC to realize a AFS
  - https://www.ibm.com/developerworks/library/l-fuse/<commit_msg>added ref links to README<commit_after># toy_afs
A toy filesystem which is AFS-like

## Todo
- (Done) build grpc (https://github.com/grpc/grpc)
- (Done) build protobuf (https://github.com/google/protobuf/releases/download/v3.0.0-alpha-1/protobuf-cpp-3.0.0-alpha-1.tar.gz)
- (Done) build Fuse (http://fuse.sourceforge.net)
- rewrite the sync_files.sh
- implement the user-level filesystem
- implement the local update protocol for crash consistency


## Func
- int open(const char *path, int oflags);
- int  read(  int  handle,  void  *buffer,  int  nbyte );
- int  write(  int  handle,  void  *buffer,  int  nbyte  );

## RPC Calls
- int tafs_read(const char *path, char *buf, size_t size)
- int tafs_open(const char *path, int flag)
- int tafs_getattr(const char *path, struct stat *stbuf)

## Important References:
- How to initialize a struct using the c style while using the g++ compiler? 

  This is to solve the `static struct fuse_operations` problem, which cause a error message of 'non-trivial designated initializers not supported' when compiled with g++.

  - http://stackoverflow.com/questions/12122234/how-to-initialize-a-struct-using-the-c-style-while-using-the-g-compiler
  - http://stackoverflow.com/questions/16622434/clarification-for-implementing-a-fuse-filesystem-in-c

- Tutorial: HowTo integrate a C++ library/class into a C program

  How to use extern "C" {} to integrate c++ codes into c
  - http://www.teddy.ch/c++_library_in_c/

- An IBM example of using FUSE+RPC to realize a AFS
  - https://www.ibm.com/developerworks/library/l-fuse/
{'fraction_non_alphanumeric': 0.12082262210796915, 'fraction_numerical': 0.015424164524421594, 'mean_word_length': 3.811437403400309, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '276897', 'n_tokens_mistral': 1094, 'n_tokens_neox': 1049, 'n_words': 317}