Friday 27 March 2015

Jolie 1.2 released

Jolie 1.2 has been released. This release brings many important feature, stability, and performance enhancements.

Performance

Jolie 1.2 comes with many performance improvements. Early tests (some of which performed on the Jolie website itself) show an increase in throughput of up to 100% in scenarios with heavy loads, thanks to the following changes:
  • Jolie processes are now executed over a virtualisation layer that runs them using a cache of parallel workers.
  • Many synchronisation locks on data structures have been made more granular, reducing lock retention among processes.
  • Improvements to the networking stack, including multiple concurrent selectors (as in, e.g., Project Grizzly), better usage of I/O streams, and buffer caching.

Language Features

Inline trees

Jolie now supports inline trees as a new form of expression. For example, the following series of assignments

x.a = 1;
x.b = 2;
x.c[0] = 3;
x.c[1] = 4

can now be simply written as:

x << { .a = 1, .b = 2, .c[0] = 3, .c[1] = 4 }

Since they are expressions, inline trees can be used as parameters for operation invocations, for example:

query@Database(
    "select * from users where id = :id" { .id = 5 }
)( result )


Provide-until choices (experimental)

Provide-until choices have been introduced as a useful way of providing a series of operations until another certain operation is invoked. For example, the following code make the operations read and write available until either the operation logout or timeout is invoked.

provide
    [ read(request)(response) { response = /* ... */ } ]
    [ write(request) ] { /* ... */ }
until
    [ logout() ]
    [ timeout() ]

Provide-until blocks are still experimental and will likely be improved in the future.

Branch code for input choices now optional

The code of a branch in an input choice can now be omitted, implicitly meaning that it is empty (nullProcess). For example, the following code

[ logout() ] { nullProcess }
[ timeout() ] { nullProcess }

can now be written as:

[ logout() ]
[ timeout() ]

Framework Improvements


  • Full character set enforcement in all parts of Jolie (important for multiplatform environments).
  • Predefined charset UTF-8 for XML-RPC, SOAP, JSON-RPC protocols.
  • Customisable charset for HTTP and SODEP protcols (default remains UTF-8) and the I/O  services (FileService, IniUtils).
  • --charset parameter to parse Jolie programs in encodings different from the system default.
  • Introduction of the new Converter service (base64 conversion, charset conversion).
  • Major HTTP protocol improvements (HEAD request, better chunked-mode parsing, correct URI/URL handling).
  • Fixed use of file paths containing blanks.
  • JSON parser fixes (nested arrays).
  • Some DatabaseService improvements (new close() call, error handling).
  • Fixes to the UNIX domain sockets support ("localsockets" medium).
  • XML-RPC protocol improvements (e.g., base64 support).
  • Fixed execution of sequential processes.
  • The SemanticVerifier component now reports errors correctly.
  • Introduction of a new experimental Reflection service for language reflection.

No comments:

Post a Comment