Devoxx 2010 daily notes: day five

December 2nd, 2010

Apache Camel, a powerful open source integration framework

Apache Camel is a parent of ServiceMix and Active MQ. The project has been initiated as a routing library.

Why integration?

  • different stack technology
  • business need

This integration framework is:

  • based on Enterprise integration patterns
  • includes 50 patterns
  • 80 components for connecting to other systems
  • 19 data format for transformation
  • 14 expression languages
  • DSL in three languages: XML, Java and Scala
  • security integration
  • event notification
  • route policy
  • threading model (non blocking routing engine)
  • heavy lift
  • focus on business
  • famous pattern-context based router

Tooling is available for IDE.

The roots of Java EE 6: JSR-299 (CDI) and Weld extensions

Weld (reference implementation) is available in servlet container, it implements CDI.

JSR-299 provides:

  • services for Java EE
    • life cycle management for context
    • type safe dependency injection
    • event notification
    • reduce coupling beans/interceptors
    • decorators intercepting beans (AOP)
    • EL integration
  • extension SPI

Available extensions:

  • hooks on container starting
  • hooks JEE transaction boundaries

Definition by XML is available.

wvandenberghe Java

MANA HD bien accueillie sur le store

November 19th, 2010

Mana remporte une bonne presse et pour le moment les notes sont au max ce qui est récompense nombre d’efforts sur le sujet ! Il nous faut encore faire de la pub pour maintenir notre visibilité sur le store.

L’application figure et a figuré comme ‘featured’ dans la section ‘New and Noteworthy’ à 150 endroits dans le store sections Overall (un must !) et games.

Screen shot 2010-11-13 at 01.56.35

fdewasmes Java

Devoxx 2010 daily notes: day four

November 19th, 2010

Java EE Key Note: The Future Roadmap of Java EE

Java EE wil evolved to cloud platform and, to do so, it will needs modularity based on Java SE.

JSF 2.1

JSF 2.1 will propose:

  • transient state saving
  • XML view cleaning
  • targeted to HTML 5

JMS

JMS is an old specification, which need to evelove for addressing new communication layers:

  • resolving specification ambiguities
  • standardized vendor extension
  • integration with other specifications
  • integration with the web tier (websocket, JSON, NIO2)

JPA 2.1

JPA targets to improve standardization, flexibility and control of persistence context synchronization. The metamodel will be extended to ORM.

Several addition will take place in this release:

  • add event listener
  • outer join with ON conditions
  • update and delete query based
  • mapping between JPQL and criteria queries
  • DB and vendor function invocation
  • support stored procedure

The expert group will be done for january 2011, but the release date could be delay by J2EE timeline (modularity is waiting for Java SE 8).

JAX-RS

JAX-RS 2.0 should be commited in december.

Actually, JAX-RS specification is not included into web profile.

A client API will be added:

  • low level builder pattern
  • high level response matching

JAX-RS will be adapted for MVC architecture based on JSP and Scalate.

Asynchronous, base on Atmosphere (HTTP streaming), will be too added with validation and injection. For exeample, @Context will be replaced by @Inject).

Comparing JVM Web Frameworks

In 2004, criteria to choose a web framework were:

  • request, component or RIA
  • stateful or stateless
  • project community
  • project futur
  • maintenance
  • technical features

And the choice could be described this way:

  • High traffic: request framework
  • Intranet: component
  • Products: products vendor

Now, in 2010, criteria are:

  • development productivity
  • developer perception
  • learning curve
  • project health
  • developer availability
  • job trends
  • templating
  • components
  • ajax
  • plugin
  • scalability
  • REST support
  • multi language
  • validation
  • books
  • doc
  • mobile
  • risk

After a comparison, to top five is:

  • Spring MVC (pro: configuration, integrtion, REST support; cons: instant reload)
  • GWT (pro: write in Java, easy to learn; cons: slow compilation)
  • Rails (pro: easy to learn, doc; con: performance, development tools)
  • Grails (pro: esay for Java programmers; cons: targeted to Java programmers)
  • Wiket (pro: for Java developpers; cons: no developpers available)

Standard DI with @Inject and JSR-330

CDI is a joined proposition from Google and Spring. It is resumed by five annotations and one interface.

@Inject identifies injectable members, that can be any visible fields (static or instance).

Injection order is:

  1. constructor
  2. fields
  3. methods

By default each time an injection must be done, a new instance is created.

@Qualifier allows to solve naming ambiguities by providing a way to create annotation to qualify a classe.

Interface Provide is a kind of factory where injection is not enough to create an object.

Guice and Spring Framework implements this JSR.

The Java Persistence Criteria API

JPA started with JPQL, a SQL like query language that can be used in static queries (@NamedQuery) and dynamic queries.

JPQL for dynamic query is:

  • String based: very easy to do
  • SQL like syntax
  • But it is String: risk of performance lost, lost of readability
  • No type safety

Criteria API is object based and typesafe (use of a metamodel).

CriteriaQuery are composite:

  • roots
  • join
  • expression
  • predicates
  • selections
  • ordering
  • grouping
  • method to assign: select(), multiselect(), from()
  • browse result: getSingleResult()

CriteriaBuilder: a factory of CriteriaBuilder for Expression and Predicate

select c from Customer c;

TypedQuery<Customer> tq = em.createQuery(Customer);

List<Customer> resultList = tq.getResultList();

  • join -> root.join(”orders”);
  • where -> cq.where(cb.equal(root.get(”…”)).select(root)

There is hole in type safety in join and where: usage of string to specify attribute name.

The solution used by JPA is to generate at compile time a static metamodel (logical view).

Directly accessible via EntityManager.getMetamodel(), it is defined by a hierarchy of interfaces to describes types and attributes. So, browsing the metamodel is possible.

Now, it is possible to replace String in criteria by metamodel attribute or by accessing directly to the metamodel (path navigation).

Path navigation brings tha ability to access attributes of composite object: c.get(attribute_a).get(attribute_b). It is used to compound predicates.

CriteriaQuey is able to create subqueries and to call database specific function: cb.function(”NAME”, return_type, path);

Criteria parameters are created by using CriteriaBuilder and can be named.

Queries are modifiable.

HTML 5 Fact and Fiction

HTML 5 is mainly a collection of features.

It is actually better supported on mobile devices than on desktop.

HTML 5 is driven by mobile development. Developping a native application for each platform is too cheaper, we need a common platform, and this the web.

Feature detection can be done with Javascript and preferably by using library such as Modernizr.

Now, browser evolution is driven by specification. This can avoid a quirck mode where standard is more or less respected. HTML header file becomes: <!DOCTYPE HTML>

HTML brings very feww components. So, developers uses external library, but there is no standard. HTML 5 comes with new input types. If they are not yet supported by browser, a text field is displayed. One of the target of such component is to brings facilities to mobile devices. For example, an email input field results to the @ symbol to be directly available on the keyboard.

It defines too things that are used from decades such as headers and footers.

It brings too:

  • autofocus
  • local storage: response to heavy cookie usage
  • offline mode: cache the application
  • microdata: semantic web
  • multithreading
  • geolocation (not part of HTML 5)

Activiti in Action

Activiti is a BPM open source tool , it is now mainly developed by Alfresco, but these are 2 distinct products, it is supported by SpringSource and Signavio. Activiti is based on the BPMN 2.0 standard, and the data can be persisted in an XML format.

Activiti allows you to model a process in BPMN 2.0 using “Activiti modeler” (from Signavio), or via an eclipse-based interface. At each step of the process, you can define who can execute the task, and define what are the information that should be filled in. Afterwards, you can initiate process instances, and each person involved will have access to the “activiti explorer” where he will have the possibility to fill in the required information. Once a process step is completed, activity notifies the next person involved that he has a task to do. The “activiti explorer” also provides analysts with process instances status and statistics (it is also possible to create easily a BIRT report about process instances report).

Activiti also provides other modules:

  • Activiti Probe (check process status)
  • Activiti Cycle (BPM collaboration platform)
  • iPhone client
  • Grails integration

Finally, Activiti is highly customizable and can be easily embedded into another application (you can, for instance, request to add a document into Alfresco at a particular process step using 5 lines of Java code …)

  • SpringSource provides an integration via a bean
  • A full query API provides access to the Activiti data
  • REST interface provided (used by an iPhone application

wvandenberghe Java , , , , ,

Devoxx 2010 daily notes: day three

November 18th, 2010

Java SE Keynote

Java platform is now targeting:

  • productivity
  • performance
  • universality
  • modularity
  • integration

Java language evolution will be:

  • for generics: declarations like HashMap<String, List<String>> map = new HashMap<String, List<String>>(); will become: HashMap<String, List<String>> map = new HashMap<>();
  • lambada expressions will be added (JDK 8)
  • type reification: primitive type will be used as generics
  • module will be added: based on descriptor (module-info.java) and manage by JMOD (integration with maven and its repositories)
  • module will be able to be package as RPM, JAR or DEB or directly managed by JMOD

Java evolution has been planned until 2030.

For the roadmap:

  • Java 7: end of july 2011 (project coin, fork/join framework)
  • Java 8: end of 2012

BIRT

BIRT is an Open Source reporting tool, and there is also a professional edition.

The main purpose of the presentation was to show the capabilities of BIRT in terms of interactivity in a dashboard.

The functionalities described were:

  • The possibility to create hyperlinks
    • to bookmarks in the same or in other document
    • to detailed view (drill-down)
    • to another URL
  • Zoom capabilities on charts
  • Show/hide sections of the document using Javascript
  • Show google maps through dynamic injection of HTML/Javascript

BIRT also provides the possibility to create a dashboard using the Flex technology, but this is part of the professional edition only …

Vaadin

Vaadin is a framework allowing web application to be entirely written in java code on the server side.

There is no need for writing any javascript or jsp, and no need to use Ajax.

The framework will then generate the code that will be executed on the client side using GWT.

Pro’s of Vaadin :

  • Independant from the browser used
  • Manipulates only Java (no javascript, no jsp)
  • Fast developement (we need to trust them …)
  • Code protection: code is only present on the server
  • There is a dialog editor (beta)

Con’s of Vaadin :

  • Each new user consumes part of the server RAM
  • There is no off-line mode available

A very interesting news is that they are working on a ROO version.

Java Persistence 2.0

JPA 2.0 brings some news:

  • Criteria API
  • pessimistic lock
  • metamodel API
  • standardize configuration
  • collections of basic types

Basic types collections:

  • @ElementCollection: this collection must be stored as an elmeent collection
  • @CollectionTable(…): specify the table name
  • @Colcumn(…): specify the collection column name

Embadable objects:

  • multi level (@AttributeOverride)
  • relationship (@AssociationOverride, @JoinTable)

Persistence order:

  • implemented by provider as an additional column (@OrderColumn)
  • in case of legacy use @OrderBy to use existing schema

Maps usage:

  • key: basic type, embeddable, entity
  • value: basic type, embeddable, entity

JPQL:

  • conditional expression: CASE … THEN .. (usefull with map)
  • restriction on type TYPE(e) IN (…) (usefull for inheritance)

Criteria API: support object and strinf literals

  • CriteriaQuery: query description
  • CriteriaBuilder: criteria query objects factory
  • How to express: select c from Customer
    CriteriaQuery cq = criteriaBuilder.createQuery(Customer.Class);
    Root root = cq.from(Customer.class);
    cq.select(root);

Metamodel: abstract schema model.

Pessemistic lock: specify mode as properties.

Second level cache API: use of @Cacheable on properties

Standardized configuration by providing a set of default properties.

Validation: automatic validation for PrePersist, PreUpdate and PreRemove.

The Next Big JVM Language

Actually, languages challenge Java by providing more features and different expression ways (have a look to Stephen Colebourn).

What Java has done right:

  • simplify C++ migration
  • take old ideas but JVM make them popular (garbage collector for example)

What Java has done wrong:

  • Checked exception: how to ignored them?
  • primitives: split type system
  • arrays: split type system and expose JVM future
  • monitors: unsafe effects, difficult to optimize
  • static: cannot be override, hurt concurrency
  • method overloading: complexity for compiler and for programmer
  • generics: too complex, background compatibility result in erasure

The New Big JVM Language should be:

  • like C syntax
  • multi paradigm: object oriented and functional
  • type system: static typing
  • easy reflection
  • have properties
  • have closure in language core
  • a better null handling (avoiding NullPointerException and long and borring debugging)
  • thread not exposed
  • have modules
  • good tooling (make tooling esay to build)
  • extensible (combination of language feature)
  • not verbose

No JVM languages fullfil these criteria, so, perhaps it is time for a none backward compatible version of Java: Java 9?

Project Lambda: To Multicore and Beyond

The based of Lambda project is SAM types: interfaces or abstract classes with a single abstract method.

Closure take the following syntax:

#{Person.getLastName()}

Collection framework will be adapted to provides facilities based on closure, such as filtering, sorting, etc…

New key words will be added to define immutable classes and their properties:

value class ImmutableClass {
    properties String lastname;
}

Actually, modifying an interface results to breaking API compatibility. With Lambda, it will be possible to add method with default behavior.

Spring 3.1 – Themes and Trends

Spring 3.0 brings:

  • annotated component model
  • expression language
  • REST support
  • Portlet 2.0
  • support Java EE 6 (JPA 2)
  • custom annotation
  • include JavaConfig (configuration classes)
  • @Value (use of value express with EL)
  • model validation @Valid on parameters
  • type conversion @DateTimeFormat(iso=ISO.DATE)
  • annotation scheduling: @Scheduled

Spring 3.1 will provide:

  • environment profiles
    • activated in command line by: -DspringProfile=env
    • provides environment abstraction as an API
    • custom placeholder resolution
  • java based configuration: @Configuration on class
  • cache abstraction
    • EhCache support (important for cloud)
    • support for Gemfire, Coherence
    • annotation @Cacheable
    • cache could be conditional
    • @CacheEvict to avoid caching
    • new namespace declaration
  • conversation management:
    • HttpSession ++
    • association with browser and tabs
    • foundation for WebFlow 3
  • Groovy will be used as template engine
  • c: namespace for constructor arguments
  • Roadmap:
    • M1 in december
    • 3.1 GA march/april 2011

HTML 5 Websockets: A New World of Limitless, Live, and Wickedly Cool Web Applications

Actually, HTTP is not full duplex, so, Websockets brings full duplex to web.

It is implemented as a Javascript API that uses IETF protocol, but is still compatible with HTTP. The idea is not to replace HTTP.

Websocket allowed cross origin, secured and unsecured communication in standard.

It is supported by browsers:

  • Chrome 4.0+
  • Safari 5.0, iOS 4
  • Firefox 4 beta
  • to check compatibility, go to Websocket web site

Beyond the scene, Websocket allows:

  • connection reuse
  • extends client server protocol (available in JS API)

From the tests, Websocket, compared to pure HTTP, reduce latency from 150 ms to 50 ms.

Visage Android Workshop

Visage is a dynamic UI language inspired by Flex and JavaFX for different target, and especially, for Android.It is declarative, brings data binding, provides closure to implements triggers and brings null safety.

Compilation is divided in two phases:

  • Visage to Java bytecode
  • Bytecode to Dalvik

wvandenberghe Java

Devoxx 2010 daily notes: day two

November 17th, 2010

Java EE 6

Here are the most significant changes to the Java EE specifications that were presented:

JPA 2.0

Provides now an object-based query definition capability, this means that if it compiles, it will run!

Servlet 3.0

The web.xml file is now optional, because it is possible to use classes and annotations to specify what we could only specify in the web.xml file before.

The specification also provides the possiblity to put ressources (css files, images, …) inside the JAR file.

EJB 3.1

An EJB container is now provided, this means that it is possible to run EJB with a simple Java EE (no need for JBoss or GlassFish anymore).

JAX-RS

It provides RESTful invokation of an EJB through annotations (@Path, @Get, @PathParam, …)

CDI 1.0

Inject anything anywhere … but with strong typing using annotation @Inject EJB can now can be used as JSF backing beans: by adding annotation “@Name” to an EJB, it is automatically exposed with this name to JSF. Therefore, the variables and methods from the EJB are available in the “.faces” or “.xhtml” file, and the auot-competion is available inside the IDE.

Java EE 6 tools

Here are the conclusions of an half an hour presentation about IDE for Java EE 6. The first conclusion is that … there are not a lot of differences.

But here are the presented differences:

NetBeans

  • NetBeans and GlassFish releases are synchronized
  • Can start/stop the DB
  • Can automatically create basic CRUD with JSF 2.0

Eclipse

  • Does not support (correctly) more advanced J2EE
  • 6 specifications J2EE6 was supported
  • 6 months after the other IDE

IntelliJ

Has some ER/UML view and some PL/SQL support

Dive into Android

Layout are not pluggable in Android SDK, i.e. layout classes are containers. It is strongly recommended to use dip unit (device independent pixel).To set a component to use all place let by the parent, set the attribute: MATCH_PARENT. As big as the content, set attribute WRAP_CONTENT.

AbsolutLayout should not be used anymore.

With linear layout:

  • weights redistribute empty space
  • size should be 0 dip. When building UI, SDK evaluate size in first place.

Don’t forgot to use tools such TraceView and HierarchyViewer for debugging.

JBoss tools the deployment Ninja

JBoss Tools provides tools for code generation and edition. The challenge is, Eclipse has only one way to produce things. JBoss Tools add different facilities:

  • project archieves to hot deploy projects on servers (can be explored in editors)
  • single files and directories (very usefull with maven) deployment
  • not dependent of JBoss AS usage

It is possible to deploy application by simply drag and drop it on server instance. Instance can also be in remote, and keep its hot deployment capabilities.

Introduction to HBase

HBase is modeled after Google BigTable.It is build on top of Hadoop and is dedicated to store several 100Gb and more.

Its characterics are:

  • transaction only on single row
  • indexes on row key
  • several millions read/write operation per second
  • brings random read/write to HDFS
  • every row has a row key and a timestamp
  • it is a distributed sorted map
  • Value = Row Key + Column Key + Timestamp

HBase shell

Hbase brings a shell to execute command against it, for monitoring or content managment:

  • status: cluster status
  • list: list all user table
  • get: request on one row
  • put: insert
  • scan: request some rows
  • count: row count
  • delete: delete column or row
  • remove: delete table
  • add/remove column family

Architecture

A region is a table row subset, a region server serves region data. A master is responsible of coordinate region servers.

For management of all this information, HBase comes with ZooKeeper.

Data is written to the region memstore (in memory storage). It is flushed at a certain size. Compaction is the operation to compact data into HDFS managed files. There is two kind of compaction:

  • minor: each time memstore is flushed
  • major: by default daily operation. Files are compact to several Gb files.

Region server should not be located with data, and they can split region. In this case, master know that a region has been splitted, and then, affect a new region server to it.

API

API provides configuration capabilities:

Configuration conf = HBaseConfiguration.create();
conf.set("hbase.zookeeper.quorum", "localhost");

API for cluster administration is also available:

  • HTableDescriptor: table and column family
  • HColumnDescriptor: describes a column family

HTable allows to access to an existing table.Put/Get/Scan objects allows to insert/get/select row(s).

HTable files can be managed by MapReduce. API provides TableInputFormat and TableOuputFormat for processing:

  • TableInputFormat: splits HBase tables and use scanner to read split
  • TableOutputFormat: write in HFile format (HDFS file format)

Advanced API

  • Add a row if it does not not already exists: table.checkAndPut.
  • Scanner can be refined by using Filters.
  • The write-ahead log can be disabled: put.setWriteToWAL(boolean)
  • Proxy server is also available to be accessed from other technologies.
  • A REST API is also available (Stargate)
  • Services can be exposed via “Thirst”

Deployment

HBase comes with a pre installed ZooKeeper, but programmer can replace it.

Monitoring can be done with tool like Ganglia or by using JMX interfaces.

Backup can be hold by a MapReduce job to import/export data.

To improve performance, scanner caching can be enabled, but use more memory, and compression method can be set to LZO. For data greater than 12Gb, use filesystem cache.

Groovy/Grails Development in Eclipse

They are available as Spring Tool Suite extension. But, for the moment, Groovy DSL can be added, but, to be recognized in Eclipse, an Eclipse extension point should be added.

Groovy Eclipse integration is actually better than classic compiler, as compiler gives only the first compilation error, but, STS gives all errors. Soon, Groovy++, maven and Gradle will be supported and DSL will be used without added an axtension to Eclipse.

STS brings following facilities to Grails:

  • a new perspective
  • command wizard
  • plugin manager
  • drag & drop into tc Server (agent based reloading)
  • STS grails edition coming soon

Scalable and RESTful web applications: at the crossroads of Kauri and Lily

Kauri is a resource oriented web platform, which core concepts are: models, ptototyping, RIA, routing, pages. There is no web servlet container, but it is replaced by a Spring based application container that load modules in place deploying war files. It uses Groovy for routing and Jax-RS for service.

But from front end is scalable by using Rest services, the bottleneck is relocated to the database server which is no more scalable than before.

To fix this problem, Lily is a scalable store and search engine based on HBase for storage and SOLR for search, and it support model versioning.

wvandenberghe Java , , , ,

Pragma Consult se lance sur le marché du jeu iPad

November 16th, 2010

icone-512Toujours plus loin.

C’est le maître mot que nous avons en permanence en tête quand nous réfléchissons à comment apporter tous les jours un plus sur le marché du Luxembourg. Car il est déjà bien chargé, ce marché, au niveau sociétés de services en informatique. Dès lors comment nous démarquer, comment montrer notre expertise tout en restant rentables. Depuis toujours, Pragma Consult a cherché à construire une image de marque de leader à la pointe. En 2008, Pragma Consult avait marqué le coup en montrant au Luxembourg que les applications mobiles et notamment iPhone n’étaient pas seulement attendu aux Etats-Unis ou même à nos pays voisins mais bel et bien aussi au Luxembourg. HotCity Walker s’est téléchargé plus de 80.000 fois maintenant et montre d’une part la pertinence de Pragma Consult au niveau du marché mobile mais aussi au niveau de la thématique de l’application et des fonctionnalités rendues à l’utilisateur.

Aujourd’hui nous franchissons un nouveau pas en allant chercher un marché complètement inexploité par les sociétés de service (et c’est sûr que ce n’est pas forcément ce qu’on pourrait attendre d’une SSII classique) et qui plus est sur le Luxembourg : Pragma Consult vient de publier sa première application de jeu sur iPad dénommée Mana HD.

Comment cela est-il venu ?

Lors de la sortie de l’iPad la première chose à laquelle j’ai pensé est “waow, il y a tout à fait le moyen de le poser au centre d’une table et de jouer à plusieurs dessus”. L’idée a fait son chemin et j’ai pris contact avec pas mal de grandes société d’édition de jeux, françaises et étrangères. Beaucoup étaient dubitatives. Nous avons finalement contacté une petite maison d’édition lorraine qui a prêté une oreille attentive et qui nous a immédiatement fourni tous ses jeux pour que nous les essayions et voir ce qui valait le coup. Timothée, l’éditeur de Jactalea nous a encouragé à regarder de près Mana, un jeu abstrait en cuir. Nous l’avons essayé et trouvé le principe plutôt sympa. Tout de suite nous avons eu beaucoup d’idées et nous avons décidé de nous lancer. Jactalea étant une petite maison d’édition, elle n’avait pas les moyens de financer un tel développement. Nous avons donc décidé de produire nous même cette application. Et voilà, c’était parti…

Aujourd’hui le résultat est je pense probant mais je vous laisse juger par vous-même avec les screenshots et le teaser video ci-dessous. Pour donner une idée de ce qu’est cette application voici la description que nous avons publiée sur l’AppStore

MANA, le célèbre jeu abstrait de Claude Leroy, également concepteur de Gygès, prend vie sur iPad.
2 damyos (seigneurs japonais), assistés chacun de 5 ronins (samouraïs mercenaires), s’affrontent sur 36 cases calligraphiées. Le dessin de chaque case conditionne la longueur des déplacements. Vous devez capturer le damyo adverse, en arrivant sur la même case que lui.
Attention cependant : le “Mana”, esprit malin, prétend manipuler vos pièces; pour gagner, il vous faudra vous soustraire à son emprise !
Magiquement simple et néanmoins machiavélique !
Durée d’une partie : environ 15 minutes.
En plus de son principe de jeu simple à appréhender et pourtant efficace, la version iPad vous apporte :
• un graphisme revu et une ambiance sonore qui vous plongent dans l’univers japonais médiéval
• un mode joueur seul pour continuer de vous entraîner et écraser vos adversaires
• un mode minuté pour les parties à 2 joueurs : le premier joueur ayant épuisé son capital temps a perdu ! Idéal pour faire des parties ‘blitz’ endiablées…
MANA HD sur iPad est une production et un développement Pragma Consult. Sa version jeu de plateau est éditée par Jactalea.
MANA est un jeu de Claude Leroy.
© Copyright Pragma Consult & Jactalea, 2010
Mana,société,jeu de plateau,stratégie,abstrait,japon,samouraï,ronin,damyo,jactalea,pragma

MANA, le célèbre jeu abstrait de Claude Leroy, également concepteur de Gygès, prend vie sur iPad.

2 damyos (seigneurs japonais), assistés chacun de 5 ronins (samouraïs mercenaires), s’affrontent sur 36 cases calligraphiées. Le dessin de chaque case conditionne la longueur des déplacements. Vous devez capturer le damyo adverse, en arrivant sur la même case que lui.

Attention cependant : le “Mana”, esprit malin, prétend manipuler vos pièces; pour gagner, il vous faudra vous soustraire à son emprise !

Magiquement simple et néanmoins machiavélique !

Durée d’une partie : environ 15 minutes.

En plus de son principe de jeu simple à appréhender et pourtant efficace, la version iPad vous apporte :

  • un graphisme revu et une ambiance sonore qui vous plongent dans l’univers japonais médiéval
  • un mode joueur seul pour continuer de vous entraîner et écraser vos adversaires
  • un mode minuté pour les parties à 2 joueurs : le premier joueur ayant épuisé son capital temps a perdu ! Idéal pour faire des parties ‘blitz’ endiablées…

MANA HD sur iPad est une production et un développement Pragma Consult. Sa version jeu de plateau est éditée par Jactalea.

MANA est un jeu de Claude Leroy.

Nous prévoyons de faire de petites améliorations sur l’application et notamment de faire une version compatible iPhone, du jeu en ligne et un nouveau niveau d’IA.

Nous espérons que l’application remportera un bon succès mais cela semble déjà bien parti et les retours sont vraiment excellents. Je vous laisse en juger :

http://de.trictrac.net/news-mana-auf-dem-ipad.php

http://www.trictrac.net/index.php3?id=jeux&rub=actualite&inf=detail&ref=9484&com=ok

http://www.jedisjeux.net/mana-enfin-disponible-sur-ipad-n-1705.html

http://www.spielbox.de/php/aktuell.php4?anz_id=2487

YouTube Preview Image

http://www.vimeo.com/16687576

Pour ceux qui ont un iPad, je vous invite à acheter l’application (2,39 €) sur l’appStore : http://itunes.apple.com/lu/app/mana-hd/id400871340?mt=8


fdewasmes Java

Devoxx 2010 daily notes: day one

November 16th, 2010

The most interesting topic of the first day was Spring ROO.

The speaker did demonstrate that this tools is able to generate the code for a full CRUD application based on Spring persistence and Spring MVC in a few minutes.

The demonstration was mase using Hibernate with a Postgres database, but several databases and ORM’s are of course supported.

The tool is also able to generate the configuration for a basic Sping secutiry setup, as well as for a Spring Web Flow setup.

In order to generate the right JPA classes, ROO provides a command tool to specify the entity names, and the field names for each entity. But another very useful feature of ROO is that it is also able to parse the database in order to automatically identify the existing tables and fields. And it support incremental updates of the database.

It is also possible to use it only to initiate a new project because you can remove Spring ROO from your project within 5 minutes. Now, let’s download and test it!

Another topic of the day was iText. It has been used in order to generate the conference program in PDF with some complex features like cross-references, PDF documents merge, highlight of the current section, … The conclusion is that it is quite impressive for PDF generation, but I was mainly interested in the generation of RTF documents, and I learned that it is not supported any more, so I was a bit diappointed after this presentation …

Hadoop Fundamentals: HDFS, MapReduce, Pig, and Hive

Hadoop has two core components:

  • HDFS
  • MapReduce

And an ecosystem: Pig, Hive, HBase, Flume, Oozie, Sqoop.

HDFS

HDFS is a distributed file system based on GFS and on top of native file system such as extfs. It provides redundant storage. It performs best with files 100Mb or more and is optimized for large streaming files. HDFS does not allowed random write, but append allowed from version 0.21. It splits files in blocks of 64 Mb or 128Mb, and these blocks are distributed and duplicated on nodes. A master node keeps trace of files/blocks mapping, and data nodes hold actual blocks.

MapReduce

MapReduce is programming model to distribute tasks accross multiple nodes. It is automatically parallel processing and fault tolerant.It comeswith a monitoring tool.

Abstraction for Java and scripting language compliant with HDFS streaming are provided with hte following semantic:

  • job: full program
  • task: execution of map or reduce
  • task attempt: execution of a task
  • job tracker in the master node (job and task manager) to monitor jobs

MapReduce divides in two phases: map, and reduce. Between them, there is the stored and shuffle phase. Before excuting a reduce, every map has to be finished and there produced data stored in the same node than the node from which data are read. Reducer can be single or multiple and its output are written to HDFS. A possible bottleneck is with a slow mapper, as reducer cannot be launch if one mapper is not yet finished, and another is huge amount of data produced by mapper.

Combiner allows to send intermediate data to reducer.

A job is defined by a driver class, usually in a main method, which could read configuration from /etc/hadoop/conf and where the input and output dir should be specified. Mapper, Reducer and Combiner implementations should be specified into the conf. It run the job against th conf (JobConf). Mapper implementations should extend MapReduceBase and implements Mapper (parameterized by key/value read and produced). Method map take OutputCollector and Reporter to respectively, collect produced key/value pairs and aggregate data via Counters (visible into GUI).

Distributed cache push data to all slave nodes. It should implement Tool, and be invoke by the ToolRunner.

Hive

Hive is build on top of MapReduce provides a SQL like interface:

  • subset of SQL 92 + hive specificity
  • no transaction
  • no indexes
  • no update nor delete

Hive provides a metastore that holds structure of a table and data about where are data in HDFS. It allows to copy file from local FS to table, but does no check at load. Failure are found at request time.

Pig

Pig is a data flow language located on client side. It is executed by LocalJobRunner and on local FS.

The latest innovations of Adobe Flash Platform for Java developers

Flash Player 10.1

Now, Flash Player supports:

  • multitouche – gesture
  • accelerometer
  • screen orientation
  • hardware acceleration

For optimization, Flash player brings:

  • sleep mode
  • reduce memory usage by 50%
  • reduces CPU usage for video by using hardware acceleration
  • prevent stack trace popup in production mode (programmatically)

AIR 2

New AIR platform version provides:

  • native process API (profile: extendedDesktop)
  • native installer generation (Windows, Androis, iOS), but needs shared library to be installed on device
  • cross compilation, usage of LLVM (but some API cannot be implemented)

Flex 4

Flex 4 comes many news:

  • FXG framework for graphics
  • skins are separated from components
  • 3D API
  • new layout framework (don’t forget to override updateDisplayList on layout classes)
  • asynchronous list and paging components
  • globalization API

Mobile

  • Needs Flex 4.5 (Hero)
  • provides debuger, packager, web view, geolocation, ease of deploiment

Flash Catalyst

  • Flash Catalyst reduces gap between developpers and designers
  • from a vectorial (Adobe Director) image, we can sepcify which graphical element should be interactive and generate a Flex project

LCDS

  • brings bridge to other technologies such as .NET, PHP, etc

Live Cycle Collaboration Service

  • from 15$/month
  • clustered to Adobe
  • component for dashbord/ chat, webcam management

Spring Developer Tools to push your Productivity

Spring focuses on providing tools for framework and languages to speed up application development. Spring Tool Suite comes comes with tcServer, maven, and Spring ROO, and has auto-configuration capabilities. It detects, at installation time, tc Server and Tomcat.

While developing a web application, a part of lost time is located in stop/server the server. Tc Server comes with three refresh approch:

  • standard: reload on change
  • JMX based: reload only if dynamic content has changed
  • agent based

Intelligent data analysis – Apache Mahout

Mahout is a tool mixing data mining, to extract pattern data, and machine learning, to extract model data. As it is build on top of Hadoop, it manages huge amount of data. It’s target is to provide scalable data mining algorithm to, for example, analyse news through the internet and group articles by subject and eliminate doublon. Or another example is to search facial photo looks like to a given one in a collection.

wvandenberghe Java , ,

Création d’un « Nightly Build »

October 7th, 2010

 

Dans la zone « Team Explorer » de Visual Studio 2010, faites un clic droit sur le nœud « Builds » de votre Team Project :

Cliquez sur « New Build Definition… », dans la fenêtre qui s’ouvre saisissez le titre et la description de votre build :

Une fois ces deux informations correctement renseignées, cliquez sur « Trigger » dans la partie gauche de la fenêtre. La partie droite de l’écran vous permet alors de planifier votre compilation. Pour ma part, j’ai choisie de compiler mon projet tous les jours ouvrable de la semaine à 3h30.

Une fois la panification correctement définie, cliquez sur « Workspace » dans la partie gauche de l’écran :

Définissez dans la partie droite de l’écran la configuration du Workspace qui sera utilisé pour la compilation. Pour ma part, je configure la branche principale de mon projet ainsi qu’un répertoire pour le dossier qui contient mais modèles de compilation mais aussi les différents outils qui pourraient être exécutés lors de la compilation (StyleCop / …). Enfin quand votre Workspace est correctement paramétré, cliquez sur « Build Defaults » dans la partie gauche de l’écran. La partie droite de l’écran permet alors de choisir le contrôleur qui se chargera de ma compilation, ainsi que le partage réseau dans lequel sera placé son résultat :

Une fois ceci définit, cliquez sur « Process » sur la gauche de l’écran pour choisir le modèle de compilation à utiliser, ainsi que les paramètres nécessaire à celui-ci.

Enfin cliquez sur « Retention Policy » sur la partie gauche de l’écran pour accéder au dernier écran de configuration. Il vous permet de définir combien de temps sont conservés les différents résultats de la compilation.

Pour ma part, j’ai choisi de conserver les 10 derniers résultats de chaque catégorie, puis de tous supprimer sauf les résultats de tests unitaires que je supprimerai manuellement une fois que je n’en aurais plus l’utilité (C’est bien pratique de conserver un historique des résultats de test pour en surveiller la progression sur toute une itération). Enfin fermer la fenêtre et confirmer la sauvegarde du build.

Hervé Tinant Microsoft ,

Un mot de plus sur LowTide

October 6th, 2010

Dans un post précédent je parlais de LowTide. Gizmodo en détaille un peu plus sur les fonctionnalités aujourd’hui. En deux mots : LowTide est une application iOS qui présente l’interface AppleTV. Sur les autres matériels mobiles apple c’est le SpringBoard qui tourne pour lancer les applications. Pour le nouvel AppleTV c’est LowTide qui gère l’interface utilisateur ‘racine’ avec une interface un peu à la manière de FrontRow.

Mais ce que dévoile Gizmodo est encore plus intéressant : a priori LowTide arriverait sur iPad permettant ainsi à l’iPad et par la suite les iPhone et iPod de pouvoir streamer un film ou de la musique directement depuis un serveur iTunes comme le fait l’AppleTV. Tiens on dirait bien ce qu’apporte déjà ZumoCast…

Mais alors les deux vont entrer en compétition ? En fait ZumoCast va plus loin que la solution Apple puisqu’il est utilisable en dehors du réseau de la maison.

fdewasmes Java

ZumoCast : le media cloud qui tue

October 6th, 2010

zumocast-ipad-iconHonnêtement, j’avais du mal à saisir le concept puis l’intérêt de ce qu’on appelle maintenant le media cloud. Mais ZumoCast met toutceci en lumière.

ZumoCast permet de profiter de vos fichiers, votre musique et vos vidéos sur votre matériel mobile où que vous soyez, et pas seulement chez vous. Imaginez que vous ayez un serveur de médias à la maison, vous partez en déplacement ou même tout simplement au travail et réalisez soudain que vous voudriez bien voir une vidéo ou reconsulter un fichier. Vous allumez votre iPad et visualisez le fichier. C’est tout. L’application iPhone/iPad est épatante de simplicité et de convivialité.

Mais il y a aussi un petit détail très intriguant : lorsque vous jouez une video vous avez la possibilité d’exporter le son via … AirPlay ? N’est ce pas une fonctionnalité plus ou moins réservée ? En tous cas, pouvoir voir votre vidéo sur votre iPad en profitant de la puissance de votre installation son à la maison et ce de façon immédiate sans ré-encoder puis transférer la video de votre ordinateur sur votre iPad à l’aide d’iTunes… c’est révolutionnaire :)

fdewasmes Java