Bulding a Modular Application with Coherence David Whitmarsh Independent Contractor Technical Architect Investment Banks

Slides:



Advertisements
Similar presentations
Coding Basics - Deferred Binding. Deferred Binding is a feature of the GWT compiler works by generating many versions of code at compile time, only one.
Advertisements

Component Models and Technologies Case Study: OSGI.
Java Web User Group Impala Framework Update Modular class loaders and OSGi Phil Zoio London December 2, 2008.
Approaches to EJB Replication. Overview J2EE architecture –EJB, components, services Replication –Clustering, container, application Conclusions –Advantages.
Why OSGi matters for Enterprise Java Infrastructures
Technical Architectures
MC365 Application Servers: Servlets. Today We Will Cover: What a servlet is The HTTPServlet and some of its more important methods How to configure the.
1 Frameworks. 2 Framework Set of cooperating classes/interfaces –Structure essential mechanisms of a problem domain –Programmer can extend framework classes,
1 © Wolfgang Pelz UML3 UML 3 Notations describe how to use reusable software. Package Component Deployment Node.
Object-Oriented Enterprise Application Development Tomcat 3.2 Configuration Last Updated: 03/30/2001.
UPortal Roadmap Patches, evolution, and revolution Andrew Petro, Yale University Eric Dalquist, Unicon.
High Performance Faceted Interfaces Using S2S Eric Rozell, Tetherless World Constellation.
Current Topics in Programming Languages Lecture 15_1 George Koutsogiannakis SUMMER
Tomcat Configuration A Very, Very, Very Brief Overview.
Spring Dynamic Modules. Startlocation: Documentation: /1.2.1/reference/html/
Web Applications Basics. Introduction to Web Web features Clent/Server HTTP HyperText Markup Language URL addresses Web server - a computer program that.
The Spring Framework: A brief introduction to Inversion of Control James Brundege
 Proteus Framework Redefining the plugin. Why a new framework?  Present approaches (e.g. OSGi) use non-standard approaches that create too many breaking.
Agenda Introduction to the Guidewire platform
UPortal 3 – What's New? JA-SIG Conference, Spring 2008 uPortal What's New? Eric Dalquist University of Wisconsin - Madison.
OSGi.
UPortal Developers MIT August 2004 Persistence Strategy for uPortal 3 Mike DeSimone the r-smart group
MAVEN-BLUEMARTINI Yannick Robin. What is maven-bluemartini?  maven-bluemartini is Maven archetypes for Blue Martini projects  Open source project on.
What’s new in Stack 3.2 Michael Youngstrom. Disclaimer This IS a presentation – So sit back and relax Please ask questions.
Magnolia Modules. Architecture Web Application (WAR) Magnolia CoreGUICache Modules DMS 2.3Data 1.1Scheduler Custom Project Base 2.2 Project.
Spring core v3.x Prepared by: Nhan Le. History v3.0 Spring Expression Language Java based bean metadata v3.1 Cache Abstraction Bean Definition Profile.
Dependency Injection in Action Jan Västernäs. CADEC2006, DI, Slide 2 Copyright 2006, Callista Enterprise AB Agenda (DI=Dependency Injection) Background.
Struts2 Plugin Development - Extending Struts2 Justin Yip.
Portlets in uPortal uPortal Domain Objects Portlet Application Deployment Portlet Deployment –Information from portlet.xml file Portlet Application Definition.
CS 603 DCOM April 5, DCOM – What is it? Start with COM – Component Object Model –Language-independent object interface Add interprocess communication.
AppManager Product Status Update David Mount Technical Manager – UK, Ireland & Middle East David Mount Technical Manager – UK, Ireland & Middle East.
Spring Framework. Spring Overview Spring is an open source layered Java/J2EE application framework Created by Rod Johnson Based on book “Expert one-on-one.
Comparing JavaBeans and OSGi Towards an Integration of Two Complementary Component Models HUMBERTO CERVANTES JEAN-MARIE FAVRE 09/02.
OSGi in action BlueDavy
In Pieces Breaking down monolithic applications with Spring-DM and OSGi.
Apache Synapse The small print
Open Service Gateway Initiative (OSGi) Reporter : 林學灝 侯承育 1.
Andrew S. Budarevsky Adaptive Application Data Management Overview.
UPortal 3JA-SIG Summer Conference 2006 uPortal 3.
AEM & TDD It’s so boring… AUGUST 6, 2015
Extending & Customizing XNAT with Modules Rick Herrick
KEW Definitions Document Type The Document Type defines the routing definition and other properties for a set of documents. Each document is an instance.
Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. Spring MVC Essentials Getting started.
Java EE - Dependency Injection -
UPortal 3 RC2 PreviewJA-SIG Conference, Summer 2007 uPortal RC2 Preview Moving on Up Reviewing current work and future plans Standardizing the framework.
JAVA EE 6 Best Practices for Migrating Spring to WTF ?!?
Understand haxejs-angular app How to write app in OOP(Haxe) and Dependency Injection Way(Angular)?
UPortal Roadmap Patches, evolution, and revolution Andrew Petro, Yale University Eric Dalquist, Unicon.
Outline Server side Dependencies Installing it Configuring it Client side coding Browser setup.
Impala A dynamic module framework for Java web development Phil Zoio Realsolve Solutions Devoxx 12 December, 2008.
Remote Method Invocation A Client Server Approach.
Java Programming: Advanced Topics 1 Building Web Applications Chapter 13.
Random Logic l Forum.NET l State Machine Mechanism Forum.NET 1 st Meeting ● December 27, 2005.
Module 9. Dealing with Generalization Course: Refactoring.
Introduction to OSGi +ActorFrame Surya Bahadur Kathayat
Customizing Share Document Previews Will Abson Senior Integrations Engineer and Share Extras Project Lead
Introduction to Inversion Of Control (IOC). IOC Definition (based on Wikipedia)  Consider the way in which an object obtains references to its dependencies.
Creative Commons Attribution- NonCommercial-ShareAlike 2.5 License Sakai Programmer's Café Sakai Montreal CRIM Workshop Introduction to Spring Framework.
Leveraging ColdSpring to build a robust Flex applications Chris Scott, Cynergy Systems.
Enterprise Java Beans. Contents  Understanding EJBs  Practice Section.
Peaberry Stuart McCulloch.
Overall Architecture and Component Model
Project Topic 2: Migration to Java 9
Magento Technical Guidelines Eugene Shakhsuvarov, Software Magento
Servlet API and Lifecycle
Luigi Pampaloni BizTalk Solutions Architect LPYSoft Ltd
How to be a Good Developer
30 Java Applets.
Present by Andie Saizan, MCP
Plug-In Architecture Pattern
Presentation transcript:

Bulding a Modular Application with Coherence David Whitmarsh Independent Contractor Technical Architect Investment Banks

1. Objective Describe a modular architecture using Coherence Applicable to static IoC approach (Spring) Aimed at dynamic modular approach (OSGi/Spring DM)

2. Modularity Spring, Maven, OSGi

Module Dependencies Classpath dependencies Module imports a class/resource from another module Instance dependencies Class instance in one module calls method on a class instance in another.

Module with Spring/Maven All classes/resources in dependent artifacts visible Change module classes only by restart Object instances resolved during ApplicationContext initialisation

Module with Spring DM/OSGi Explicitly exported/imported packages visible Changing module classes reloads dependents Referenced object instances may change while running

3. Vanilla Coherence What support is there for modular design?

Principal Entities

Module Requirements Distinct data service layers Each with own caches and ”DAO” instances Own data models, serialisers, CacheStores, CacheLoaders Independently stopped/started/deployed

What Level? We can build data access modules around: CacheFactoryBuilder Classpath trickery, or embed entire Coherence jar inside module Separate grid node (or even grid) per service Static access ok CacheFactory Distinct configuration files per service Must delegate dependencies (Serialisers, CacheStores) No static access methods Service or Cache Single config across modules – coupling

4. Building Modules Extending and Overriding Coherence default behaviour

Class Dependencies

Instance Dependencies

Distinct Services per Module Ensure that an instance of Service is used only in a single CacheFactory use STRATEGY_VALIDA TION

Static Methods DefaultCacheFactoryBuilder has an internal defaultCacheFactory Static access Don't use CacheFactory.getCache or DefaultCacheFactoryBuilder.getDefaultCacheFactory Use non-static CacheFactory.ensureCache But Coherence itself uses getDefaultCacheFactory! Proxy service Incubation projects Cohql

Hacky Bit #1 Provide a ConfigurableCacheFactory implementation that delegates to the appropriate factory Not all methods need sensible overrides EnsureService – API exists to map service to factory EnsureCache – not so easy

Configuring CacheFactory Configuration needs to come from config module (I disapprove of URL) File resource in config module not on classpath for Coherence module (under OSGi) Provide config as String or InputStream URL used as unique id for config, hence factory Suppress load from URL and use as a simple id

IoC instance injection Provide CacheStore, PofContext by injection XMLHelper only constructs new classes Configure a proxy to delegate to injected instance In an OSGi environment implementations will not be visible in Coherence module. Would prefer config mechanism to use a reference – perhaps a ?

Complete Module Config As per example code Add destroy-method hook to stop factory, remove services on module stop (OSGi) In OSGi, factories can be deployed, started and stopped at any time. Use a separate config module to create a proxy service factory

System Properties Coherence substitutes system properties in config files Apparently read in some static initialiser No way to inject config properties other than setting system properties before they're read.

OSGi Using an OSGi container

Add/Remove Services Coherence module has no classpath dependencies on data models Add, upgrade, remove services without interruption Rolling upgrade on only those services that need to change

Dynamic Data Model 1

Dynamic Data Model 2

Dynamic Data Model 3 All handling of serialisation/persistence delegated via OSGi New versions of data model and data model support deployed and old versions removed without changing cache config/CacheFactory instance Evolvable objects updated in-place No rolling upgrade required