Social Network Facebook Linkedin Recommendation You may also
� 景 • Social Network • Facebook / Linkedin
� 景 • Recommendation • “You may also like…” • “People you may know …”
� 景 • Fraud detection • First-party bank fraud/Insurance fraud/e. Commerce fraud
� 景 • Workflow engine • Access control • …
� 景 Graph Query Response Time = ƒ(graph density, graph size, query degree) • graph density: avg. (relations per node) • graph size: ∑(node) • query degree: hops per query
� 型 • Orient. DB • 缺少批量写,从DB文件加�并初始化非常慢 • 在 200 M+�点后写瓶� • 不健壮不�定 • CEO不靠� http: //orientdbleaks. blogspot. com/ 2015/06/the-orientdb-issues-that-made-us-giveup. html
� 型 • Titan • 更像是API layer,可� backend engine, Cassandra、HBase、BDB和Elastic. Search • ACID不完�,依� backend engine • Key index使用限制�多 • 缺乏客�案例 • Dev freeze
� 型 The last man standing, and the winner is
Neo 4 j
Neo 4 j • • • Schema-free with labeled property Fast graph traversal(~2 M/s) Written in Java Full ACID compliant Full/incremental online backup HTTP API or embedded in JVM Powerful declarative query language Cache(chunk) based sharding Linearly scalable read, M-S replication, fault-tolerance Plugins & extensions …
Neo 4 j
Neo 4 j • Distributed • replication • fault tolerance • scalability • consistency
Neo 4 j • Cluster Management • member join/leave/heartbeat • Failover • election • status propagation • Replication • distributed lock • transaction pull/push
Neo 4 j • Multi-Paxos algorithm • less complex and testable • Ready for cluster Management and election
Neo 4 j • Multi-Paxos algorithm • less complex and testable • Ready for cluster Management and election
Neo 4 j • Multi-Paxos algorithm • less complex and testable • Ready for cluster Management and election
Neo 4 j • Multi-Paxos algorithm • less complex and testable • Ready for cluster Management and election
Neo 4 j • All transactions are committed on the master • eventually applied to the slaves • eventuality defined by update interval • When writing on a slave • lock coordinated through the master • transaction buffered on the slave • applied on the master to obtain txid • applied to the slaves
Neo 4 j • Deployment
Neo 4 j • Deployment
改造和� 化 • GC�� • G 1收集器 • adaptive • JFR+JMC • on-flight • visualized • insignificant performance overhead
改造和� 化 • ��,�� • Jetty+Jersey serve HTTP request/response • poor performance • 数据 • JSON(jackson streaming) • serialization overhead • Plugin/Extension • Plugin • Unmanaged extension(JAX-RS) • Kernel extension(no constraint)
改造和� 化 Neo 4 j Standalone Server HTTP Jetty Server Unmanaged Extension JAX-RS Kernel Extension NIO HTTP Websocket ? Server JSON Protobuf Msg. Pack
斤特性 • Bolt: Streaming binary protocol • TCP persistent oriented • Pack. Stream
斤特性 • Paxos->Raft • Paxos made moderately complex • more than “eventual consistency”, causal consistency
斤特性 • New cluster • Core servers提供�等的多主�构 ,Replica servers只�只参与复制 • Bolt+driver内置��均衡的能力 • Specify guarantees around query visibility • Stateful bookmark
斤特性 • New cluster • Core servers提 servers只�只参 供�等的多主�构, Replica • Bolt+driver内置 与复制 • Specify guarant��均衡的能力 ees around query visibility • Stateful bookmark
斤特性 • Security enhancement • role-based authorization • support LDAP/Active Directory • Kernel/storage improvement • space compaction • automatic execution guard • Administrative tools • …
- Slides: 46