Giter VIP home page Giter VIP logo

pogger's Introduction

Howdy ๐Ÿ‘‹

I am Khanh Nguyen (hardest last name to ever be pronounced Ikr):

  • ๐Ÿ’ป I'm currently a SWE at Google
  • ๐ŸŽ“ I'm a recent Computer Science graduate at New York University
  • ๐Ÿ‡ป๐Ÿ‡ณ I'm from Vietnam and have been studying in the U.S since high school
  • โœจ I occasionally contribute to open source projects
  • ๐Ÿงญ I have been to 20 states in the U.S. I'm looking to get back on it once I graduate
  • ๐Ÿ’ป I'm currently exploring different systems-related topics!

pogger's People

Contributors

joyceluyy avatar kn99hn avatar

Watchers

 avatar

pogger's Issues

Implement reconciliation logic

Parse all the trace files: trace-* and carry out the reconciliation logic with vector clock.

Each Event type in the trace file should have timestamp = process_name:path_id:vector_clock. The vector clocks of each event can be reproduced easily in this case.

Using the vector clock, it can be determined which event happened before and after. All the paths can be parsed into a Graph with edges, indicating a happened before relationship. This will be useful when we do DFS validation logic later on.

Implement Checker

Checker should takes in an "expectation tree" created from #4 and a "trace tree" produced after reconciliation #2.

While traverse the expectation tree, we will run the check function for each expectation statement. The possible-match result of each check function will form a search tree, with the height equals to the number of expectation statement ad width dependent on the number of variant statement.

The Checker should carry out DFS on the search tree, to check if there exists a leaf node that reaches the end of the expectation tree and the trace tree at the same time.

Create Check functions for each expectation statement

For each supported expectation statement, we will create a check function. The check function takes a tree node in the trace tree and return possible number of events it could match in the given subtree.

  • task
  • send
  • recv
  • repeat
  • maybe

Implement validator module

Validator module represent the parsing of validator language:

Validator {
    Process_name: {
       repeat between 1 and n {

      },
      maybe {

      }
   }
}

Implement Annotation module

Annotation module allows users to add annotation to their applications and allow us to record unique path for each trace.

Path {
  path_id
 events: [Event]
}

Event = Task | Notice | Message

Task {
  name
  timestamp
  Task
}

Notice {
  name
  timestamp
}

Message {
  message_type
  message_id
  message_size
  timestamp
}

timestamp = process_name:path_id:vector_clock_value
message_type = send | receive

Functions:
- init(): initialize the state, create trace files. This should utilize Agent in elixir
- set_path_id: set path id for current path <- using random hash
- start_task, end_task: should be accompanied each other of a task
- notice(string): record a log message
- send(...)/receive(...): message_id and message_size must be the same for 1-1 send/receive messages

Set up test and analysis

  • Measure latency of adding annotations on the applications
  • Validate if our work is correct using an ADT FIFO queue with multiple distributed enq and deq commands.

Trace file format

I think JSON makes the most sense here since it's easy to parse and write with built in lib.

JSON:

Task: {
   timestamp: a:path_1: 1,
    name: busy,
    Task: {
         ....
     }
}
Send: {
   timestamp: a:path_1: 3,
    message_size: ....
}
Notice {
   timestamp: a:path_1:5,
   message: This is a log message
}

Pros: Easy to write and parse because we can use built in lib from elixir to write and parse JSON objects.
Cons: Take up lots of space

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.