# Graph service platform

[Grab](https://yomu.fyi/company/grab) · Wenxiang Lu · Jan 5, 2023

**Type:** Problem & solution

## Summary

Grab's GrabDefence team required a dedicated graph infrastructure to proactively identify mobile fraud patterns, such as multiple accounts operating on shared physical devices and suspicious financial loops. To address this, the team built a four-layer Platform as a Service that encapsulates graph database operations behind uniform RESTful APIs for OLTP search and OLAP analysis. The architecture utilizes Amazon S3 for raw data files, Amazon Neptune for graph storage, DynamoDB for schema and metadata configurations, and Kafka for streaming ingestion. When users trigger data loading tasks, the service validates entity attributes against schemas stored in DynamoDB before importing records into Neptune. This infrastructure allows investigators to traverse adjacent account IDs and visualize complex entity relationships without managing underlying database runtimes.

## Context

Grab's fraud detection team needed to discover complex data linkages in consumer data to proactively identify malicious behavior, such as shared physical devices across accounts, transaction loops, and money laundering.

## Approach / What changed

Grab built a graph service platform (PaaS) layered over Amazon Neptune, Amazon S3, and DynamoDB, using Kafka for stream ingestion and exposing RESTful APIs for graph management, OLTP search, and OLAP analysis.

## Takeaways

- The graph service synchronizes and validates entity and attribute data against DynamoDB schemas before importing S3 CSV files into Amazon Neptune.
- Using Kafka as a streaming write engine provides primary user authentication while mitigating write pressure on the Neptune database cluster.
- The platform exposes separate RESTful API interfaces for real-time stream search (OLTP) and batch processing graph analysis (OLAP).

**Tags:** [Architecture](https://yomu.fyi/topic/architecture), [AWS](https://yomu.fyi/topic/aws), [Data Pipelines](https://yomu.fyi/topic/data-pipelines), [Kafka](https://yomu.fyi/topic/kafka), [REST APIs](https://yomu.fyi/topic/rest-api)

[Read original post](https://engineering.grab.com/graph-service-platform)
