Posts
Voting machine POC
This blog post describes a POC of a Voting Machine. It may look more like a Roadmap or a backlog for myDHT, yet it still is an example of a myDHT application.
The code is hosted on github.
The protocol Description A simple protocol, between each step should be added synchro period where we check distribution or synchro of each peers but it is not done at this point :
Posts
Implementing MyDHT tunnel
Last post, we gave some thoughts on tunnel and mydht interaction,concluding that a mydht specific implementation specific for tunnel should be build (and in a second time maybe use it in a transport).
That was done for a single mode of ‘Full’ tunnel : the mode that does not require caching. Cache usage mode and error reporting implementation are still incomplete but shall follow similar steps.
This post will describe some of the change upon tunnel and mydht, mainly needed to run within multithreaded environment with non blocking transport stream.
Posts
Tunnel crate and MyDHT ?
In my previous post I described some aspects of MyDHT crate, basically a library to implement peer2peer application.
In this post I will describe another crates, tunnel; then try to define how it will be used within MyDHT.
Tunnel is a crate for experimenting with different kind of multi hop layered ciphering of content (similar to tor, maybe more like a multihop vpn).
It defines the various traits for operations associated with this problematics : route building, peer proxying, message sending, peer receiving, peer replying.
Posts
Allowing both blocking and non-blocking transport
initial non blocking implementation In previous posts, MyDHT was redesign to include a main event loop (using mio) and manage non-blocking transport implementation from a central mainloop process.
Those non blocking transports behave similarily as non-blocking Tcp scocket by returning an error (“would block”) when not ready for operation. The mainloop polled registered event for those operations : connection incomming, read and write stream availability. Once polled operation are restored : for connection state is changed, for read and write streams service associated with those operation is unyield (the service was suspend on ‘would block’ error).
Posts
MyDHT service usage switch (part 2)
The point of this post is to give a taste of how service are configured within the MyDHT new design. we are going to adapt a test case to run in a single thread.
All changes describe are on ‘MyDHTConf’ trait implementation for ‘TestLocalConf’ struct (to create an application this big trait must be implemented : basically it contains the associated types and the initialisation functions of every components).
Posts
MyDHT Refactoring And Threading (part 1)
Lastly I got some time in my hand (ended my previous job and looking for more low level programming) to refactor some pretty terrible old project of mine.
Even if the refactor is far from complete, the design and its primo implementation is.
This post focus on MyDHT redesign,
Previous design The initial purpose of MyDHT project was to design a library to run a distributed hash table. It evolves to key value peer to peer info exchange with multi-hop request proxying (query proxyied to none connected peers).