To get started: * Java Tutorials Lesson Concurrency
You might make the odd bug. Then this might be handy * Debugging multithreaded applications with netbeans
Used material and stuff
Futher the following papers:
Lambda Expressions and Streams in Java by Angelika Langer and Klaus Kreft Excellent complementary material to the concurrency book. It completes the course with the new concepts brought in Java 8.
Hand in regime
You are supposed to work in groups of two to three(max) students. Learning works best when discussing with someone who is on par with you in the subject matter. Choose your own partner and share your work in the provided repository. You may also work alone.\
You must hand your report on paper. One hand per group suffices. Make sure the hand in meets all sensible criteria like: it has page numbers if it is multi page. It contains the name(s) of the authors on the first page near the top. LaTeX is the preferred format and is what real software engineers would do.
What should the report contain?
We know the theory, so do not repeat it (at least not in any length).
Try to focus on the (sub) problem at hand, describe the problem and illustrate your solution with diagrams and snippets of code.
LaTeX might be handy here, using
3 to 4 effective pages (excluding title page) will typically suffice.
What will happen during the assessments?
We typically have three assessment sessions in which we discuss the material you handed in. We will be sitting in the practicum room and call you in the order given further down on this page. The assessment takes between 5 and 10 minutes per student.
Using your report we will try to find out whether your claims on knowledge and understanding in your report is somehow also present 'in your head'. It is this discussion that will give you a grade, not what is on the paper.
You may bring whatever you like to bring. It will be our shared cheat paper, meaning anything you bring can be used in your advantage or against you.☺
Typically we will not be able to 'process' all students in one session, meaning that we assess anything whose due day has passed, even if that is more then one task. If the result of an assessment is unsatisfactory, you may request a resit. This resit must have taken place before the end of June 2017.
Restaurant Version 1
The initial restaurant sources can be find by following the link.
Hand in before end of week 2.
Restaurant Version 2
You start with the code from your first restaurant task. Before you start with this task, make a subversion TAG as described in the task description.
Hand in before end of week 3.
Restaurant Version 3
Hand in before end of week 5.
The project is a maven project and should pull in its dependencies automatically, when you try to build it with maven or netbeans. You will be able to run it, but it will not work as required, because the parts you need to implement are still missing.
You should find a solution to make this crossing safe for all kind of crossing configurations by using the new concurrency classes, especially the executor framework. Hint: as a first step try to make the crossing safe in case there is only one lane at each corner, the so called mono lane crossing. As always: produce a document on paper to have something for the assessment. In this case: add your name to the code, print it on paper and hand that paper in. The javadoc api documentation of the crossing can be found here too.
Hand in before end of week 6.
The course is executed in 7 lecture weeks in the 1st half of semester 4, starting in the week of Wednesday 8th 2017.
Note that the plan for the 4 main exercises does not exactly match the week plan. Pay attention to the due date for hand in, which is expressed relative to the weeks.
1. Thread safety.
3. Composing Objects and Building Blocks
4. Task Execution and Cancellation and Shutdown
5. Applying Thread Pools and Avoiding Liveliness Hazards
6. Performance and Scalability and Divide And Conquer, The Java Way
7. Lambda and the Streams API and Roundup
The Java8 enhancements, in particular the Streams API are optimized for concurrency. Let’s meet them.
Round up. Any last questions and discussions we may have.
For this week, view the video by Angelika Langer on the new
concurrency utilities in Java 8, in particular the section about
CompletableFuture from 3:20 till about 30:00.
This is also an interesting read. Blog on Java8 CompletableFuture,target=_blank