| croczilla.com | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
Oni: an Embedded Structured Concurrency LanguageOni is a framework for managing the control flow of concurrent applications. There are two central ideas to Oni:
Oni can be implemented as a set of functions ("Oni operators") in a suitable host language, such as JavaScript or C++ (any reasonable language will do). Our current implementation, dubbed Oni/JS, is in JavaScript, targeted at in-browser use (should work in any modern browser - FF, Chrome, Safari, IE, ...). Many of the ideas of Oni/JS have been subsumed into the Stratified JavaScript language. Oni requires no preprocessing or precompilation; an Oni program is a just an expression in the host language. Oni leverages the type system, control structures and asynchronous facilities (message loop, etc) of the host language. Constructs (functions, etc) from the host language can be "lifted" into an Oni program. Conversely, Oni features can be introduced retroactively into a conventional program without requiring the whole program to be converted to a different style in any way. Documentation & ExamplesMain documentation
Mailing list
Presentations
Download itCore Oni/JSThe browser-based version of the core Oni language consists of a single Javascript file which can be downloaded here:
Oni is included into a webpage like this: <script type="text/javascript" src="oni.js"></script> Oni should work with any modern browser. We've tested FF3, IE7, IE8, Chrome, Safari 3.2. Oni/JS Ajax libraryoni-ajax.js, the Oni/JS extension library for client-side Ajax programming can be downloaded here:
Future plansOni is usable in its current form, but is not under active development any more. RelatedOni was mainly inspired by Orc (http://orc.csres.utexas.edu/), a "novel language for distributed and concurrent programming". In contrast to Orc, Oni doesn't implement a new syntax (it reuses the host language's syntax) and it has a more traditional control flow. Orc's control flow is somewhat "exotic" in that an expression can return several results. I believe that similar constructs could be implemented in Oni by adding first-class continuation support. There are a number of JavaScript frameworks that try to address the same issues as Oni, namely converting asynchronous code into synchrous-style code, although I am not aware of any framework that define control structures over concurrently executing code as systematically and comprehensively as Oni does. Some frameworks, such as Narrative JS (http://neilmix.com/narrativejs/doc/index.html) or jwacs (http://chumsley.org/jwacs/) implement syntax enhancements to JavaScript and thus require a compilation or parsing step. At least one framework, Arrowlets (http://www.cs.umd.edu/projects/PL/arrowlets/index.xhtml), is fundamentally very similar to Oni; it provides a set of lifters and combinators used to build "programs" that can execute concurrently and asynchronously. Its JavaScript expressions are combined through method chaining, rather than function application like in Oni. |
| (c)2005-2009 alex fritze | |