Klikk på tall for å vise stripe
Toon 1Toon 2Toon 3Toon 4Toon 5Toon 6Toon 7Toon 8Toon 9Toon 10 JavaZone JavaZone

Managing one-to-too-many relations in rich domain models

88dd106c-94d3-44cf-9b6a-f7b4ef552b3c
View video  Presentation
Abstract:
Domain Driven Design with Object-Relational mapping is the state of the art for testable object oriented programming in domains with complex business rules. However, sometimes the domain contains natural relations and object graphs that are too large to fit in main memory. Even when you have sufficient memory, working with large object graphs that are naively OR-mapped can easily give you performance problems. Bjørn Bjerkeli and Eirik Maus present a few techniques they've used at BBS to handle the one-to-too-many-relations (almost) without sacrificing working on a pure domain model. These include domain object fields based on database queries, iterators that "page" entities in and out of memory and simplified methods for background fragment processing.
Outline:
  • Problem description
  • Relations and collections with Object-Relational Mapping libraries (Hibernate)
  • Fix for "running out of time": avoiding needless lazy-loading of large relation set for simple summation
  • Fix for running out of memory: Paged Iterations / moving objects out of memory again
  • Fix for running out of both time and memory: background fragment processing
  • Things we haven't tried yet that we think might work
  • Summary
Duration:
50 + 10 min
Language:
The talk can be given in english or norwegian. Slides in english
Level:
Intermediate
Required experience:
Prior exposure to SQL databases and Object Relational mapping is recommended
Expected audience:
Developers and solution architects
  • Photo of Eirik Maus
    Eirik Maus
    Eirik Maus is just a programmer at BBS. He has worked with Bjørn Bjerkeli and several other Javazone speakers on a large project there.
  • Photo of Bjørn Bjerkeli
    Bjørn Bjerkeli
    Bjørn Bjerkeli currently works as a Senior Consultant in Zenior AS, a Norwegian consulting company. Bjørn has been implementing large-scale distributed systems in Java for insurance companies, banks and major European telecom providers since 1997. He has been working for companies like Nokia and Sybase among others. Although Bjørn often spends much of his time in design and mentoring, he enjoys it when he is engaged in serious coding and development. Bjørn has been member of the program committee for the last three years and is a board member of javaBin. Bjørn writes about his experiences at: http://devperspective.blogspot.com/