Neo4j High Performance
eBook - ePub

Neo4j High Performance

Sonal Raj

Condividi libro
  1. 192 pagine
  2. English
  3. ePUB (disponibile sull'app)
  4. Disponibile su iOS e Android
eBook - ePub

Neo4j High Performance

Sonal Raj

Dettagli del libro
Anteprima del libro
Indice dei contenuti
Citazioni

Domande frequenti

Come faccio ad annullare l'abbonamento?
È semplicissimo: basta accedere alla sezione Account nelle Impostazioni e cliccare su "Annulla abbonamento". Dopo la cancellazione, l'abbonamento rimarrà attivo per il periodo rimanente già pagato. Per maggiori informazioni, clicca qui
È possibile scaricare libri? Se sì, come?
Al momento è possibile scaricare tramite l'app tutti i nostri libri ePub mobile-friendly. Anche la maggior parte dei nostri PDF è scaricabile e stiamo lavorando per rendere disponibile quanto prima il download di tutti gli altri file. Per maggiori informazioni, clicca qui
Che differenza c'è tra i piani?
Entrambi i piani ti danno accesso illimitato alla libreria e a tutte le funzionalità di Perlego. Le uniche differenze sono il prezzo e il periodo di abbonamento: con il piano annuale risparmierai circa il 30% rispetto a 12 rate con quello mensile.
Cos'è Perlego?
Perlego è un servizio di abbonamento a testi accademici, che ti permette di accedere a un'intera libreria online a un prezzo inferiore rispetto a quello che pagheresti per acquistare un singolo libro al mese. Con oltre 1 milione di testi suddivisi in più di 1.000 categorie, troverai sicuramente ciò che fa per te! Per maggiori informazioni, clicca qui.
Perlego supporta la sintesi vocale?
Cerca l'icona Sintesi vocale nel prossimo libro che leggerai per verificare se è possibile riprodurre l'audio. Questo strumento permette di leggere il testo a voce alta, evidenziandolo man mano che la lettura procede. Puoi aumentare o diminuire la velocità della sintesi vocale, oppure sospendere la riproduzione. Per maggiori informazioni, clicca qui.
Neo4j High Performance è disponibile online in formato PDF/ePub?
Sì, puoi accedere a Neo4j High Performance di Sonal Raj in formato PDF e/o ePub, così come ad altri libri molto apprezzati nelle sezioni relative a Informatik e Programmierung in Java. Scopri oltre 1 milione di libri disponibili nel nostro catalogo.

Informazioni

Anno
2015
ISBN
9781783555154

Neo4j High Performance


Table of Contents

Neo4j High Performance
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Getting Started with Neo4j
Graphs and their utilities
Introducing NoSQL databases
Dynamic schemas
Automatic sharding
Built-in caching
Replication
Types of NoSQL databases
Key-value stores
Column family stores
Document databases
Graph databases
Graph compute engines
The Neo4j graph database
ACID compliance
Characteristics of Neo4j
The basic CRUD operations
The Neo4j setup and configurations
Modes of setup – the embedded mode
Modes of setup – the server mode
Neo4j high availability
Machine #1 – neo4j-01.local
Machine #2 – neo4j-02.local
Machine #3 – neo4j-03.local
Configure Neo4j for Amazon clusters
Cloud deployment with Azure
Summary
2. Querying and Indexing in Neo4j
The Neo4j interface
Running Cypher queries
Visualization of results
Introduction to Cypher
Cypher graph operations
Cypher clauses
More useful clauses
Advanced Cypher tricks
Query optimizations
Graph model optimizations
Gremlin – an overview
Indexing in Neo4j
Manual and automatic indexing
Schema-based indexing
Indexing benefits and trade-offs
Migration techniques for SQL users
Handling dual data stores
Analyzing the model
Initial import
Keeping data in sync
The result
Useful code snippets
Importing data to Neo4j
Exporting data from Neo4j
Summary
3. Efficient Data Modeling with Graphs
Data models
The aggregated data model
Connected data models
Property graphs
Design constraints in Neo4j
Graph modeling techniques
Aggregation in graphs
Graphs for adjacency lists
Materialized paths
Modeling with nested sets
Flattening with ordered field names
Schema design patterns
Hyper edges
Implementing linked lists
Complex similarity computations
Route generation algorithms
Modeling across multiple domains
Summary
4. Neo4j for High-volume Applications
Graph processing
Big data and graphs
Processing with Hadoop or Neo4j
Managing transactions
Deadlock handling
Uniqueness of entities
Events for transactions
The graphalgo package
Introduction to Spring Data Neo4j
Summary
5. Testing and Scaling Neo4j Applications
Testing Neo4j applications
Unit testing
Using the Java API
GraphUnit-based unit testing
Unit testing an embedded database
Unit testing a Neo4J server
Performance testing
Benchmarking performance with Gatling
Scaling Neo4j applications
Summary
6. Neo4j Internals
Introduction to Neo4j internals
Working of your code
Node and relationship management
Implementation specifics
Storage for properties
The storage structure
Migrating to the new storage
Caching internals
Cache types
AdaptiveCacheManager
Transactions
The Write Ahead log
Detecting deadlocks
RWLock
RAGManager
LockManager
Commands
High availability
HA and the need for a master
The master election
Summary
7. Administering Neo4j
Interfacing with the tools and frameworks
Using Neo4j for PHP developers
The JavaScript Neo4j adapter
Neo4j with Python
Admin tricks
Server configuration
JVM configurations
Caches
Memory mapped I/O configuration
Traversal speed optimization example
Batch insert example
Neo4j server logging
Server logging configurations
HTTP logging configurations
Garbage collection logging
Logical logs
Open file size limit on Linux
Neo4j server security
Port and remote connection security
Support for HTTPS
Server authorization rules
Setup server authorization rules enforcement
Security rules targeting with wildcards
Other security options
Summary
8. Use Case – Similarity-based Recommendation System
The why and how of recommendations
Collaborative filtering
Content-based filtering
The hybrid approach
Building a recommendation system
Recommendations on map data
Visualization of graphs
Summary
Index

Neo4j High Performance

Copyright © 2015 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: February 2015
Production reference: 1250215
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78355-515-4
www.packtpub.com

Credits

Author
Sonal Raj
Reviewers
Roar Flolo
Dave Meehan
Kailash Nadh
Commissioning Editor
Kunal Parikh
Acquisition Editor
Shaon Basu
Content Development Editor
Akshay Nair
Technical Editor
Faisal Siddiqui
Copy Editors
Deepa Nambiar
Ashwati Thampi
Project Coordinator
Mary Alex
Proofreaders
Simran Bhogal
Maria Gould
Ameesha Green
Kevin McGowan
Jonathan Todd
Indexer
Hemangini Bari
Graphics
Abhinash Sahu
Valentina Dsilva
Production Coordinator
Alwin Roy
Cover Work
Alwin Roy

About the Author

Sonal Raj is a hacker, Pythonista, big data believer, and a technology dreamer. He has a passion for design and is an artist at heart. He blogs about technology, design, and gadgets at http://www.sonalraj.com/. When not working on projects, he can be found traveling, stargazing, or reading.
He has pursued engineering in computer science and loves to work on community projects. He has been a research fellow at SERC, IISc, Bangalore, and taken up projects on graph computations using Neo4j and Storm. Sonal has been a speaker at PyCon India and local meetups on Neo4j and has also published articles and research papers in leading magazines and international journals. He has contributed to several open source projects.
Presently, Sonal works at Goldman Sachs. Prior to this, he worked at Sigmoid Analytics, a start-up where he was actively involved in the development of machine learning frameworks, NoSQL databases, including Mongo DB and streaming using technologies such as Apache Spark.

Indice dei contenuti