Giter VIP home page Giter VIP logo

ablox / ablox Goto Github PK

View Code? Open in Web Editor NEW
12.0 12.0 2.0 166 KB

AnyBlox - Data Containers in Go - version, snapshot, share, fork, backup, and restore your application data with a Docker like interface. Every container provides the complete view of the entire data set while only containing a subset of the data. Efficiently transfer only changed portions of data containers.

License: Apache License 2.0

Go 100.00%

ablox's Introduction

ablox

Join the chat at https://gitter.im/ablox/ablox

This system is currenly a work in progress. The server side is working and is easy to setup. It currenly only supports the NBD protocol.

To use:

  1. Clone the repository

  2. Run from prompt> go get github.com/urfave/cli

  3. Run from prompt> go run server/server.go hostname port

  • hostname - the hostname or IP address you want to listen on. Hostname can be localhost if you only want it available locally
  • port - The port you want to listen on.

Put any files you want to attach in a subfolder "sample_disks". They are immediately avaiable for all users.

Right now, any users are allowed to accesss any files. File locking is not occuring on the server so you must make sure you only modify the disk from one system. Multiple read-only copies are fine.

Please file issues if you find any problems.

Background info

Installation

  • Go
  • QEMU
brew install qemu

Setup Docker and Ubuntu under VMWare

sudo su - apt-get update apt-get install open-ssl openssh-server open-vm-tools apt-transport-https ca-certificates nbd-client nbd-serverß

Follow instructions: https://docs.docker.com/engine/installation/linux/ubuntulinux/

// to be able to connect to an NBD server, you have to make sure the module is loaded. On starting the OS, run: sudo modprobe nbd

Tools

  • Wireshark
  • QEMU
  • Virtualbox
  • Intellij/PyCharm with golang plugin (Delve debugger currently has a bug itself!, so breakpoint will only stop 1 time! and it won't stop anymore even after you restart the debugging session)

ablox's People

Contributors

gitter-badger avatar jsprinklex9 avatar prtksxna avatar rayleeriver avatar thejacobtaylor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ablox's Issues

Server crashed - no such file or directory

Client console:

Raymonds-MacBook-Air:share ray$ qemu-system-x86_64 -smp cpus=2,cores=2 -hda nbd://localhost:8000/UbuntuServer.vdi -m 2048
qemu-system-x86_64: -hda nbd://localhost:8000/UbuntuServer.vdi: Failed to read export length

Server console:

/private/var/folders/96/s9kywjm13sg242q45n5ylwt00000gn/T/rungo localhost 8000
GOROOT=/usr/local/go
GOPATH=/Users/ray/goProjects:/Users/ray/goProjects
/usr/local/go/bin/go build -o /private/var/folders/96/s9kywjm13sg242q45n5ylwt00000gn/T/rungo /Users/ray/git/jacob-nbd/server.go
Hello World, we have &{0xc820054070}
We have a new connection from: 127.0.0.1:52334
2 packets processed to get 20 bytes
Received from client (count  20) Data: '����IHAVEOPT��������' ([0 0 0 0 73 72 65 86 69 79 80 84 0 0 0 1 0 0 0 16])
Options are: 0
Reading instruction (count  36) Data: '����IHAVEOPT��������UbuntuServer.vdi' ([0 0 0 0 73 72 65 86 69 79 80 84 0 0 0 1 0 0 0 16 85 98 117 110 116 117 83 101 114 118 101 114 46 118 100 105])
Payload is: (count  16) Data: 'UbuntuServer.vdi' ([85 98 117 110 116 117 83 101 114 118 101 114 46 118 100 105])
command is: 1
have request to bind to: UbuntuServer.vdi
Opening file: /Users/ray/git/jacob-nbd/sample_disks/UbuntuServer.vdi
Error encountered: open /Users/ray/git/jacob-nbd/sample_disks/UbuntuServer.vdi: no such file or directory
panic: Nooooooooo


goroutine 5 [running]:
panic(0x130220, 0xc820010850)
    /usr/local/go/src/runtime/panic.go:481 +0x3e6
_/Users/ray/git/jacob-nbd/utils.ErrorCheck(0x645630, 0xc82000a7b0)
    /Users/ray/git/jacob-nbd/utils/utils.go:33 +0x18f
main.export_name(0xc820014380, 0x6454e0, 0xc820028038, 0x10, 0xc8200107b0, 0x10, 0x10, 0xc81fffce01)
    /Users/ray/git/jacob-nbd/server.go:62 +0x4a1
created by main.main
    /Users/ray/git/jacob-nbd/server.go:335 +0x12bf

Process finished with exit code 2

Simple load test instructions

Can you please find a simple load test, add them to the readme, and commit the fix?

Even a load test for testing would be good. Something really simple to help us make sure the performance does not suffer.

Demo set for James

@jsprinklex9 do you have a personal Mac, if so we can work on setting up the code base and demo on your system either sometime next week or weekend.

nbd-client listing not working from ubuntu

Ubuntu VM:
root@ubuntu:~# nbd-client -l 10.1.10.161 8000

OSX server.go:
/usr/local/go/bin/go run /Users/ray/goProjects/src/github.com/jacob-nbd/server/server.go 10.1.10.161 8000
Hello World, we have &{0xc82009e000}
We have a new connection from: 10.1.10.159:54886
Error encountered: EOF
Error encountered: EOF
Error encountered: EOF
Error encountered: EOF

Add a check for buffer size

Implement a check if the data requested is larger than the buffer when reading. Right now, it just fails.
server.go:91
buffer = make([]byte, 2048*1024) // set the buffer to 2mb

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.