https://github.com/asionius/fibjs-ceph
This repository stores fibjs-for-ceph binary file and document
https://github.com/asionius/fibjs-ceph
ceph fibjs librados librbd rados radosgw rbd
Last synced: 8 months ago
JSON representation
This repository stores fibjs-for-ceph binary file and document
- Host: GitHub
- URL: https://github.com/asionius/fibjs-ceph
- Owner: asionius
- Created: 2017-06-14T03:03:07.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2018-09-27T08:08:12.000Z (over 7 years ago)
- Last Synced: 2025-06-12T12:14:04.482Z (about 1 year ago)
- Topics: ceph, fibjs, librados, librbd, rados, radosgw, rbd
- Language: JavaScript
- Homepage:
- Size: 72.2 MB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# fibjs-ceph
This repository store fibjs-for-ceph binary file and document. It offer rados object store api and rbd block device manage api. Refer to document for detail.
This project use all rados & rbd async io apis to write and read with ceph osds, it will not block the thread which act as a powerful engine to dispatch fibers which actually carry on the logical calculation. Thus, you can write high performance http server using fibjs natural high concurrency feature, to offer radosgw with high availability.
# download
```
git clone https://github.com/asionius/fibjs-ceph.git
```
# install
```
cd fibjs-ceph
chmod +x fibjs-for-ceph-linux-x64-v0.27
cp ./fibjs-for-ceph-linux-x64-v0.27 /usr/local/bin/fibjs
```
# test
```
fibjs rados_test.js
```
# src code
[https://github.com/asionius/fibjs/tree/librados](https://github.com/asionius/fibjs/tree/librados)
# example
- rados
```
var rados = require('rados');
var cluster = rados.create('clusterName', 'userName', '/path/to/myceph.conf');
cluster.connect();
var io = cluster.createIoCtx('poolName');
var s = io.open('key');
s.write('hello key');
s.rewind();
console.log(s.readAll().toString());
```
- rbd
```
var rados = require('rados');
var cluster = rados.create('clusterName', 'userName', '/path/to/myceph.conf');
cluster.connect();
var io = cluster.createIoCtx('poolName');
var img = io.openImage('imgName');
img.write('hello image');
img.rewind();
console.log(img.read(11).toString());
```
# document
- refer to docs/module/ifs/rados.md