runtimejs / runtime

[not maintained] Lightweight JavaScript library operating system for the cloud
http://runtimejs.org
Apache License 2.0
1.93k stars 128 forks source link

Disk #117

Closed RossComputerGuy closed 8 years ago

RossComputerGuy commented 8 years ago

I am working on my os. I want to be able to access the disk to read and write to it. Does anyone know how to?

iefserge commented 8 years ago

@SpaceboyRoss01 unfortunately there is no disk driver in the system at the moment, so no way to access the disk. Discussion here https://github.com/runtimejs/runtime/issues/74

RossComputerGuy commented 8 years ago

So, I have to write the drivers myself?

iefserge commented 8 years ago

It can be done, but it's a pretty big task (needs VIRTIO-BLK driver, VFS, filesystem driver). For now runtime.js is more like diskless network system.

RossComputerGuy commented 8 years ago

I am working on a module, you can see the code on my git repository. The os uses 2 VFSs, 1 is the main hard disk, the other is written in json.

iefserge commented 8 years ago

Ah nice, I think the missing key component is VIRTIO-BLK driver to access the actual disk. I haven't looked into it much, but feel free to hack on it if you'd like, I might be able to help too. Disk support would definitely be a great addition to the system.

RossComputerGuy commented 8 years ago

@iefserge would you like to help me work on BasicOS?

iefserge commented 8 years ago

BLK driver and VFS can live in runtime.js repository. You'll be able to access filesystem the same way as in node

require('fs').readFile(...)
piranna commented 8 years ago

But that would need the filesystems to be mounted somewhere, or that the 'fs' module do request to a VFS server that's the one that talks to the hard disks, isn't it?

If It's not yet designed, I would prefer the second microkernel-like alternative instead the first monolythic one. I know it would not be as performant, but definitely it will be easier to design and develop and more flexible. El 7/7/2016 20:19, "Serge" notifications@github.com escribió:

BLK driver and VFS can live in runtime.js repository. You'll be able to access filesystem the same way as in node

require('fs').readFile(...)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/runtimejs/runtime/issues/117#issuecomment-231163776, or mute the thread https://github.com/notifications/unsubscribe/AAgfvqwm4jX1hKlv-ilVp_1agNAqpWXjks5qTUNPgaJpZM4JHTt- .

RossComputerGuy commented 8 years ago

One VFS does, the other works on top of the other.

iefserge commented 8 years ago

Yeah, FS will talk to VFS. VFS will handle mounting and will have its own API. There is no design yet, microkernel-like is basically running in a web worker. That would be awesome, provided performance is ok.

piranna commented 8 years ago

Sorry, I forgoy runtime.js has a single memory space... Then it would be trivial to design it microkernel-like and being still performant since message passing would be a single call to WebWorker.postMessage(), and at the same time it would be easy to test and use independently, I like it :-)