Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Neo4J: A Case Study

0b2600a627d0af06ca6bbf9abe4067af?s=47 James Hughes
November 28, 2012

Neo4J: A Case Study

A look at how the Department of International Development for the UK Government has used Neo4J in their aid transparency program

0b2600a627d0af06ca6bbf9abe4067af?s=128

James Hughes

November 28, 2012
Tweet

More Decks by James Hughes

Other Decks in Technology

Transcript

  1. or preaching to the converted the things I do for

    free beer neo4j or a case study
  2. Background

  3. Github Twitter Blog Me RKS_FOR

  4. Github Twitter Blog Me RKS_FOR kouphax

  5. Github Twitter Blog Me kouphax http://yobriefca.se RKS_FOR

  6. Github Twitter Blog Me http://yobriefca.se @kouphax RKS_FOR kouphax

  7. Kainos Githu Twitt Blog Me WORKS_FOR LVED_WITH

  8. Kainos WORKS_FOR GDS INVOLVED_WITH s y TEAM_WITHIN

  9. GDS INVOLVED_WIT ERTP Innovations Licensify TEAM_WITHIN

  10. GDS ERTP Innovations Licensify Cab Off. TEAM_WITHIN RTMENT_OF INVOLVED_WIT

  11. Cab Off. TEAM_WITHIN Gov. DEPARTMENT_OF RTMENT_OF

  12. Gov. DEPARTMENT_O DFID DEPARTMENT_OF PUBLISHES_TO WORK_WITH

  13. PUBLISHES_TO IATI

  14. Gov. DEPARTMENT_O DFID DEPARTMENT_OF PUBLISHES_TO WORK_WITH

  15. DFID DEPARTMENT_O PUBLISHES_TO WON_WORK_WITH Kainos RKS_FOR

  16. Kainos WORKS_FOR Me WON_WORK_WIT W_RELATED

  17. WORKS_FOR Me SOMEHOW_RELATED Me

  18. Aid Platform

  19. The ability to trace all money spent through its entire

    journey from source to its final destination
  20. IATI XML DFID Website DFID Systems DFID Systems DFID Systems

  21. X Aid Platform IATI XML DFID Systems DFID Systems DFID

    Systems
  22. Aid Platform IATI XML IATI XML IATI XML IATI XML

    IATI XML IATI XML IATI XML
  23. The Solution

  24. Data Access Data Loader JVM/Scala Play! 2 jQuery/D3 Persistence TileStream

    Leaflet IATI XML IATI XML
  25. Region Country Organisation Budget Project Component Transaction Disbursement Location Results

    Document
  26. #1 hell is other people’s api

  27. OIPA API JVM/Scala Play! 2 jQuery/D3 MySQL TileStream Leaflet IATI

    XML IATI XML
  28. #2 relational databases are a lie

  29. Anorm/Migrations Data Loader JVM/Scala Play! 2 jQuery/D3 PostgreSQL TileStream Leaflet

    IATI XML IATI XML
  30. #3 once you go graph...

  31. Neo4J Data Loader JVM/Scala Play! 2 jQuery/D3 TileStream Leaflet IATI

    XML IATI XML
  32. val org = createNode(orgModel) val country = createNode(countryModel) org -->

    “HAS_RECIPIENT_COUNTRY” --> country neo4j-scala
  33. val index = getNodeIndex("activity").get val node = index.get("id",id).getSingle val budgets

    = node.doTraverse[Budget]( follow ->- “HAS_BUDGET” ){ END_OF_GRAPH }{ ALL_BUT_START_NODE } neo4j-scala
  34. query[Node](""" | START global=node(0) | MATCH global-[:IS_SUB_LOCATION]->location<-[:IS_REC | RETURN DISTINCT

    n | ORDER BY n.projectBudget desc | LIMIT 5 """.stripMargin).map(_.toCC[Activity]) neo4j-scala
  35. The Future

  36. C’est Fini Slides and Resources http://yobriefca.se