Uploaded on

Topiconf 2007

Topiconf 2007

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
567
On Slideshare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
Downloads
0
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. (N)Hibernate Shards Topicus & (Distributed) Databases
  • 2. Wattes?
    • "You can't always put all your relational data in a single relational database. Sometimes you simply have too much data... Whatever your reasons, talking to multiple relational databases inevitably complicates the development of your application.“
    • http://www.hibernate.org/414.html
    07-06-09
  • 3. Hibernate Shards
    • Standard Hibernate programming model
    • Flexible sharding strategies
      • ShardAccessStrategy
      • ShardResolutionStrategy
      • ShardSelectionStrategy
    • Support for virtual shards (Resharding)
    • Free/open source
    07-06-09
  • 4. Hibernate Shards
    • Hibernate + Shards
    •  
    • ShardedSession
    • ShardedSessionFactory
    • ShardedCriteria
    • ShardedQuery
    • Hibernate
    • Session
    • SessionFactory
    • Criteria
    • Query
    1 2 1
  • 5. Recipe for Hibernate Shards
    • Definieer de shards in de configuratie
    • Definieer de Id generator in mappings
      • ShardedTableHiLoGenerator
      • ShardedUUIDGenerator
    • Instantieer de ShardStrategyFactory
    • Gebruik de sharded factory op de plaats van de gewone
  • 6. Distributed?
    • Virtual Shards (Gevaarlijk!)
    • Welk object moet waar?
    • Wat moeten we doen als we mappings aan moeten passen??
    • Tip: Vooraf extra virtual shards
  • 7. Nadelen
    • Id generatie werkt niet via JPA
    • A en B (met een relatie tussen elkaar) mogen niet op aparte shards leven.
    • Base types niet als identifier
    • Replicated data alleen read-only.
    • Sorteren in criteria kan niet
    • Geen HQL.
  • 8. Vragen
    • ?
    07-06-09