Creative Reality Pty Ltd

Creating a new reality

  • Increase font size
  • Default font size
  • Decrease font size

Creative Reality Pty Ltd provides the following services. Contact us for information on availability.

Consulting

December 2010: Field trials of animal management system v1.2

Creative Reality provides consulting services for a wide range of computer, embedded and Internet technologies.

Our background is in reliable efficient multi-threaded real-time embedded systems; from the software running in fighter aircraft computers to multi-media fiber-optic digital switches and telecommunications equipment. A lot of this work was done in C++/C.

More recently we have been working on Internet-based solutions; including participation on one of the international web standards committees. A lot of recent work has been done on the Java platform using Scala, JavaFX, Groovy and Java.

Creative Reality generally works on R&D projects and has been involved in more mathematical areas like image processing, weapon trajectory calculations, signal processing and combinatorial optimizations.

Currently we are developing a fast combinatorial optimization solution for useful scheduling and an animal management system suitable for Australian conditions.

See the technologies page for more details.


Tutoring

December 2010: Currently available.

Creative Reality provides tutoring services for high school maths, physics and computer related studies.

 

Language Teaching    中英文家教

December 2010: Mostly full, book soon if you are interested.

Creative Reality provides teaching services for Chinese/Mandarin and English (ESL).

更多信息,请点击




Recent Articles

 

Samsung Galaxy Note N7000

E-mail Print

This is a review of the Samsung Galaxy Note N7000 after owning it for over a week.

I'm assuming you've read a number of reviews and have seen some video of the Note. This review is incremental to the general reviews of the Note that already exist.

The following is a quick summary of my view after using the Note:

  • The device is not too large; it could be larger.

  • It's a phone, not a tablet.

  • The hardware is top-of-the-line.

  • The screen is amazing.

  • Every smartphone should have a stylus attached to it.

Now for some more detail...

Last Updated on Tuesday, 13 December 2011 12:08 Read more...
 

MVCC STM GC'd Ref History

E-mail Print

When writing an MVCC-based STM I found that managing the value history on the Ref object was an issue. I needed to keep just enough history in memory for all transactions to access the appropriate values. This initially seemed to be an annoying problem to solve as the garbage collector would potentially GC too much of the history list. But after some thought I designed a way to have the garbage collector GC the right amount of the history list.

Other than being an interesting problem solved, I didn't think much more of it until I saw that the Clojure STM implementation manually tries to manage it's Ref history list. If the list is too small the transaction is retried and the list for that Ref is lengthened. A guess is made as to how long lists should be, so it's likely that the lists are a bit longer than required. I didn't look in to the implementation to see exactly what they are doing or how much extra code is required to get it to work, but either way it sounds unnecessarily complicated and inefficient. The GC is the best system to manage these sorts of lists.

The GC-based solution is very simple, doesn't require much code or memory overhead and more importantly, it's just correct. What needs to be in memory is in memory, what isn't needed is removed.

Last Updated on Wednesday, 26 May 2010 00:38 Read more...
 

STM Overview

E-mail Print

This article is a description of a simple software transaction memory (STM) I wrote in Scala in order to better understand STMs. I'll start with a summary of performance and then go into some details. For a good introduction to writing an STM in Scala, look at the article in code commit. These are all MVCC-style STMs that guarantee transactions read from a consistent snapshot of data. Unlike other similar approaches, they don't allow write-skew - so your transactions give the same result running in parallel as they would if they ran serially; no surprises. The all provide nested transactions.

 

9.5 million transactions / second

very optimistic for low contention transactions

uses CAS instead of locking

snapshot history is limited to allow good garbage collection performance - meaning some transactions may retry due to not finding the required history

 

4.5 million transactions / second

pessimistic, transactions are isolated until commit time

uses locking instead of CAS - better for high concurrency implementations

also has limited snapshot history for good, fast GC performance

 

3.5 million transactions / second  (new alpha version)

has precise snapshot history management - you can start a transaction, sleep for a year, then continue on - the transaction will still be able to access a full snapshot history, using minimal memory to store the snapshot - based on a distributed snapshot tree for concurrent updating - read only transactions never retry

 

This is running on a 2.8GHz quad-core i7-860, Java 6u20. Basic test of 1024 accounts, each transaction moves a random amount of money from one random account to another. There is also one transaction that periodically sums all the accounts and ensures that no money is lost or gained. The test is aimed at finding the overhead of the STM, nothing more. STMs aren't good for many conflicts, so the conflicts are kept relatively low.

The snapshot history is guaranteed to be available for every transaction running in the system, they grow to the correct length, no longer and no shorter than required. This is different to, say Clojure, which keeps more history than needed for most transactions and fails transactions that need more history than available. Clojure adjusts history length after a failure. It's harder to design a system like Clojures; correct lengths are easier and have less overhead. But you can do insane things like start a transaction, wait for 1 second, then sum all accounts. With other threads running at 7M tx/sec, histories are thousands of values long.

Last Updated on Sunday, 04 July 2010 12:42 Read more...
 

GC History List

E-mail Print

The MVCC STM keeps a history of old Ref Values. This needs to be managed so the list doesn't get too long. You would think there is a way to have the Garbage Collector do the work of getting rid of old values that are no longer required. After some designing, then thinking, then more designing, I found a way that makes this work quite nicely.

The Garbage Collected History List

I couldn't find a reference to anything like this - I guess I don't know the right keywords to Google on. Anyway, a fundamentally simple concept that allows the tail of a list to be GC'd at the point where there are no references to the list below that point.

Perfect for a history where you only need to keep values that are still possibly likely to be used.

 

Last Updated on Sunday, 23 May 2010 01:40