vendredi 28 mars 2008

Veille technologique semaine 13

Toutes les analyses montrent un réel besoin d'ajouter la notion de programmation concurrente (parallèle) dans les langages informatiques. Microsoft investi 20 millions de dollars avec Intel pour compléter la plate-forme DotNet. La loi de moore doit maintenant être prise en compte par le logiciel. SUN propose déjà une machine avec deux processeurs ayant chacun 8 cœurs exécutant chacun 8 threads : total 128 threads physiques. Il est considéré que ces 128 threads physiques seront pour le grand public dans 5 ans. Conclusion : préparer la conception de vos logiciels pour prendre en compte la loi de moore.

  • Microsoft investi avec Intel dans la programmation parallèle.
  • La gestion de la concurrence du JDK 7 n'est pas suffisante : en plus des API, il faut intégrer cette notion dans le langage Java.
  • avec l'unification des runtimes, il est possible de faire exécuter du code JRuby dans un serveur d'application EJB pour bénéficier des services techniques : remote, persistance, répartition de charge, tolerance aux pannes ....
  • Le JSR 303 proposé en draft final pour le JDK 7 pour la validation (vérification) des contraintes d'un modèle de données métier : @NotNull, @Length, @NotEmpty, @Range(min=4, max=40), ...

Bonne lecture.



Microsoft, Intel to invest $20M in parallel computing
Microsoft and Intel have recently announced a $20 million joint investment into parallel computing over the next 5 years. The money will go to two Universal Parallel Computing Research Centers located at University of California Berkeley and the University of Illinois. The Berkeley university will add $7 million for its center, while the University of Illinois will bring $8 million to fund the research in its own center.

The purpose of the research is to develop software that runs more efficiently on systems with multiple processors. The move was triggered by the current trend of the industry to develop processors with multiple cores. The idea is to distribute the work over multiple cores or processors so several tasks can be executed simultaneously. A white paper written by UC Berkeley researchers affirms:

Conventional wisdom is now to double the number of cores on a chip with each silicon generation. ... Our view is that this evolutionary approach to parallel hardware and software may work from 2 or 8 processor systems, but is likely to face diminishing returns as 16 and 32 processor systems are realized, just as returns fell with greater instruction-level parallelism. The target [of the research] should be 1000s of cores per chip.

But the computing power of a 100 cores processor won't be of much help if the software running on it does not scale well.


The concurrency support in Java7 is not enough
In the Java programming language it is easy to see the evolution of the language:

  • 1995: Support for threads built into the language (Thread, synchronized, volatile)
  • Java5: Included java.util.concurrent (which adds a lot of nice to have classes when doing Thread programming)
  • Java7: Talk about introducing frameworks supporting further multi-core usage

My main concern for Java7 is that it might not be enough to cover the new ballpark being brought forward by the many-core hardware. What do I base this fear on then?


Rails Powered by the GlassFish Application Server
This article introduces JRuby, JRuby on Rails, and the GlassFish application server. It presents a traditional
Ruby-on-Rails application deployment, describes an alternative using the GlassFish application server, and
explains the various options for deploying JRuby applications on GlassFish.

Many developers see the GlassFish application server as the superior solution for developing and deploying JRuby-on-Rails applications chiefly due to the following advantages:

  • You can develop in the same environment in which you deploy.
  • You can deploy multiple applications in a GlassFish instance that is already running.
  • GlassFish can handle multiple requests by maintaining JRuby runtimes and database connections in pools.
  • Clustering and high availability are integrated into GlassFish v2.
  • GlassFish leverages existing investment in the Java Platform, Enterprise Edition (Java EE) while hosting JRuby-on-Rails applications in the same environment.


JSR 303: Bean Validation
This document is the specification of the Java API for JavaBean validation in Java EE and Java SE. The technical objective of this work is to provide a class level constraint declaration and validation facility for the Java application developer, as well as a constraint metadata repository and query API.

Validating data is a common task that occurs throughout an application, from the presentation layer to the persistence layer. Often the same validation logic is implemented in each layer, proving time consuming and error-prone.

To avoid duplication of these validations in each layer, developers often bundle validation logic directly into the
domain model, cluttering domain classes with validation code that is, in fact, metadata about the class itself.

This JSR defines a metadata model and API for JavaBean validation. The default metadata source is annotations, with the ability to override and extend the meta-data through the use of XML validation descriptors.

The validation API developed by this JSR is not intended for use in any one tier or programming model. It is specifically not tied to either the web tier or the persistence tier, and is available for both server-side application programming, as well as rich client Swing application developers. This API is seen as a general extension to the Java- Beans object model, and as such is expected to be used as a core component in other specifications. Ease of use and flexibility are influencing the design of this specification.


vendredi 21 mars 2008

Veille technologique semaine 12

Pour cette semaine, je vous propose le cocktail suivant :
  • Le catalogue des sessions proposée par SUN au prochain JavaOne les 6 au 9 mai 2008 à San Francisco.
  • Les tech days de Microsoft de février dernier au palais des congrès à Paris
  • Intel propose 8 règles pour le design multi-threadé des applications qui souhaitent bénéficier de la puissance des processeurs multi-cores.
  • Un résumé des propositions du JDK 7 : Dolphin
  • Le Beans Binding du JDK 7 intégré à NetBeans
  • Les fenêtres translucides et non rectangulaires

Bonne lecture.



JavaOne 6-9 may 2008 San Francisco : Content Catalog


TechDays Microsoft : exercice de séduction vis-à-vis des développeurs
Pour sa première session pleinière, Microsoft France a surtout fait des démos technos de ses nouveautés liées à Visual Studio 2008 et SQL Server 2008.

Salle comble dans l'amphithéâtre du Palais des Congrès Porte Maillot à Paris pour la première session pleinière orientée développeurs des Microsoft TechDays (du 11 au 14 février).


8 Simple Rules for Designing Threaded Applications
The Threading Methodology used at Intel has four major steps: Analysis, Design & Implementation, Debugging, and Performance Tuning. These steps are used to create a multithreaded application from a serial base code. While the use of software tools for the first, third, and fourth steps is well documented, there hasn't been much written about how to do the Design & Implementation part of the process.

There are plenty of books published on parallel algorithms and computation. However, these tend to focus on message-passing, distributed-memory systems, or theoretical parallel models of computation that may or may not have much in common with realized multi-core platforms. If you're going to be engaged in threaded programming, it can be helpful to know how to program or design algorithms for these models. Of course, these models are fairly limited and many software developers will not have had the opportunity to be exposed to systems that need such specialized programming. Multithreaded programming is still more art than science.

This article gives 8 Simple Rules that you can add to your palette of threading design methods. By following these rules you will have more success in writing the best and most efficient threaded implementation of your applications.

Rule 1. Be sure you identify truly independent computations.
Rule 2. Implement concurrency at highest level possible.
Rule 3. Plan early for scalability to take advantage of increasing numbers of cores.
Rule 4. Make use of thread-safe libraries wherever possible.
Rule 5. Use the right threading model.
Rule 6. Never assume a particular order of execution.
Rule 7. Use thread-local storage whenever possible; associate locks to specific data, if needed.
Rule 8. Don't be afraid to change the algorithm for a better chance of concurrency.


Java SE 7.0 Proposals Dolphin's Overview

À l'heure où ces mots sont écrits, il n'existe pas de JSR officielle regroupant les futures fonctionnalités de Java SE 7.0. Il semblerait que Danny Coward y travaille. Il est Chief Architect chez Sun et représentant Sun du Executive Commitee pour le Java Community Process. La JSR officielle devrait voir le jour dans les prochains mois, peut-être avant la prochaine édition de Java One qui aura lieu en mai 2008 à San Francisco. Aucun des points abordés dans cette présentation n'est donc officiel, il ne s'agit que d'une tendance générale.

Puisque la communauté Java aime les animaux, étudions rapidement l'évolution des noms de codes des différents JDK. Le JDK 5 était représenté par un mammifère carnivore (Tiger) qui annonçait la force et le caractère des nouveautés de celui-ci. La puissance et la rapidité du JDK 6 étaient représentées par un cheval du Nord-Ouest américain (Mustang). Les nouveautés du JDK 7 sont elles représentées par un animal beaucoup plus calme : l'esprit de la mer (Dolphin). Comme les noms de codes s'assagissent à chaque version, et vu que celui du JDK 8 n'est pas encore connu, nous proposons de l'appeler 'Kitty', 'Butterfly' ou 'Bunny'.

Plaisanteries mises à part, la présentation ci-dessous est découpée en 4 parties principales, elle aborde les points suivants :

- Nouveautés du langage : les sucs syntaxiques et autres modifications du langage
- Modularité : Superpackage (JSR 294) et Java Module System (JSR 277)
- Nouvelles API : Nio 2 (JSR 203), Unit and Quantities (JSR 275), Date and Time (JSR 310), Concurrency, Utilities Updates (JSR 166y), XQuery (JSR 225), …

- Nouveautés JVM : Tiered Compilation, new Script engines, G1 garbage collector, …


Synchronizing Properties with Beans Binding (JSR 295)
Beans Binding is a Java platform library defined by Java Specification Request 295. JSR 295 is an open source project that tries to simplify how developers synchronize two properties, usually in two different objects. The JSR has a reference implementation available as the Beans Binding project on java.net. Additionally, NetBeans IDE 6 includes the latest release of the Beans Binding library, making it easy for NetBeans users to try out the new library.

  • Synchronization Without Beans Binding
  • Beans Binding Setup
  • Properties
  • Binding
  • Binding Conversions

Translucent and Shaped Swing Windows
Support for translucent and shaped windows has been a long-standing request for the AWT and Swing teams. Even though native applications have had access to this functionality on all major operating systems for quite a few years, it has not been accessible in core Java. This is changing in the upcoming "Consumer JRE," a major update to Java SE 6 which provides an API to create shaped, globally translucent, and per-pixel translucent top-level windows.


vendredi 14 mars 2008

Veille technologique semaine 11

Je vous propose pour cette semaine, les quelques articles suivants :
  • Comment la programmation par aspect et le développement centré sur le modèle peuvent être complémentaire ? Comment la séparation des préoccupations peut elle être faite correctement ?
  • Les types nullable de C#
  • Les garbages collectors générationel du JDK 6 et ceux du JDK 7 : garbage first
  • Java et le temps réel pour les applications d'entreprises
  • La suite des nouvelles fonctionnalités des EJB 3.1 : les times services, le packaging
  • Les super package du JDK 7 : gestion plus souple des visibilités des classes et des méthodes.
  • l'outil de visualisation de l'activité d'une JVM : VisualVM, plug-in de la jconsole du JDK 6.

Bonne lecture.


Cross-Cutting Concerns in Model-Driven Software Development
Abstract
Aspect Oriented Programming (AOP) as well as Model-Driven Software Development (MDSD) are both becoming more and more important in modern software engineering. Both approaches attack important problems of traditional software development. AOP addresses the modularization (and thus, reuse) of cross-cutting concerns (CCC). MDSD allows developers to express structures and algorithms in a more problem-domain oriented language, and automates many of the tedious aspects of software development.

How can cross-cutting concerns be handled effectively in an MDSD based development environment?


Working with Nullable Types in C#
Use nullable types to assign null values to value types(primitives) and avoid run-time exceptions in your applications.
Working with value types was sometimes awkward in .NET 1.x, because they could cause serious problems in applications that retrieved data from database tables containing columns that can have null values—those that may or may not hold data. C# 2.0 presents a new concept called "nullable types" that lets you initialize value types to null values. This article discusses how you can apply the new nullable types feature to solve issues that result from having null values in database columns.


GC générationnels traditionnels (jdk6) VS GC Garbage First (jdk7)
L'analyse empirique montre que dans une application la très grande majorité des objets créés sont détruits presque immédiatement. Les Garbage Collector qui utilisent des implémentations basées sur ce principe sont appelés GC générationnels. On peut fixer deux catégories d'objectifs lorsque l'on optimise le GC : réduire les pauses ou augmenter le débit. Ces objectifs sont en général orthogonaux (la réduction de la durée des pauses se fait au détriment du débit, et vice-versa), ils dépendent souvent du type d'applications : dans une application interactive, nous privilégierons les pauses, et au contraire, dans un batch, seul le débit compte.

La suite du billet est décomposée en deux parties :

  • La première décrit le fonctionnement des algorithmes générationnels traditionnels (Implémentation actuelle des JVM Sun)
  • La seconde détaille le nouvel algorithme que Sun essaye de pousser pour sa future JVM

Real-Time Java for the Enterprise
When people hear about real-time computing they often make the mistake of thinking that these have to be fast systems and are nearly always used for control of mechanical systems. It is true that in most cases the response times required are fast, but speed is not what defines a real-time system. The true core of a real-time environment is that the system will guarantee to perform some task within a pre-defined time so that the system's behaviour becomes fully deterministic.


New features in EJB 3.1 part 2
This series of articles is a preview of the changes the EJB 3.1 expert group is working on for the next version of the Java EE specification. The idea is to give you a head's up on the changes as well as gather your feedback early so the expert group has the best chance of getting it right. EJB 3.0 brought simplicity to Java EE 5 by moving away from a heavyweight programming model. EJB 3.1 aims to build on those successes by moving further down the path of simplicity as well as adding a handful of much-needed features. In each article in this series, I will let you know about the progress made by the expert group.


The Open Road: Superpackages
Since Java 1.0, packages have offered a convenient means of organizing code into different namespaces at the source code level. Classes in the same package can see non-public, non-protected, and non-private methods and fields in other classes in the same package that classes in other packages cannot see.

Unfortunately, there's no standard adjective for members that have no explicit access specifier. The most common, though by no means standard, name for these fields and methods seems to be "default" access. They're also sometimes referred to as "package protected" or "package private." The Java Language Specification uses "default (package)," and that is what I'll use in this article.


What's VisualVM?
VisualVM is a visual tool that integrates several existing JDK software tools and lightweight memory and CPU profiling capabilities. This tool is designed for both production and development time use and further enhances the capability of monitoring and performance analysis for the Java SE platform.

We would like to announce the availability of the VisualVM Beta.

Key news in Beta:

  • Applications defined by JMX connection
  • Application snapshots
  • Defined hosts and VM coredumps persistent between VisualVM sessions
  • Save As & Load for thread dumps and heap dumps
  • Autodiscovery of jstatd started after defining remote host
  • Improved support for JRockit VMs
  • New icons
  • Main menu & toolbar cleanup
  • New icons
  • Customizable Options
  • GlassFish plugin on VisualVM Beta Plugin Center

VisualVM is an open-source Java VM monitoring and performance reporting tool that provides visual feedback about running Java applications. The project released its first beta version on java.net. Visualizing characteristics of a running Java application was pioneered by BEA's JRockit virtual machine, which was followed by a large array of monitoring and performance reporting tools, such as jconsole, jstack, or jinfo.

Each of these tools was designed to provide feedback on a specific subset of application execution characteristics, requiring developers to employ multiple tools to get a complete picture of a Java application's execution. At the same time, none of those tools provide a detailed picture of how well an application actually performs.

VisualVM, a new open-source tool developed on java.net, aims to unify many of the capabilities present in earlier tools, and amend those with performance reporting as well. VisualVM can be used during development, and even on a production application, according to the project's documentation, as the tool can be attached to any running Java application:

VisualVM is a tool that provides detailed information about Java applications while they are running. It provides an intuitive graphical user interface that allows you to easily see information about multiple Java applications. Java applications are run by a Java Virtual Machine, or VM. The name VisualVM comes from the fact that VisualVM provides VM information visually.

There are many new features in this release: applications defined by JMX connection, application snapshots, defined hosts and VM coredumps persistence, Load & Save As for thread dumps and heap dumps, autodiscovery of jstatd started after defining remote host, improved support for JRockit VMs, new icons, main menu & toolbar cleanup, customizable Options, GlassFish plugin on Plugin Center.


vendredi 7 mars 2008

Veille technologique semaine 10

Le sujet principal d'aujourd'hui est la définition de l'architecture logicielle du 21 siècle définie de façon indépendante des solutions technologiques. On sait s'en rendre indépendant, faut-il encore le faire. Le prochain langage de programmation devra parler le vocabulaire de l'architecture logicielle : composant, services, évènements...
  • Un langage de programmation qui propose le vocabulaire d'architecture logiciel : le mot component devient un mot clé du langage. Il est prouvé que l'augmentation de productivité passe par l'augmentation du niveau d'abstraction. Arrêtons de faire des architectures logicielles centré sur la technologie, mais concentrons nous sur le métier. Il est aberrant, au 21 siècle, d'être obligé de faire la conception logicielle d'un système à partir des solutions techniques retenues pour la distribution de données, la communication remote, la persistance, etc... Le deuxième article, du même auteur, parle de technologie indépendance alias middleware agnostique.
  • Le draft public final du JSR 318 sur les EBJ 3.1 est sortie avec plus complément dont l'asynchronisme sur les services des EJB. L'asynchronisme est donc bien un aspect indépendant de la notion de service (ou d'évènement).
  • Faire des fenêtres transparentes et non rectangulaire avec le dernier update (10) du JDK 6.
  • Une implémentation d'un Operating System (OS) entièrement en C#
  • Une implémentation d'un Operating System (OS) entièrement en Java
  • Le JSR 296 sur le framework pour IHM Swing qui commence à se faire connaître, pour le JDK 7.
  • Duke est invité à Hollywood : Blu-ray Disk Java (BDJ), avec le standard pour le câble (OpenCable Platform : OCAP).

Bonne lecture.

Architecture as Language: A story
Architecture is typically either a very non-tangible, conceptual aspect of a software system that can primarily be found in Word documents, or it is entirely driven by technology ("we use an XML architecture"). Both are bad: the former makes it hard to work with, and the latter hides architectural concepts behind technology hype.

What can be done? As you develop the architecture, evolve a language that allows you to describe systems based on this architecture. Based on my experience in a number of real-world projects, this makes the architecture tangible and provides an unambiguous description of the architectural building blocks as well as the concrete system while still staying away from technology decisions (which then can be made consciously in a separate step).

Getting Started
We started with the notion of a component. At that point the notion of components is defined relatively loosely. It's simply the smallest architecturally relevant building block, a piece of encapsulated application functionality. We also assumed that components can be instantiated, making components the architectural equivalent to classes in OO programming.


Software Architecture
A pattern language for building sustainable software architectures
there is a difference between the functional architecture of a system, and the technical architecture.

Current state of the practice
Software architecture is too much technology driven.
Software architecture often leads to too early (and wrong) technology decisions.

Elaboration: In the first phase, the elaboration, you define a
TECHNOLOGY-INDEPENDENT ARCHITECTURE.

Technology-Independent Architecture
Context
You have to define a software architecture for a non-trivial system or product line.

Problem
How do you define a software architecture that is well-defined, longlived and feasible for use in practice. The architecture has to be reasonable simply and explainable on a beer mat.

Forces

  • You want to make sure that the architectural concepts can be communicated to stakeholders and developers
  • Implementation of functional requirements should be as efficient as possible.
  • The architecture must "survive" a long time, longer than the typical hype or technology cycles
  • The architecture might have to evolve with respect to QoS levels such as performance, resource consumption or scalability.

Rationale, Discussion and Consequences
If you use less complicated technology, you can focus more on the structure, responsibilities and collaborations among the parts of your systems. Implementation of functionality becomes more efficient. And you don't have to educate all developers with all the details of the various technologies that you'll eventually use..

There are a couple of simple guidelines that help you come up with a programming model that stands a good chance that it can be mapped to various execution platforms:

  • Always develop against interfaces, not implementations
  • Never create objects yourself, always use factories
  • Use factories to access resources (such as database connections)
  • Separate concerns: make sure a particular artifact does one thing, not five.

A good way to learn more about good PROGRAMMING MODELS and TECHNOLOGY-INDEPENDENT ARCHITECTURE can be found in Eric Evans wonderful book on Domain-Driven Design.

One of the reasons why a technology decision is made early in the project is the "political pressure" to use a certain technology.


Cosmos:
Cosmos (C# Open Source Managed Operating System) is an operating system project implemented completely in CIL compliant languages. The team is committed to using C#, however any .NET language is usable.


JNode :
JNode is a free, open source Java technology based OS (Operating System) written fully in Java language (with a very small assembler nano-kernel). This release features over 99 percent java 6 api compatibility, hotswapping, nfs, hfs+, even more openJDK integration, jetty6 and of course bug fixes and improvements.


Sun has posted the early draft review of JSR-318 Enterprise JavaBeans 3.1.
New features in 2.0 include:

  • A simplified Local view that provides Session Bean access without a separate Local Business interface.
  • Packaging and deployment of EJB components directly in a .war without an ejb-jar.
  • A Singleton session bean component that provides easy access to shared state, as well as application startup / shutdown callbacks.
  • Automatically created EJB Timers.
  • Calendar based EJB Timer expressions.
  • Asynchronous, reliable, session bean invocations.
  • The definition of a lightweight subset of Enterprise JavaBeans functionality that can be provided within Java EE Profiles such as the Java EE Web Profile.

Comments are due by March 30.


Translucent and shaped windows in core Java
I first spotted it about a month ago, and today's build 12 of JDK 6.0u10 delivers on the promise - translucent and
shaped windows with core Java classes only!


Présentation de la JSR-296, Swing Application Framework

  • Quel est avant tout la justification d'un framework pour swing ?
  • Swing a-t-il évolué depuis 5 ans ?
  • Y-a-t-il une comparaison avec Eclipse RCP, Spring RCP ou Netbeans Plaform ?
  • Caractéristiques du framework
  • Gestion du cycle de vie
  • Les Ressources
  • Gestion des Actions
  • Enregistrement de l'état


Duke goes to Hollywood
Blu-ray Disc supports Blu-ray Disk Java (BDJ), an advanced content platform based on Java ME technology and largely compatible with the OpenCable Platform (OCAP) standard.

Time Warner Cable won a seat on the JCP's Java EE/SE Executive Committee in last year's elections, and we're looking forward to their contributions in the coming years. Cox Communications, another major player in the TV industry recently led JSR 242: Digital Set Top Box Profile.

Java is everywhere...