Giter Site home page Giter Site logo

ndfs's Introduction

#分布式图片存储系统(demo版)

##服务端启动流程:

1.启动nameserver: 运行ndfs.nameserver.NameServerMainClass的main方法。相应的端口和参数配置在src/main/resources/conf.properties文件中。

2.启动dataserver: 运行ndfs.dataserver.DataServerMainClass的main方法。为减少文件碎片,第一次启动时,系统会在D盘下建立400多个block文件,用于后续的图片存储。端口和参数配置在src/main/resources/conf.properties文件中。

##客户端使用方式:

1.按照上面步骤启动服务端程序。

2.上传文件:运行ndfs.client.netty.MainClass的upload方法,以操作系统的文件路径作为参数,完成上传。上传成功后,方法返回该文件的URL地址。

读取文件:运行ndfs.client.netty.MainClass的read方法,以文件URL地址为参数,该方法会将读取到的文件存放在D盘下的new.jpg中。

##实现原理

image

参考淘宝图片文件存储系统。http://code.taobao.org/p/tfs/wiki/intro/

ndfs's People

Contributors

songyibing 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.