Porting Spring PetClinic to GigaSpaces

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

1 comments

Comments 1 - 1 of 1 previous next Post a comment

Post a comment
Embed Video
Edit your comment Cancel

1 Favorite

Porting Spring PetClinic to GigaSpaces - Presentation Transcript

  1. Migrating JEE Apps to GigaSpaces Case Analysis – Spring PetClinic Uri Cohen, Product Manager Sept. 24 th , 2008
  2. Agenda
    • Background & Motivation
    • What’s In an App Server
    • Migration in Practice
      • Messaging
      • Data Access
      • Web front end
    • Architectural Considerations
    • Live Demo
  3. Background
    • GigaSpaces as an application server
    • Previous projects to map the migration efforts and gaps
  4. Motivation
    • Feasibility study, learn about:
      • User experience (migration complexity)
      • Gaps between JEE & GigaSpaces
      • Use that as input for next releases planning
    • Share outcome with user community
      • Provide a common basis for compatison
      • “ Here’s how it should be done with GigaSpaces”
  5. What’s In an App Server?
    • Data access
    • Messaging / event processing
    • Remoting
    • TX management
    • Web
  6. Migration in Practice
    • Messaging / event processing
      • Replace MDBs with GigaSpaces event listeners
    • Remoting
      • Replace SLSBs with GigaSpaces SVF (Remoting/Executors)
    • Data access
      • Use GigaSpaces 2 nd cache for Hibernate
      • Convert your DAOs to use GigaSpaces, use mirror to persist
    • TX management
      • Use Spring…
    • Web
      • Use GigaSpaces web processing unit
      • Use GS HTTP session replication
  7. Migration in Practice 1 No No Web (Http Session) 2-3 1 1 Effort (3 is biggest) Yes
    • ORM 2 nd level cache: No
    • DAO: Yes
    Data Access Yes No Remoting Yes Minor to none Messaging Config change Code change Converted Layer
  8. Converting Your Messaging Layer
    • Convert you MDBs to GigaSpaces event containers
    • You can use IMessageConverter on the client side
    • You can use annotations / XML
    • Considerable performance boost
      • Without affinity: up to 3 times faster
      • With affinity: up to 6 times faster
  9. Converting Your Messaging Layer
  10. Converting Your Messaging Layer
  11. Converting Your Remoting Layer
    • Usually implemented by SLSBs with JEE
    • No or minor code changes needed
    • You get:
      • Location transparency
      • Dynamic service discovery
      • Synchronous or asynchronous invocation
      • Cluster wide invocations (Map/Reduce)
      • Data affinity
      • Automatic failover
    • Service Interface
    • Client:
    • Server:
    Converting Your Remoting Layer
  12. Converting Your Data Access Layer
    • Currently this is not effortless
    • 1 st step: Domain model
      • Dealing with relationships
        • Need to change domain model
          • Add foreign key fields, update setter, O/R mappings (if you use mirror)
        • No lazy loading
          • Load on a per case basis, might mean you should change the DAO
        • No object navigation and aggregations in queries
          • Need to query the space multiple times and aggregate
  13. Converting Your Data Access Layer
    • 2 nd Step: Partitioning
      • You should determine how objects will be partitioned
      • May involve duplicating parent routing fields to nested objects
    • 3 rd Step: Changing the DAO
      • Naive approach: Convert all JDBC/Hibernate calls to space calls
      • Better approach: Use Remoting/Executors, take advantage of data affinity and collocation
  14. Converting Your Data Access Layer
    • Other issues:
      • Non String IDs: need to create cluster-wide ID generator
      • No dirty checks: similar to lazy loading, need to persist on a case-by-case basis
      • Semantics:
        • When saving with Hibernate/JPA, generated ID is injected into the object
        • Solve at the DAO level
  15. Architectural Considerations
    • Web app & space in the same PU
      • Partitioned or replicated?
      • Is it really collocation?
      • No dynamic scaling
    • Web app & space in separate PUs
      • Separate scaling models – more flexible
      • No collocation
        • Local cache can help
  16. Let’s See It in Action
  17. Future Roadmap (Suggestions)
    • Object navigation in queries
      • user.address.street=’Oxford’
    • Native aggregate functions
      • max, min, avg, std, custom
    • Relationships
      • JPA support
    • Embedded EJB container?
  18. Q&A

+ uri1803uri1803, 11 months ago

custom

1370 views, 1 favs, 4 embeds more stats

This presentation shows the general methodology of more

More info about this document

© All Rights Reserved

Go to text version

  • Total Views 1370
    • 1126 on SlideShare
    • 244 from embeds
  • Comments 1
  • Favorites 1
  • Downloads 23
Most viewed embeds
  • 229 views on http://www.openspaces.org
  • 13 views on http://openspaces.org
  • 1 views on http://203.208.39.99
  • 1 views on http://72.14.235.132

more

All embeds
  • 229 views on http://www.openspaces.org
  • 13 views on http://openspaces.org
  • 1 views on http://203.208.39.99
  • 1 views on http://72.14.235.132

less

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

Cancel
File a copyright complaint
Having problems? Go to our helpdesk?

Categories