A New Enterprise Platform for Flex/Java EE Applications
Last week, Granite Data Services released its Enterprise Platform for building Rich Internet Applications using Flex and Java EE in the back-end. The entire Granite DS framework is Open-Source and relased under the LGPL v2 license.
Granite DS is composed of a client development framework (Tide) that brings familiar JavaEE concepts to the Flex side: dependency injection, context management, authentication and secured access, bean validation, etc. It integrates with all major JavaEE application servers, frameworks and JPA engines: JBoss, GlassFish, WebLogic, WebSphere, Tomcat and Jetty; Hibernate, EclipseLink, OpenJPA and DataNucleus. It also comes with an efficient real-time module (Gravity), based on Comet implementations, allowing scalable data-push.
We spoke with Frank Wolff, CEO and Co-Founder of Granite DS to understant his perspectives on Rich Internet Applications.
InfoQ: Enterprise Software Stacks and RIAs in particular, are evolving rapidly with new levels of Scalability, Mobility, HTML5... how does Granite DS position itself in this evolution ?
Frank: Web applications scalability is mainly achieved through load-balancing in clustered environments. The new GraniteDS Enterprise Platform, which relies currently on JBoss 5.1 (Community or EAP), is bundled with out-of-the-box clustering support (load-balancing and fail-over). For other application servers (WebLogic, GlassFish, Tomcat, Jetty, etc.), the work done for JBoss, enabling session and authentication replication on all cluster’s nodes, can be easily reused. Another aspect of scalability is related to connections/threads management: GraniteDS uses asynchronous servlets (also known as Comet) for real-time messaging, enabling dramatically improved scalability in comparison with the classical, synchronous, servlet model.
Mobility was a problem for Flex developments that has been recently addressed by Adobe with the new Flex and Flash Builder release 4.5. It basically allows Flex developers to create a specific Flex skin that fits small mobile screens and compile their Flex/Flash software for Android/iOS platforms as Air applications. This is a great news (iPhone/iPad are now supported) but it comes with some limitations: the application is still a Flash application, running into a Flash virtual machine, it doesn't look like a true native Android/iOS application and it cannot leverage all native features of the targeted platform. GraniteDS has recently released to native libraries (Java/Objective-C) to overcome these limitations: you may now create native Android/iOS applications connected to a GraniteDS server and exchanging data in AMF3 format (AMF3 is a very compact binary serialization format used with Flex applications). This is still a work in progress (both libraries are beta-software) but it already offers AMF3 remoting for these two platforms and languages.
InfoQ: Persistence has gone a long way since the early days of ORM in the mid-90s. JPA seems to be the solution that everyone has been looking for. What's your take on it?
Frank: One of the initial goals of GraniteDS was to leverage all features of JPA engines, starting with lazy-loading and Hibernate. During the 5 years development of GraniteDS, full JPA support has been extended to all major engines: TopLink/EclipseLink, OpenJPA and DataNucleus. GraniteDS' JPA support has been widely used and is mature for a long time now. Transparent lazy-loading is also available through the Tide client framework: lazy initialized data can be automatically fetched when it is first accessed on the client-side (through a Flex binding for example).
More generally, GraniteDS aims to integrate with all major JavaEE frameworks and features: EJB3, Spring and JBoss/Seam, JPA engines, Bean Validation, etc. The main goal is to make Flex development familiar to Java developers, by integrating with their favorite frameworks and replicating JavaEE concepts on the Flex side (dependency injection, client-side entity manager, events bus with observers, etc.)
InfoQ: Bi-directional or Real-time Protocols are becoming increasing important in RIA and Mobile applications. How do you see the future of remoting in a Composite Application world?
Frank: Real-time protocols offer new and interesting possibilities to Web developers and are going to be increasingly used over this decade. This is of course great because the user experience will benefit from this evolution, allowing people to access their applications and data from anywhere, but Web developers and framework providers need to address two major challenges:
1. Server scalability: there is no such thing as “data push” in HTTP. The client application has to send a request and this request must be paused on the server side, waiting for available data. Servers need to handle tens (or hundreds) of thousands simultaneous persistent connections and the asynchronous model (standardized in the Servlet 3.0 specification) is helping a lot on reducing resources consumption. However, an extension of the HTTP protocol, allowing the client to act as a server and the server to initiate a true data push to the client would be a great evolution.
2. Network congestion: cellphone networks are far from being ready to deal with applications that require several persistent HTTP connections. The remoting APIs used to create smartphone applications must offer a way of limiting the number of opened connections and should rely on platform-specific notification mechanisms for real-time messaging as far as possible. Otherwise, 3G (or 4G) networks will be completely overwhelmed by these new applications.
Our platform development is aware of these issues and, for example, the implementation of the native (Java / Objective-C) mobile libraries is taking care of queuing all remote calls through a unique HTTP connection. But there is still a lot of work and studies to do before reaching a general and consistent remoting solution suitable for all devices of this new Composite Application world.
Anatole Tresch Mar 03, 2015