Archive for Technology

Flex Push Architectures fr.HUGO

One of my favorite subjects to preach about is the importance of designing push architectures in enterprise systems. The classic example of when a push architecture is needed is the dashboard. In order to keep a dashboard up to date the options are to have the client program regularly poll the server for changes or to have the server push updated information to the dashboard when necessary. The later alternative performs and scales better.

The problem is how to implement such architecture with web clients. A server can’t push data to web clients due to the stateless nature of http. The market has come up with a number of solutions to this problem. I talked about such solutions in an earlier post. The reason I am going back to this subject is due to new developments in Flex.

Flex is the form based cousin of Flash. It is arguably the most complete RIA framework in the market. Quick disclosure, I started working for Adobe a few days ago. Yet, I used Flex extensively in other projects before. There are two developments that made in my opinion Flex an attractive option for push architectures. First, last year Flex itself became Open Source. That means the Flex SDK is available for anybody to use at no cost. Second, in February this year, the Flex server product became Open Source in the form of BlazeDS. With BlazeDS you have access to powerful remoting capabilities. With BlazeDS a Flex application can access POJOs directly and most importantly it can subscribe to topics on the server.

Advertisements

Leave a Comment

Discover the power

ConcurrentHashMap of EhCache vs HashMap vs ConcurrentHashMap

The benefits of java.util.concurrent.ConcurrentHashMap over a regular synchronized HashMap become blatantly apparent when we run a small experiment to simulate what might happen in the case of a map used as a frequently-accessed cache on a moderately busy server. See the details at http://www.javamex.com/tutorials/concurrenthashmap_scalability.shtml

But here is the problem http://www.informit.com/guides/content.aspx?g=java&seqNum=246

The truth

A hash table supporting full concurrency of retrievals and adjustable expected concurrency for updates. This class obeys the same functional specification as Hashtable, and includes versions of methods corresponding to each method of Hashtable. However, even though all operations are thread-safe, retrieval operations do not entail locking, and there is not any support for locking the entire table in a way that prevents all access. This class is fully interoperable with Hashtable in programs that rely on its thread safety but not on its synchronization details.

Try and get the latest of version of ConcurrentHashMap of EhCache instead of java.util.concurrent.ConcurrentHashMap.

Leave a Comment

Caching Techniques using spring AOP

<!– Implementation of Data Service & Caching Advice : –>
<aop:config>
<!– Data Caching Advice –>
<aop:advisor id=”referenceCachingAdvisor” pointcut=”execution(* com.interface101.xml.impl.ReferenceDataImpl.getReferenceData(..))”
advice-ref=”methodCachingAdvice” />
</aop:config>

<bean id=”methodCachingAdvice”>
<property name=”cache”>
<ref local=”methodCache” />
</property>
</bean>
<!– Begin Cache Configuration –>
<bean id=”cacheManager”>
<property name=”configLocation”>
<value>classpath:ehcache.xml</value>
</property>
<property name=”shared”>
<value>true</value>
</property>
</bean>
<bean id=”methodCache”>
<property name=”cacheManager”>
<ref local=”cacheManager” />
</property>
<property name=”cacheName”>
<value>cache.REFERENCE_DATA_CACHE</value>
</property>
</bean>

Comments (2)

Building SWC File using FlexMojos plugins in Maven

<?xml version=”1.0″ encoding=”UTF-8″?>
<project xmlns=”http://maven.apache.org/POM/4.0.0&#8243; xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance&#8221; xsi:schemaLocation=”http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd”&gt;


<modelVersion>4.0.0</modelVersion>
<groupId>interface101-flex-security</groupId>
<artifactId>interface101-flex-security</artifactId>
<version>0.0.1</version>
<packaging>swc</packaging>

<build>
<defaultGoal>install</defaultGoal>
<sourceDirectory>src/main/flex</sourceDirectory>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.sonatype.flexmojos</groupId>
<artifactId>flexmojos-maven-plugin</artifactId>
<version>3.2.0</version>
<extensions>true</extensions>
<configuration>
<targetPlayer>10.0.0</targetPlayer>
<allowSourcePathOverlap>true</allowSourcePathOverlap>
<namespaces>
<namespace>
<uri>http://www.interface101.com/admin/security</uri&gt;
<manifest>src/main/resources/manifest.xml</manifest>
</namespace>
</namespaces>
<includeNamespaces>
<namespace>http://www.interface101.com/admin/security</namespace&gt;
</includeNamespaces>
</configuration>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>flex-support</groupId>
<artifactId>flex-support</artifactId>
<version>1.0.0</version>
<type>swc</type>
<scope>external</scope>
</dependency>
</dependencies>
</project>

Leave a Comment

Agile #1 Principle

Build

  • Requirements are clearly communicated and understood (at a high level) at the outset
  • Requirements are prioritized appropriately based on the needs of the user and market
  • Requirements can be clarified on a daily basis with the entire project team, rather than resorting to lengthy documents that aren’t read or are misunderstood
  • Emerging requirements can be factored into the development schedule as appropriate with the impact and trade-off decisions clearly understood
  • The right product is delivered
  • As iterations of the product are delivered, that the product meets user expectations
  • The product is more intuitive and easy to use
  • The user/business is seen to be interested in the development on a daily basis
  • The user/business sees the commitment of the team
  • Developers are accountable, sharing progress openly with the user/business every day
  • There is complete transparency as there is nothing to hide
  • The user/business shares responsibility for issues arising in development; it’s not a customer-supplier relationship but a joint team effort
  • Timely decisions can be made, about features, priorities, issues, and when the product is ready
  • Responsibility is shared; the team is responsible together for delivery of the product
  • Individuals are accountable, reporting for themselves in daily updates that involve the user/business
  • When the going gets tough, the whole team – business and technical – works together!

Comments (1)

Flex World

Green Flex World

BlazeDS Components

  • Messaging Services
  • RPC Services
    • RemoteObject
    • HTTPService
    • WebService
  • RPC Services – Provides a call and response model for accessing external data. Lets you create applications that make asynchronous requests to remote services that process the requests, and then return data to your Flex application
  • Messaging Services – Provides messaging services for collaborative and real-time applications. Lets you create applications that can send messages to and receive messages from other applications, including Flex applications and Java Message Service (JMS) applications.

Arch
Arch

RemoteObject based on the Action Message Format (AMF) will be the best of three as per implementation I have.

Leave a Comment

Repository On-demand

Repo on-demand

Repo on-demand


Warfolio Repo is public interface providing access to all application interfaces. One location that manage all your web needs.

Leave a Comment

Older Posts »