JaroslavTulach: /* Milestone 4: Release */ - 2015-01-22 09:00:50

Milestone 4: Release

←Older revision Revision as of 09:00, 22 January 2015
Line 40: Line 40:
== Milestone 4: Release ==
== Milestone 4: Release ==
-
Wrap up the previous milestones into production quality code and release official [[Bck2Brwsr]] version with support for [[Bck2BrwsrThreading|threading]]. The challenges include finding a way to introduce the new format compatibly and not regress in performance when people don't use threads at all. Will require some new APIs for controlling the [[Bck2Brwsr]] compiler and doing packaging.
+
Wrap up the previous milestones into production quality code and release official [[Bck2Brwsr]] version with support for [[Bck2BrwsrThreading|threading]]. The challenges include finding a way to introduce the new format compatibly and not regress in performance when people don't use threads at all. Will require some new APIs for controlling the [[Bck2Brwsr]] compiler and doing [[Bck2BrwsrLibraries]] packaging.
== Milestone 5: Support for [[Java]] Concurrent. Part II. ==
== Milestone 5: Support for [[Java]] Concurrent. Part II. ==

JaroslavTulach: /* Milestone 4: Release */ - 2015-01-22 08:58:59

Milestone 4: Release

←Older revision Revision as of 08:58, 22 January 2015
Line 40: Line 40:
== Milestone 4: Release ==
== Milestone 4: Release ==
-
Wrap up the previous milestones into production quality code and release official [[Bck2Brwsr]] version with support for [[Bck2BrwsrThreading|threading]].
+
Wrap up the previous milestones into production quality code and release official [[Bck2Brwsr]] version with support for [[Bck2BrwsrThreading|threading]]. The challenges include finding a way to introduce the new format compatibly and not regress in performance when people don't use threads at all. Will require some new APIs for controlling the [[Bck2Brwsr]] compiler and doing packaging.
== Milestone 5: Support for [[Java]] Concurrent. Part II. ==
== Milestone 5: Support for [[Java]] Concurrent. Part II. ==

JaroslavTulach: /* Testing Application */ - 2015-01-22 08:53:56

Testing Application

←Older revision Revision as of 08:53, 22 January 2015
Line 11: Line 11:
=== Testing Application ===
=== Testing Application ===
-
Download the [http://xelfi.cz/download/ThreadingInDuke.zip sample application]]. Unzip, change directory next to the root pom.xml. Then:
+
Download the [http://xelfi.cz/download/ThreadingInDuke.zip sample application]. Unzip, change directory next to the root pom.xml. Then:
<source lang="bash">
<source lang="bash">

JaroslavTulach: /* Testing Application */ - 2015-01-22 08:37:27

Testing Application

←Older revision Revision as of 08:37, 22 January 2015
Line 16: Line 16:
# build the code
# build the code
$ mvn clean install
$ mvn clean install
-
# verify it runs in [[JavaFX]]
+
# verify it runs in real HotSpot VM (and with JavaFX)
$ mvn -f client/pom.xml exec:java
$ mvn -f client/pom.xml exec:java
# try it in a browser
# try it in a browser

JaroslavTulach: /* Milestone 1: start/wait/notify */ - 2015-01-22 08:36:48

Milestone 1: start/wait/notify

←Older revision Revision as of 08:36, 22 January 2015
Line 27: Line 27:
Execution in [[Bck2Brwsr]] [[VM]] throws {{JDK|java/lang|SecurityException}}.
Execution in [[Bck2Brwsr]] [[VM]] throws {{JDK|java/lang|SecurityException}}.
 +
 +
== Milestone 2: Support for [[Java]] Concurrent. Part I. ==
 +
 +
Modern [[Java]] applications are using concurrent utilities (like {{JDK|java/lang/util/concurrent/locks|ReentrantLock}} and these need to be supported as well. Supporting all of them may require a bit of time, but supporting a subset should be possible and is subject of this ''part one'' milestone.
 +
 +
The set of classes to be supported is to be defined by the supporter(s) of the effort.
 +
 +
== Milestone 3: Generate Portable Code ==
 +
 +
Milestone one demonstrated we can generate code that runs in modern browsers (by using [[JavaScript]] 6 syntax), time to convert the code into something that can run in older browsers (like IE 9) - e.g. into [[JavaScript]] 5 or older.
 +
 +
== Milestone 4: Release ==
 +
 +
Wrap up the previous milestones into production quality code and release official [[Bck2Brwsr]] version with support for [[Bck2BrwsrThreading|threading]].
 +
 +
== Milestone 5: Support for [[Java]] Concurrent. Part II. ==
 +
 +
Implement the rest of [[Java]] concurrent utilities.
 +
 +
== Milestone 6: Performance ==
 +
 +
Address performance issues discovered in previous milestones. One of such expected issues is increased size of download caused by including concurrent classes and libraries. That should be addressed by splitting the runtime into parts and downloading only the needed ones (identified by static analysis and/or runtime needs). The other issue is potential slowdown when using threads - address that by optimizing the pieces of code known to not require threading at all and designing a way for these optimized and thread ready parts to co-exists. Take into account optimizations done by browsers to speed up the code natively.
 +
 +
== Milestone 7: Bugfixing ==
 +
 +
React to found concurrency bugs, address them and release update of [[Bck2Brwsr]] [[VM]].

JaroslavTulach at 08:13, 22 January 2015 - 2015-01-22 08:13:10

←Older revision Revision as of 08:13, 22 January 2015
Line 1: Line 1:
-
The goal of [[Bck2Brwsr]] [[Java]] virtual machine was to create small, fast, but limited [[Java]] runtime. One of such limitations was no support for starting new {{JDK|java/lang|Thread}}s - when attempted the [[VM]] throws {{JDK|java/lang|SecurityException}}.
+
The goal of [[Bck2Brwsr]] [[Java]] virtual machine was to create small, fast, but limited [[Java]] runtime. One of such limitations was no support for starting new {{JDK|java/lang|Thread}}s - when attempted the [[VM]] thrown {{JDK|java/lang|SecurityException}}.
However many people expressed interest (like [https://java.net/bugzilla/show_bug.cgi?id=6539 issue 6539]) in having full threads with classical [[Java]] semantics supported. In general it is possible, just it requires more complicated and slower code to be generated. Anyway, if there is a support, it is worth to try it.
However many people expressed interest (like [https://java.net/bugzilla/show_bug.cgi?id=6539 issue 6539]) in having full threads with classical [[Java]] semantics supported. In general it is possible, just it requires more complicated and slower code to be generated. Anyway, if there is a support, it is worth to try it.

JaroslavTulach: New page: The goal of Bck2Brwsr Java virtual machine was to create small, fast, but limited Java runtime. One of such limitations was no support for starting new {{JDK|java/lang|Thread}}... - 2015-01-22 08:12:40

New page: The goal of Bck2Brwsr Java virtual machine was to create small, fast, but limited Java runtime. One of such limitations was no support for starting new {{JDK|java/lang|Thread}}...

New page

The goal of [[Bck2Brwsr]] [[Java]] virtual machine was to create small, fast, but limited [[Java]] runtime. One of such limitations was no support for starting new {{JDK|java/lang|Thread}}s - when attempted the [[VM]] throws {{JDK|java/lang|SecurityException}}.

However many people expressed interest (like [https://java.net/bugzilla/show_bug.cgi?id=6539 issue 6539]) in having full threads with classical [[Java]] semantics supported. In general it is possible, just it requires more complicated and slower code to be generated. Anyway, if there is a support, it is worth to try it.

The rest of this page outlines the expected steps to get threading [[Bck2Brwsr|back to browser]] and status of their implementation.

== Milestone 1: start/wait/notify ==

The goal is to get the basic [[Java]] threading primitives running. We need a sample application that will start multiple threads do some communication between them. We need to verify its behavior in real [[HotSpot]] [[VM]]. Then let's modify the [[Bck2Brwsr]] [[VM]] to execute the code in a browser and behave the same.

=== Testing Application ===

Download the [http://xelfi.cz/download/ThreadingInDuke.zip sample application]]. Unzip, change directory next to the root pom.xml. Then:

<source lang="bash">
# build the code
$ mvn clean install
# verify it runs in [[JavaFX]]
$ mvn -f client/pom.xml exec:java
# try it in a browser
$ mvn -f client-web/pom.xml package bck2brwsr:show
</source>

Once the behavior of the [[JavaFX]] version is the same as the one running in modern browsers ([[Firefox]] 34.0, [[Chrome]] 39), we know this milestone is successfully finished.

=== Status ===

Execution in [[Bck2Brwsr]] [[VM]] throws {{JDK|java/lang|SecurityException}}.