• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

decentraland/content-service:

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

decentraland/content-service

开源软件地址:

https://github.com/decentraland/content-service

开源编程语言:

Go 94.3%

开源软件介绍:

IMPORTANT

This repository is outdated and has not been used is a while. If you want to see how Decentraland's distributed content network works, check out this repository.

Content Service

The content service is used to store and distribute content in decentraland that's manipulated by land owners

Our vision of a decentralized platform can't rely on a single centralized server storing an only copy of the virtual world's content. The Content Service allows anyone to host their own instance of the server that stores the world data. Today, the Decentraland client fetches content from a single instance of the content server that's maintained by us. In the future, we want the client to fetch data from multiple replicas of the content, this will guarantee its availability and fast download speeds, independently of the location.

The content hosted in each server includes all the files that make up Decentraland scenes, including .ts scripts, 3D models, texture images, audio files and videos. Currently, each server stores the entirety of the data of all of Genesis city. In future releases of the content service, you'll be able to host a server that only holds the data for specific parcels, to ensure that your scene is always available without depending on any third party.

Each file stored in the content server is cryptographically signed by the parcel owner's key, and the contents of the file are processed to generate a unique hash code, using the same algorithm that IPFS uses to generate its CIDs.

The content server has endpoints that you can send requests to, to fetch data and to validate the authenticity of the signatures on each file.

Technical overview

Note: As the original idea was distributing the content through ipfs, all content is still identified by the corresponding hash or CID (though support for ipfs is on hold).

Content is organized by scene and queried by parcel. When querying content, the client must ask for all the scenes that at least partially overlap with a given set of parcels, and then all full scenes need to be downloaded.

For uploading, content must be signed by the owner or update operator of the scene, and CIDs must be calculated for every file in the scene.

The upload process may corrupt scenes, so the client is responsible for checking if a given scene is still valid by checking that all parcels that are used by the scene still belong to the scene. This consideration makes working with this API a little bit tricky.

Requirements

The following dependencies need to be installed to run a content service server.

Setup git hooks Environment for development

$ make init

Configuration

To configure the service, edit the config.yml file, in the base directory.

Note: If you use s3Storage you need to set AWS environment variables: AWS_REGION, AWS_ACCESS_KEY, and AWS_SECRET_KEY.

Running

First start Redis:

$ make ops

Then build the project:

$ make build

You can instead build and run with a single command:

$ make run

make run starts an instance of the content service server.

Alternatively to docker, you can build and run the server with

$ go build .
$ ./content-service

API Documentation

Documentation

Replication

To replicate a content-service server run:

$ make replicate

You will recieve a prompt to input the map coordinates for the NW and SE parcels.

This program connects to the server url provided in config.yml. It stores the data files in the dir specified by localstorage and populates the Redis instance defined in the redis field.

Copyright info

This repository is protected with a standard Apache 2 license. See the terms and conditions in the LICENSE file.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap