vendredi 18 septembre 2009

Veille technologique semaine 38

Pour le bulletin de la semaine 38, je vous propose les articles suivants :
  • Sortie des spécifications 4.2 de la plateforme OSGi : avec les services remote, ....
  • Première implémentation de la norme WebGL dans WebKit : le 3D natif en HTML 5. La vidéo est à voir : http://www.youtube.com/watch?v=2rpKpj6ZO9w&hd=1
  • Un résumé des transactions mémoire : c'est un concept qui commence à ce démocratiser, les articles et les implémentations commence à être en "prime time". C'est donc une deuxième lecture que je vous propose. A intégrer rapidement dans vos socle technique. Un zoom sur le pattern MVCC : Multi Version Concurrent Control qui permet de faire des transactions sans vérrou pour les lecteurs, mais uniquement pour les écrivanis. Le COTS JBossPojoCache en version 3 utilise ce pattern très performant (plus de 10 000 transactions par seconde par instance cache ! Cela nous laisse de la marge).
  • Un bulletin spécial sur le langage de programmation Scala : c'est un langage dont le compilateur génère du byte code JVM ou DotNet, proposé comme remplacement du langage Java ? Scala le futur de Java ?
  • Le JDK 7 et les NIO : nouvel accès au système de fichier.
  • Le JDK 7 et une proposition de fournir une implémentation par défaut des méthodes de la classe Object. Il serait grand temps !

OSGi 4.2 released
The OSGi Alliance has just released the OSGi 4.2 specification. Although early drafts of it have been made available, this is the final release version. Some engines, like Equinox and Felix, have already begun working towards providing 4.2 compatibility with their earlier 3.5 and 2.0 releases (respectively). However, as OSGi 4.2 had not been released at the time, they couldn't claim to be OSGi 4.2 compliant. Now that the release has been done, it's a matter of time before the teams on each determine what still needs to be done (if anything) in order to meet the specs.


WebGL fait son apparition dans Webkit
Les dernières build de Webkit embarquent une pré-version de WebGL. Ce standard chapeauté par le consortium Khronos Group, a pour vocation d'afficher de la 3D dans une page web sans plug-in. Pilotable intégralement par JavaScript, et intégrant des liens vers OpenGL ES 2.0, il permet l'affichage de modèles 3D en tirant parti de l'accélération matérielle des machines.

Wolfire
, a publié une petite vidéo montrant ce qu'il est possible de faire avec cette technologie. Si cette dernière s'impose, elle pourrait notamment révolutionner les jeux en ligne.


What is WebGL?

WebGL is basically an initiative to bring 3D graphics into web browsers natively, without having to download any plugins. This is achieved by adding a few things to HTML5, namely, defining a JavaScript binding to OpenGL ES 2.0 and letting you draw things into a 3D context of the canvas element.

What does that mean exactly? Here's a video of the initial WebGL layout tests included in WebKit r48331. Be sure to watch them in HD!

http://www.youtube.com/watch?v=2rpKpj6ZO9w&hd=1

These demos are very simple, but they're a great start. I'm sure we'll see some complicated OpenGL scenes pop up soon, and I'm curious to see how complex they can get before FPS becomes a factor. Maybe I'll make a WebGL mini-game in some spare time!

Why is this cool?

This has a million applications - I'm obviously biased towards gaming though. Basically, imagine playing Lugaru or Black Shades instantly in your browser, on any platform, without having to install anything. In the same way Gmail is killing desktop mail applications, full-fledged 3d video games could start migrating to the web.

Flash gaming would have a serious run for its money as more advanced, standards-based, hardware-accelerated games started popping up. This would have huge implications for the entire PC gaming market, which I might explore in a separate blog post.

Of course, this utopia of browser-based OpenGL gaming will require the cooperation of all major browser vendors. When will we start to see WebGL outside of isolated, developer previews?

When can we actually use it?

This is a brand new web technology, we won't be seeing this for another 10 years right? Well, this actually has the potential to show up in browsers in the not-so-distant future. As you've seen above, this is already significantly developed in WebKit. It will take a little while before it's enabled by default in thenightly WebKit builds and longer still for Safari to adopt it, but that could theoretically be as soon as six months from now.

The same goes for Google, FireFox, and Opera, who are part of the WebGL working group. Google Chrome, of course, is based on WebKit and has pledged to support this (in addition to its own O3D, which hopefully will be standard soon as well). FireFox has an extension which enables an implementation of Canvas 3D, and Opera has supported its own (albeit different style) canvas 3D for a while.

What about Internet Explorer, which hardly supports existing standards, let alone up and coming ones? Given Microsoft's history, I wouldn't hold my breath, but there will undoubtedly be some kind of extension that simulates WebGL, like there is for the canvas element. Until then, it will be yet another awesome WebKit feature for people who are developing specifically on the WebKit platform to brag about.

It will be pretty cool when Awesomium updates to the latest WebKit and we can render 3D scenes inside of our own 3D scene!


Khronos Details WebGL Initiative to Bring Hardware-Accelerated 3D Graphics to the Internet


WebKit adding support for GPU-accelerated 3D via WebGL
WebKit developers are adding support for WebGL, a new API designed to deliver hardware accelerated 3D graphics within the web browser without the use of a separate plugin.

According to a report posted by a developer on the Wolfire Blog
, WebGL provides HTML5's Canvas with hardware accelerated 3D rendering features by adding a JavaScript binding for OpenGL ES 2.0, enabling web developers to present 3D scenes and models that tap the full native processing power of the client's graphics hardware.

The open, royalty-free WebGL specification is administered by the Khronos Group, the same organization that manages OpenGL and the new OpenCL API for cross-platform and GPU vender-neutral general purpose computing on GPU hardware.

Being able to render rich 3D content on the web without a proprietary, opaque binary runtime plugin such as Adobe Flash or Microsoft's Silverlight means that any standards-based device can be targeted by web games developers, from a desktop web browser to a mobile device like the iPhone. The technology can also be used to animate complex navigation and data visualizations.

Earlier this summer, WebKit added support for CSS 3D transforms
, which allow web developers to position page elements in a 3D space. Apple rapidly added support for that feature in iPhone 2.0 and Safari 4.0.

Support for WebGL's hardware accelerated 3D rendering is likely to be similarly exposed within desktop and mobile versions of Safari over the next few months, opening up new potential for increasingly sophisticated web apps and rich media
content. A public release of WebGL is scheduled for the first half of 2010.

Google, Mozilla, Opera and various GPU hardware vendors have joined in on the industry consensus to deliver advanced 3D web graphics using open standards, building support behind the Khronos portfolio of technology specifications.


Software Transactional Memory : STM


Overview

Writing software applications in which parts of the application run in concurrent threads introduces many challenges not present in single-threaded applications. Since the order of operations isn't fixed, failures can be difficult to repeat. Also, thoroughly testing the software requires more effort.

The goals of this article are to:

  • spread knowledge about STM
  • support reasoning about the performance characteristics of STM
  • encourage implementations of STM for many programming languages
  • provide developers with enough understanding of the Clojure STM implementation that they can develop tools to help with tuning STM usage (such as tracking the number of times a transaction retries and why it retries)
Conclusion

STM implementations are somewhat complicated. However, developing applications that use STM is less complicated and easier to get correct than using a lock-based approach. It seems likely that over time using STM will become as common and trusted as using garbage collection is today.


Multi-Version Concurrency Control (MVCC)

"MVCC uses timestamps or increasing transaction IDs to achieve serializability. MVCC ensures a transaction never has to wait for a [database] object by maintaining several versions of an object. Each version would have a write timestamp and it would let a transaction read the most recent version of an object which precedes the transaction timestamp."

"If a transaction (Ti) wants to write to an object, and if there is another transaction (Tk) (that also wants to write it), the timestamp of Ti must precede the timestamp of Tk for the object write operation to succeed. Which is to say a write cannot complete if there are outstanding transactions with an earlier timestamp."

"Every object would also have a read timestamp, and if a transaction Ti wanted to write to object P, and the timestamp of that transaction is earlier than the object's read timestamp, the transaction Ti is aborted and restarted. Otherwise, Ti creates a new version of P and sets the read/write timestamps of P to the timestamp of the transaction." (The Clojure STM implementation does not use read timestamps.)

"The obvious drawback to this system is the cost of storing multiple versions of objects [in the database]. On the other hand reads are never blocked, which can be important for workloads mostly involving reading values [from the database]. MVCC is particularly adept at implementing true snapshot isolation, something which other methods of concurrency control frequently do either incompletely or with high performance costs."

"A transaction executing under snapshot isolation appears to operate on a personal snapshot [of the database], taken at the start of the transaction. When the transaction concludes, it will successfully commit only if the values updated by the transaction have not been changed externally since the snapshot was taken."


Scala et avenir de Java
Depuis son apparition en mai 1995, juste avant l'explosion d'Internet, Java a beaucoup évolué. Il est notamment devenu une référence en matière de développement d'applications professionnelles, Web comme Desktop. Après ces 14 ans il convient de dresser un bilan sur l'adéquation de Java aux objectifs et contraintes actuelles.

On constate deux approches distinctes :
Beaucoup se focalisent sur Java 7 : les discussions font rage sur les évolutions qui pourraient composer cette nouvelle version. D'autres considèrent que Java, avec sa spécification de 600 pages, est devenu trop complexe : qu'il ne pourrait donc plus apporter de réelle révolution et qu'il faudrait donc réfléchir à son digne successeur.


Scala as the long term replacement for java/javac?
The long term replacement for javac? Certainly the dynamic languages like Ruby, Groovy, Python, JavaScript have been getting very popular the last few years - lots of folks like them.

Though my tip though for the long term replacement of javac is Scala. I'm very impressed with it! I can honestly say if someone had shown me the Programming in Scala book by by Martin Odersky, Lex Spoon & Bill Venners back in 2003 I'd probably have never created Groovy.


Is Scala really more complicated than Java?
After a conversation with a guy at work, I was inspired to take a look at whether
Scala is inherently more complex than Java, and decided it wasn't.


NIO.2 : Accès au système de fichier dans le JDK 7
Dans le cadre de la JSR 203, plus connu sous le nom de NIO.2, Java 7 va enfin être doté d'une toute nouvelle API pour l'accès au système de fichier, en remplacement de la classe File, qui malgré le fait qu'elle soit logiquement très utilisée, reste très problématique et incomplète dans de nombreux cas...
Mais que reproche-t-on à l'API de la classe File ?


JDK 7: What Frequently Rewritten Methods Should be Included in java.util.Objects?
In preparation for the arrival of a new class in JDK7 called java.util.Objects which will contain frequently-written utility methods, Joe Darcy of Sun has put out a request to the OpenJDK core-libs-dev group for ideas on what methods should be contained in this class. InfoQ would like to pass this request along to the wider Java community.

2 commentaires:

Anonyme a dit…

Its my at the start time to post on this forum,neutral wannat pushy some friends here.if its not allowed to post on this panel,amuse strike out this thread.Nice to find you!

---------------------------------------------------------------
[url=http://www.sexybags.info/rssrock.html]My designer handabgs[/url]

Anonyme a dit…

It is Miuccia [url=http://www.furworld.ru/ ]Шубы [/url] and Patrizio Bertelli who discover the secret of Prada and invent the first black nylon Prada handbag on this planet which opens the successful and beneficial entrance of famous handbag brand. Prada Handbags is known for its fantastic. Every woman wants a Prada handbag which represents the fashion and the way of life. Prada store sells cheap Prada, including Prada purses and Prada handbags. [url=http://www.furworld.ru/ ]мех [/url] is the ideal way for you to select a bag of high quality and greatest designed. With the progression of Prada, large numbers of [url=http://www.furworld.ru/ ]мех [/url] are established. Shopping for Prada handbags and Prada wallets in [url=http://www.furworld.ru/ ]меховая фабрика [/url] can save you many cash and time. [url=http://www.furworld.ru/ ]шуба [/url] is a second good option for you. [url=http://www.furworld.ru/ ]меховая фабрика [/url] should never disappoint you.