Skip to content

Chapter NOSQL outline

Aslak Knutsen edited this page Jul 1, 2013 · 6 revisions

Use Case / Requirements

  • Data storage backend

  • Domain model

    • Attachment

As a User I should be able to Add/Change/Delete an Attachment
  • Relation

As a User I should be able to Add/Delete an Attachment to a Conference

As a User I should be able to Add/Delete an Attachment to a Session

As a User I should be able to SPEAK a Conference

As a User I should be able to ATTEND a Conference

Background

Infinispan

  • What is a Key/Value Store

    • Hash key

      • Massive scale DataGrid

      • Map/Reduce

      • Search backed by Lucense Index

  • What is the 'Cache'

    • JSR-xxx and how it relates to Infinispan

  • How to configure a Cache

    • Local/Remote, Sync/Async replication

  • How to use it?

    • What is it good for?

    • Mapping of data

      • Hibernate OGM ?

Neo4J

  • What is a Graph DataBase

    • Good for storing relations

      • Ad-hoc relations

    • Fast to query recursive relations

      • Friends friends etc..

    • Search backed by Lucense Index

Implementation

  • Infinispan

    • AttachmentRepository JTA EJB backed by Infinispan Cache

    • Cache produced via CDI @Produces

  • Neo4J

    • RelationRepository backed by CDI bean

    • GraphDatabaseService produced via CDI @Produces

    • Stores the social graph from Twitter

    • Stores relations between domains

      • A User can attend a Conference

      • A User can speak in a Session

      • An Attachment can be attached to a Conference

Requirement Test Scenarios

Overview

  • Store data

  • Get data

  • Update data

Setup

Domain Attachment

  • org.cedj.geekseek.domain.attachment.test.integration

  • ShrinkWrap Resolver to fetch external dependencies

  • Uses real Infinispan backend

Store

Update

Delete

Domain Relation

  • org.cedj.geekseek.domain.relation.test.integration

  • ShrinkWrap Resolver to fetch external dependencies

  • Rely on the core building blocks of Repository and Identifiable

    • Test Doubles for Identifiables and Repositories

      • SourceObject, Sourcerepository

      • Avoids direct dependencies on the other modules

  • Uses real neo4j backend

Store

Delete

Graph

Clone this wiki locally