trying to solve IT problems

How I tried to fix certain programming problems, mostly in the java, JEE, JBoss scene, web area and using Ubuntu or Debian linux.

  • Home
  • Geomajas / GIS
  • About
Twitter RSS
Category Archives: jboss

JBoss maven repository, Paul Gier and John Casey

Posted on June 25, 2010 by joachim
No Comments

JBossWorld Boston notes, JBoss maven repository, Paul Gier and John Casey

Good news, the jboss.org maven repository refactoring is complete, bad is that the JBoss products have no maven repository, but working on it.

Maven repository is a file server with a standard layout, there are two types, release and snapshot repository.

Why use a repository
- store dependencies outside of project
- central location for build artifacts, find and re-use, single storage to manage
- manage dependencies

Configuring maven repositories
- super POM, adds central repository automatically to all builds
- add custom repositories in your project POM (you could override central by redefining the repository with id “central”)
- maven settings
– global: M2_HOME/conf/settings.xml
– user: ~/.m2/settings.xml
– profiles

Maven also uses repositories defined in the dependency poms.

Taking control :
- check effective pom : mvn help:effective-pom
- which does not show dependency repositories
- use user settings.xml
- use mirror settings for more control

Mirror settings in settings.xml

<mirror>
  <id>superfast</id>
  <mirrorOf>central</mirrorOf>
  <name>Fast mirror of central</name>
  <url>http://superfast.org/maven2</url>
</mirror>

Or replace all…

<mirror>
  <id>superfast</id>
  <mirrorOf>*</mirrorOf>
  <name>Fast mirror of central</name>
  <url>http://superfast.org/maven2</url>
</mirror>

Maven repository managers
- web server providing maven repositories
- real, proxy, virtual repositories
- pom validation
- products: archiva, artifactory, nexus

Rebuilding jboss.org repository
- old two servers, one for releases, one for snapshots
- problems
– deployment over SVN
– manual uploading thirdparty jars
– manual search indexing
– bad artifacts
– no staging

Goals for new repository
- sort out good from bad
- split in several parts, jboss.org, copied, bad artifacts
- improved deployment/releases
- automated validation/cleanup

Improving the repository
- single public group for all builds
- allow standard http for public group
- use repositories in POMs during development, stricter settings during QA and release
- don’t require authentication for downloads

Dependency management

Scoping
- compile
- provided: not part of final build
- runtime: provided at runtime, but not during compile time
- test: only for testing

Dependency resolution
- provided dependencies in dependent projects are not included as dependency in main project!

Shared dependencies
- parent POMs are ideal for consolidating dependencies -> dependencyManagement
- dependencyManagement : parent defines GAV, child only defines groupId and artifactId, rest is copied

Publishing shared dependencies
- Bill-of-materials POM (BOMs)
- shared dependencyManagement section in POM
- use dependencymanagement and declare pom using scope “import”
- publish coordinated dependency sets
- new platform version -> change BOM version

When things go wrong: upstream polluters
- add exclusions in your dependency for unwanted transitive dependencies
- version conflicts : maven prefers the nearest declaration
- “mvn dependency:analyze” tries to find what is declared and not used or used and not declared

Plans for maven product repository
- publish JBoss products in maven repository format
– support artifacts for product builds
– provide EXACT artifacts used in product distributions
– harness product build to populate repository
- minimize pain of switching from community version
- code ownership

Audit trail
- certification of build process and resulting product
- preserve unbroken chain of custody from source code to running software

Certified binaries
- preserve information about every step from source to binary
- secure all steps and machinery used
- build outputs signed
- restricted network access

Coordinate design
- preserve groupId and artifactId from community, changing would require dependency exclusions
- coordinate has to be different
- visual cue, add “-redhat” in version”

How : use BOM, will require maven 3 to work properly

Categories: java, jboss, maven

Using Infinispan for high availability, extreme performance, Manik Surtani & Galder Zamarreño

Posted on June 24, 2010 by joachim
1 Comment

JBoss World Boston notes, Using Infinispan for high availability, extreme performance, Manik Surtani & Galder Zamarreño

Infinispan as…
in memory object cache
… clustering/high availability toolkit
… clustered in-memory cache
… in-memory data grid
… cloud ready data store

Local, in-memory object cache
- performance booster
- good when data is hard to calculate, expensive to retrieve or frequently accessed

Better than hashmap
- better concurrency
- built-in eviction
- overflow to disk
- warm start, preloading
- events, notifications
- highly configurable locking strategies
- JTA compatible
- JMX monitoring

Tips and tricks
- use eviction, low-cost boudnedd container, recency based: LIRS
- tune for read-heavy, use lock-striping, READ_COMMITTED is often sufficient
- pre-loading can be expensive

Clustering toolkit
- High availability
- fail-over
- scale-out
- uses self-discovery, self-healing

Tips and tricks
- strive for session affinity, very valid optimization, will allow fo async communication
- replicated mode vs distribution? Depend on cluster size
- distribution: co-locate related state
- pre-loading, state transfer not necessary, use a ClusterCacheLoader

Clustered in-memory cache
- performance booster
- similar to local cache
- cluster-aware
- more shared-cache space

Writing data in cache, use putForeExternalRead() vs put()
- update cache state vs update “real” state
- fail-fast instead of lock
- fail quietly instead of throw exception
- does not affect transaction

Tips and tricks
- same as local cache
- putForExternalRead() API
- use invalidation clustered mode
– very efficient: only keys on the wire
– async communication helps even more
- replication can be used
– if cluster is small and data cached is small
– overall data volume can be contained in a single node

In-memory data grid
- multiple access mechanisms
- embedded: P2P
- client/server: REST, memcached, HotRod
- familiar APIs
– cache API
– upcoming JPA-like API
- Queryability

FADE: Fast, Available, Distributed, Elactic

Tips and tricks
- session affinity is nice to have
- async communication and eventual consistency
- use distributed mode, replicated will work to a limit
- tune performance vs durability, numOwners
- dedicated data tier helps you build stateless, elastic application tier
- HotRod: most efficient endpoint

Cloud-ready data store
- RDBMS in inelastic, single point of failure
- data grid deals with transience, is elastic, scalable, distributed
- API is key

Tips and tricks
- asme as data grids
- REST: use load balancer
- use a transport that does not use multicast (not supported on something like EC2)

Categories: architecture, java, jboss

JBoss BPM Past, Present & Future, John Graham

Posted on June 24, 2010 by joachim
No Comments

JBoss World Boston notes, JBoss BPM Past, Present & Future, John Graham

Past :

jBPM
- based on jPDL
- deployments : stand-alone, SOA-Platform, Seam
- jBPM 3, exising, stable
- jBPM 4, improved system, community effort

drools
- business rules
- BPM in drools flow

Riftsaw
- WS-BPEL 2.0
- based on Apache ODE
- release 2.1
- integration with SOA

Savara
- WS-CDL : choreography description language
- Pi calculus
- testable architecture, development validation, execution governance
- BPMN 2 work in progress

Present :

- Perspectives : rules-based, process-based, SOA-driven
- Need to integrate
- Need to avoid overlap
- Enable emergent usage
- Where to go?

jBPM 4 and drools flow are integrating and will be jBPM 5 which should be available in 2011

Key characteristics
- Business process engine
– BPMN2 native execution
– lightweight, embeddable
– generic process engine
- Full life cycle support
- Higher-level, domain-specific processes
- Powerful business rules and vent processing integration

BPMN 2.0
- OMG standard
– graphical notation
– process definition format
– execution semantics
- extensible
- interoperability

Generic process engine
- persistence
- transactions
- times
- expression dialects
- multi-threading
- events
- commands + interceptors
- session management

Future :

jBPM roadmap
- currently under community review
- more details soon
- 5.0 focus now on core components, should be ready by the end of the year
- regular (2-3 month) releases after that

Adaptive processes
- ability to handle change, complexity, …

How
- Externalise logic as rules

Categories: architecture, java, jboss
Previous Entries
  • Recent Posts

    • December BeJUG notes: Let’s make this test suite run faster
    • MagdaGeo sample
    • Geomajas GIS framework 2011 roundup
    • Routing demo at FOSS4G Denver
    • Using UnboundID to authenticate against an LDAP server
  • Recent Comments

    • javaLearner on CXF ws client, dynamic endpoint and loading WSDL from the classpath
    • Geomajas GIS framework 2011 roundup « trying to solve IT problems on Routing demo at FOSS4G Denver
    • Sumant on delete windows service account
    • asme standards on Using Infinispan for high availability, extreme performance, Manik Surtani & Galder Zamarreño
    • Terry on Using UnboundID to authenticate against an LDAP server
  • Categories

    • architecture
    • competencies
    • equanda
    • geomajas / GIS
    • java
    • jboss
    • maven
    • semantics
    • tapestry5
    • ubuntu / debian / linux
    • Uncategorized
    • web development
    • web services
© trying to solve IT problems. Proudly Powered by WordPress | Nest Theme by YChong