os.js: JavaScript Cloud/Web Desktop Platform
os.js.org
os.js.org
really motivates to build slimmer web apps
Unless you allow performance to genuinely suck (and I don't) slimming down web apps won't help my business make money. You get what current fashionable JS frameworks and build tools give me.
In fact, if it didn't do this, I'd be disappointed :)
Maybe the carriers' are sloppy and inefficient. See, whatever I do, when I access anything web-based on my mobile phone, it is slow. And I live in Paris.
It's funny how suposedly the 3G/4G stuff should be fast but in reality it is not, I believe that is mostly because in large areas the access points are overcrowded.
In other words, the technology used to access internet is saturated, and developpers should be blamed for having websites >200kb heavy!
Who's crazy now?
https://www.google.com/search?tbm=isch&q=qnap+control+panel
https://www.google.com/search?tbm=isch&q=synology+control+pa...
Here is a QNAP demo, if you search around you may also find a Synology one that works. http://www.qnapworks.com/live-demos.asp
Whatever the reasons, when a customer says "build me one of those" it's useful to have a good library to call upon.
It provides some sort of API ("simple, modilarized and flexible JavaScript APIs so you can easily make changes, extend functionality and create applications") but is it just a new look for single page applications?
I am not trying to be cynical or anything, just curious :)
I have done a lot of odd projects, (A JavaScript desktop amnong them) and have hit this same "Why" "What's it good for" etc.
I find it difficult so to fathom how people can look at things and see nothing of value. Sure I can think how something could be done differently, possibly better even. There's always some value, practical, aesthetical, inspirational, insightful or even inciteful.
1/ Make a modular backoffice for CMS based website. Make an app to manage users, an app to manage content, an app to upload and manage gallery of media etc.
2/ Make a distributed OS. All services can scale and use backend power beyond what a single node can provide. If you need to burst in the cloud due to a heavy process for instance.
3/ Could use it to provide a separation between the OS and the GUI, providing a UX I may like even if the backend server has to be Windows or Centos or ... Or remotely operating a part of my machine at home?
4/ What about reducing the cost of HW it needs to run? Chromebook style.
5/ What about being less tied in my Web App to Google Drive API + friends by adding a abstract VFS layer in between like a OS does? Same for texting, emailing? Sure it only uses part of this and don't need the client, but the architecture is well splited on this project between the two.
6/ It is multi-user as its core, so it can be shared across an organization and not only on one computer. You could even create one account per project/team and share a set of common tools / organization / folders that way across online services.
With the rise of web apps, it seems interesting to investigate the possibility of a web OS to administrate and make those ones collaborate more nicely. Or at least the possibility of separating the UX and the execution on two different nodes for general purpose systems as well.
How so? At least for me the window moving is slightly laggy and is probably going to worse on low-end systems.
I'm sure they could use some sort of thread/process implementation with a scheduler to do stuff. Speculation, each program could be compiled to some sort of bytecode, use asm.js to implement the guts of the thing, etc.
When you think about it, a single-core machine is "single threaded" as well, you just need some interleaving code to let more than 1 thing run at a time, and from some casual usage of the demo, seems they've done exactly that, so there you go
while true() {
do an instruction;
check for interrupt;
}
It's not an efficient way to go.That line
do an instruction;
Is the smallest unit of code execution. In JavaScript* that is an event. Let's call it a wibblywoop.JavaScript is effectively designed around the premise that a wibblywoop takes a negligible amount of time. This premise is false. Oftentimes it does take a negligible amount of time, when it doesn't the impact of responsiveness is severe. This is why everything becomes a callback. The language itself has indicators that this should not be the case. the existence of things like Array.Map shows that there was certainly an intention at some point for a function to be able to do a significant workload and return a result.
* in implementations anyway. The language itself doesn't seem intrinsically bound to the event model.
Even the concurrency provided by web workers, suffer from the same issues, you communicate with them via messages and they will not respond to messages if they are looping away somewhere else.
I'd love to have some simple pre-emption in JavaScript. Suspend code execution at one point and pick it up at another. Instead of having threads, have the fundamentals that allow threads. Has this been discussed and rejected by the JavaScript community?
I'd really like to know what the deal is here
As I understand it, the GIL is an implementation detail of certain interpreters that prevents threads from running on multiple OS threads (and thus multiple CPUs).
JavaScript has explicitly chosen not to support preemptive multithreading at all (aside from Web Workers which don't share memory), while Ruby and Python do have it, even if it can't fully utilize multicore processors.
A theoretical version of setTimeout that triggered immediately suspending the active code and executing the timeout function then resuming (or potentially not).
That only requires the interpretor to execute one piece of code at a time. The notions of thread safety would apply to the interpreted code, but not to the interpretor itself.
Shared data structures would enable this, and while you may not think they are very nice, I would prefer a not very nice solution to no solution whatsoever. I have seen discussions on various mailing that indicate that shared data structures will be implemented in some manner.
Look at the example number crunching worker given in the spec. https://html.spec.whatwg.org/multipage/workers.html#a-backgr...
var n = 1;
search: while (true) {
n += 1;
for (var i = 2; i <= Math.sqrt(n); i += 1)
if (n % i == 0)
continue search;
// found a prime!
postMessage(n);
}
How would you implement this worker in such a way that the host page could call worker.postMessage( {"command": "startfrom", "value" : 131071} );
to get the prime calculator change it's search point?I agree pre-emption would allow this without shared data structures. It just seems that the solution we will be given in the end will be a shared model.
http://lars-t-hansen.github.io/ecmascript_sharedmem/shmem.ht...
JavaScript can implement some of these alternatives with it's postMessage/onmessage combination, but it requires cooperation on both the sender and receiver which (in my opinion) is a limitation: The supervisor/operating system can expose just a little bit more information and it means the system isn't equally unresponsive anymore. Two that I'm thinking about are:
• Mailboxes. A process can post a message to a remote buffer and also check the fullness of that buffer so it can make other arrangements (e.g. scheduling another worker, letting the user know that the system is busy, etc). JavaScript can simulate this if both sides cooperate by implementing an ack-on-receive. UNIX allows detection of a full-buffer (EWOULDBLOCK). KDB publishes[1] the number of bytes in the output buffers which would also be preferable to what JavaScript does.
• Bulletin Boards. A process can simply publish information in a local buffer. Workers can then connect to pick up tasks. Again, JavaScript can simulate this if both sides cooperate, and implement a get/put system with postMessage/onmessage, and while this does represent a shared data structure, it's read-sharing which doesn't require any mutual-exclusion. You can also build it into a network protocol: My cexec[2] does this because load+network latency gives me free scheduling. Many mail servers also use this trick- one process writes to the queue directory, and workers pick up new work whenever they have time.
If you're interested in inter-process communication, Tanenbaum gave good writeup[3] on these methods (which I think are specifically relevant), and some other methods (which are useful in other circumstances).
[1]: http://code.kx.com/wiki/Reference/dotzdotW
[2]: https://github.com/geocar/cexec
[3]: http://www.amazon.co.uk/Modern-Operating-Systems-Andrew-Tane...
Alternatively, to get true isolation and preemptive multitasking you could have a sort of "window server" that sends UI events to Web Workers and received drawing commands of some kind (a React virtual DOM?)
I don't think same-origin iframed apps would be out-of-process in Chrome yet, but I do think Chrome is supposed to get out-of-process frames eventually. That would prevent an apps from exploiting a browser bug to take down the whole tab.
> desktop replacement
If it replaces the desktop, there is no other window to switch to.
The problem would be with apps that block, since all multitasking (excluding web workers, but they can't do UI) must be cooperative.
Thanks for checking it out guys. It-s something I enjoy working on in my spare-time
And the Node backend is pretty much identical to the PHP one now... and PHP will probably be deprecated in the near future (at least from the main repository)
It also reminds to what eyeOS (http://eyeos.com) were doing a few years ago.
Incidentally, I've been wanting to recreate Windows 95's interface for ages now. I should get back to that.
I'm going to assume 2.
Also, I see the Internet has unleashed its usual brand of stupidity on the demo. There are files in the shared directory with names like "Got any good porn.txt" and "dicksmoker.odoc".
But WOW am i impressed that, is one of the cooler things i have seen on the web.
The motivator for these projects is typically something along the lines of, "it would be great if there was just one OS or interface I could use on any device." As engineers it's very easy for us to see the usage pattern of apps, the speed, power and ubiquity of web tooling + JavaScript and say, "aha! The next logical evolution is all of your client logic on the web!"
Alas, if it were only that easy.
"Unfortunately, this ability to see patterns can prove catastrophic as you attempt to build your own company. The more you generalize the solution to a particular pain, the further removed it becomes from that specific pain. While it might end up being able to solve a lot of pains, it won’t be very good at solving any particular one." [1]
A shared, web-based environment is probably where everything is going. I mean we're more than halfway there with most operating systems, cloud backups, tons of SPAs, etc. The problem is there's no consumer-driven need for a fast transition to a JavaScript "OS" environment. Everything is just good enough, and offloading all device logic to the web, for the end user, is barely noticeable (if not a minor detriment as older devices still have rendering issues). It's likely that everything will converge on this sort of environment (but without the desktop metaphor) because engineers want to head towards elegant solutions, but it will take time. (You won't convince people to start switching with software alone if it means they have to figure out how to open Chrome / Safari / Whatever on their phones, first.)
FirefoxOS [2] is probably getting pretty close. The sooner we get to an OS just being a glorified web browser, the more we drive development spending way down and cut costs for the consumer. Then the software will already exist, packaged with the phone. But you need the phone first --- not the software. That's the product. That drives consumer demand. "JavaScript OS" becomes a reality as soon as web-rendering matches native performance on ubiquitous, low-end devices. The software will exist to sell the product, not vice-versa. (We'll also have a Cambrian explosion of offline-first front-end tooling. ;))
... Yeah, I've done a lot of thinking about this. ;) Was my first big pet project.
[1] http://degoes.net/articles/engineer-entrepreneur/
[2] https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS
A lot of people do have this dream, but in practice it's horrible. The UI on my watch has to be very different than the UI on my flatscreen TV.
This notion that things will move to a web based environment because "engineers want to head towards elegant solutions" has two problems.
The first is that "what engineers want" doesn't matter in the least. We saw this with Windows 8: a single OS that tries to scale from tablets through workstations. That's an engineer's design and an engineer's dream, but users hated it, and Microsoft has since backed off.
The second problem is this notion that the web is "elegant." It has some nice properties, but it's layered hacks upon hacks. Demos like this are impressive because they work despite the web's limitations.
> The sooner we get to an OS just being a glorified web browser, the more we drive development spending way down and cut costs for the consumer.
This is frankly delusional. If web apps cost less, it's because they do less, or do it less well.
Re: dev spending. We drive development spending down because it costs far less to write software once and deploy everywhere than it does to write it for two, three or more platforms. The "elegant" goal is one compilation and/or deployment target, whether you like it or not doesn't matter, and it seems like JavaScript (or some related cousin) is going to fill that niche. Pretty silly to think that's delusional when it's already happening.
unfortunately, this kind of understanding can only be obtained through failures.
Still impressive, especially with the smaller footprint, but not exactly revolutionary or novel.
There was a time where every company wanted their own portlet framework and implement windowing in their apps (for better or, most of the time, way worse). Bunch of frameworks allowed to do that more or less easily too: ExtJS, GWT, Rialto...
That's probably because all of the mobile browsers are terribly inefficient when compared to desktop browsers. It makes creating a mobile experience that's fluid and fast.
Also, jQuery Desktop is pretty cool too although its just a UI and doesn't do anything
https://www.youtube.com/watch?v=Hd73b-Twf4I
Mentioned....
https://www.reddit.com/r/javascript/comments/3yo754/osjs_a_j...
https://www.reddit.com/r/javascript/comments/3yo754/osjs_a_j...