Giter Club home page Giter Club logo

go-paxos's Introduction

go-paxos

Simple implementation of the Paxos consensus algorithm in Go to aid in my learning of the language, based on material and pseudocode prepared by Naranker Dulay.

Debrief

To conclude my initial learning of Go, I decided to implement the Paxos consensus algorithm with inspiration from my Distributed Algorithms module earlier in the year.

Go is easy enough to write and its usage of struct methods offers an interesting balance between OOP and non-OOP, whose basics I found no trouble adapting to in this project. Having previously worked with Elixir in making an implementation of MultiPaxos as part of the aforementioned Distributed Algorithms module, adapting my knowledge with working with Elixir process mailboxes to Go channels was fun, though I think I will need to practice further to fully understand the nuances of unbuffered channels (which I did not use in this project).

A problem I had with this project was the idea of exposed functions being a separate idea from the idea of encapsulation in OOP, and this may be potentially reflected in my code as I was unsure of which functions would need to be exposed if this package were to be an actual library. This follows directly from my unsureness of the nuances of the struct methods, as the use of them encourages me to use an OOP style of writing and causes me to ignore the fact that in the end they are only an abstraction of a datatype, rather than an actual object - perhaps as a language it is too general and this makes it difficult for me to write in it without thinking about other language writing styles, or perhaps it is just the fault of my inexperience.

Another issue I had was with understanding the method of actually starting a Go project. It is such a radically different approach (having a dedicated set of directories) to other languages that it caused me quite a bit of frustration when I first tried to start.

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.