Giter Club home page Giter Club logo

lib_mogilefs's Introduction

Dependancies

sudo apt-get install libmicrohttpd-dev libcunit1-dev libcurl4-openssl-dev libapr1-dev libaprutil1-dev







basic structure:

tracker.c

manage:
registering tracker
connecting to tracker
executing request
each connection has its own APR memory pool


request.c
manage calling a pool aware request
each request has its own APR memory pool
typical connection psudocode:

for number or trackers
randomly choose 1
get a pooled connection (or create if unavailble)
execute a request on the connection
if any errors, kill the connection and deallocate it.
If its a connection error, mark the tracker as inactive (only if > 1 trackers)
if all goes well return the tracker connection to the pool.


pool.c
manage active/inactive list of trackers.
manage a connection pool for each tracker.
pool management tasks:
every x seconds:
	check tracker is alive
		mark tracker active/inactive
	check number of connections in pools
		expire oldest connections (LRU)

pool is stack based (FIFO) so we can check the bottom of the stack when expiring.
	
	
file.c
Manage the File System
Look after pooling File Server connections
tracker only calls:
	get_paths
	list_keys
	rename
	delete


file_upload.c
Manage directly calling cURL to upload a file.
Manage calling Tracker::create.open => FileServer::upload => Tracker::create_close with timeouts and fail over.
upload using bytes or FILE


file_download.c
Manage directly downloading from file server using cURL
Manage calling Tracker::get_paths => FileServer::download with timeouts and fail over.
Handle callback stream, bytes or FILE return values.





lib_mogilefs's People

Contributors

markpent avatar

Watchers

James Cloos avatar

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.