Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Building a production-ready, graph-based enterprise application in the cloud

CELUM set out to develop its own reactive graph driven architecture to provide the best user experience for workrooms.net. Hear our story on how we ventured into the areas of Graph Databases, Data Modelling as well as Reactive Programming and melted them into a graph-centred reactive architecture.

We put it to the test and built our production-ready cloud-based enterprise application atop it. Learn about lofty goals and unexpected surprises that we managed to turn into happy endings. Building upon our experiences will become your edge once you develop your own graph-centric cloud application.

The unique aspects presented are a type-safe query language atop Gremlin available within back-end and front-end, our inheritance-aware data model and the seamless streaming of graph data to the front-end as it becomes available.

Finally, drawing upon these capabilities, we look at Live Queries that notify clients when query results become stale and thus both improve the UX and reduce the system load.

  • Login to see the comments

  • Be the first to like this

Building a production-ready, graph-based enterprise application in the cloud

  1. 1. BUILDING A PRODUCTION-READY, GRAPH-BASED ENTERPRISE APPLICATION IN THE CLOUD RAINER PICHLER, SOFTWARE ARCHITECT https://twitter.com/rainerpichler AN INNOVATION STORY TOLD BY
  2. 2. III. Where we go AN INNOVATION STORY* *inspired by the Gartner Hype Cycle
  3. 3. WHO WE ARE PREFACE
  4. 4. & Turn content into value Change how people collaborate CONTENT HUB AGILE TEAMWORK MANAGEMENT OUR MISSION
  5. 5. OUR CHALLENGES Scale globally Our users are data modelers &
  6. 6. BACK IN 2016
  7. 7. WHAT WE EXPECTED CHAPTER I
  8. 8. OUR EXPECTATIONS Customizability Reactivity Scalability
  9. 9. ESSENTIALS FOR EFFICIENT TEAMWORK Free Trial? Visit workrooms.net!
  10. 10. OUR DOMAIN (EXCERPT) 2.097.152 5.242.880 Fast local navigation Intuitive Data Modelling Load stuff on demand Rainer Rene Catalogue Winter Pictures Products.docx Draft.psd Logo.tiff Bike.tiff moderator moderator 524.288 2.048 Inbox Free Trial? Visit workrooms.net!
  11. 11. WHAT WE GOT CHAPTER II
  12. 12. OUR ARCHITECTURE EB - API ENTITY DATA MODEL PERSISTENCE Domain Service Domain Service Domain Service EB - CLIENT ENTITY DATA MODEL View View View Service Service Service Angular RxJS Flux Graph Database RxJava Vert.x celum.com
  13. 13. FULL-STACK-REACTIVE Channel Database 1 234 5C Query all Workrooms
  14. 14. FULL-STACK-REACTIVE
  15. 15. FULL-STACK-REACTIVE
  16. 16. THE ECOSYSTEM CELUM Persistence Layer JanusGraph Process Apache Cassandra Process 23 16 42 16 23 42 <binary> <binary> <binary> 16 42 23 Apache TinkerPop + Gremlin
  17. 17. MORE DETAILS https://www.youtube.com/watch?v=9ZXCHqip84Q&feat ure=youtu.be&t=1h32m12s Technologieplauscherl 56 (English) Exploring the JanusGraph Database using the Gremlin Query Language
  18. 18. THE CELUM PERSISTENCE LAYER Entity Data Model Query and Modification Language Id=16 16 42 23 8 15 16 23 Result Filter
  19. 19. MODEL DEFINITION
  20. 20. MODEL DEFINITION Eclipse Modeling Framework TypeScript Java PlantUML
  21. 21. MODEL DEFINITION public interface ContentItemType extends AnyEntityType { public static final Name NAME = new Name(); public static final CreationDate CREATIONDATE = new CreationDate(); public static final ModifiedDate MODIFIEDDATE = new ModifiedDate(); /** Description: Determines the primary sort order in the UI */ public static final SortIndex SORTINDEX = new SortIndex();
  22. 22. OUR QUERY AND MODIFICATION LANGUAGE Type-safety Uniform on BE & FECommon functionalities Type inheritance g.V().has("type_folder", "folder")Pure Gremlin:
  23. 23. A QUERY Query<ContentElementType> query = Query.fromEntitiesOfType(FolderType.instance()) .restrict(R.attributeValue(FolderType.NAME, AttributeMatcher.equalTo(“Pictures”))) .followRelationsOfType(ContainerHasElementsRelationType.instance()).build(); Rainer Rene Catalogue Winter Pictures Products.docx Draft.psd Logo.tiff Bike.tiff moderator moderator 524.288 2.048 Inbox g.V().has("type_folder", "folder") .has("name", "Pictures") .out("containerHasElements")
  24. 24. STATIC TYPE SAFETY [Folder] [ContentElement] .followRelationsOfType(ContainerHasElements)Query.fromEntitiesOfType(Folder) .restrict([…]) <File> ID: 42 Name: Logo.tiff <Folder> ID: 23 Name: Pictures <ContainerHasLeafElements> ID: 37 instance of instance of instance of .build() EntityQueryBuilder QueryEntityQueryBuilder Steps [ContainerHasElements]
  25. 25. TYPE MISMATCHES
  26. 26. Channel THE QUERY PIPELINE Split Query Optimize Translate Traverse Emit Security C* Steps Pictures Logo.tiff Bike.tiffPictures Logo.tiff Bike.tiff Gremlin g.V()… Cassandra Query.from…
  27. 27. THE MODIFICATION PIPELINE Optimize Translate Traverse EmitCommit Constraints CRUD Tracking C* Gremlin g.V()… __.sideEffect(traverser -> { if (!allowed(traverser.get())) throw new RuntimeException("Computer says no!"); }); Cassandra Steps Modification.of…
  28. 28. TOOLING The elegance of the query reflects in the mighty CodeMirror.
  29. 29. The result graph becomes visible due to an unsung rendering hero: PlantUML
  30. 30. LEARNINGS Replicate if the use case demands it. Replicate if the use case demands it. Replicate if the use case demands it.
  31. 31. LEARNINGS Relations as First Class Citizens ✔ ✘ ✘ ✘
  32. 32. LEARNINGS Granularity of Results
  33. 33. LEARNINGS Write once, run anywhere? CELUM Persistence Layer JanusGraph Custom Java Code Arbitrary Gremlin Server CELUM Persistence Layer Pure Gremlin?
  34. 34. WHERE WE GO CHAPTER III
  35. 35. Constraints & Clean-ups Controlled Redundancy Schema Evolution Model is Key
  36. 36. UPCOMING: LIVE QUERIES Goal: UI always up-to-date Live Queries in the CELUM Reactive Server Platform Master Thesis by Florian Latifi (florian.latifi@jku.at) Johannes Kepler University Linz We will blog about it on celum.com
  37. 37. And CELUM keeps extending its platform. Always ahead. * The End *

×