How apache/geode-native works
Project type and purpose
• This is “Apache Geode Native”: a native‐client library implementation for Apache Geode providing C++ and .NET APIs that speak the Geode wire protocol without requiring Java.
• It ships two first‐class language bindings:
• cppcache – the C++ API layer and core protocol implementation
• clicache – the .NET (C#) CLI wrapper around the native C++ core
Top-level architecture components
A. Application Layer
• Consumer code (examples/, tests/, user applications) written in C++ or C#
B. Language Bindings / API Layer
1. cppcache
– Public headers in include/geode/
– Implementation in src/ (Cache, Region, Query, Pdx, Pool, etc.)
2. clicache
– Managed wrapper (C++/CLI) that exposes the native core to .NET
– Adapter classes in clicache/src/impl/ bridging managed ↔ unmanaged
C. Core Protocol & Transport
• TcrConnection, TcrDistributionManager, ThinClient* modules (in cppcache/src/)
• Message encoding/decoding under tools/gnmsg and in the core
• SSL/TCP sockets (TcpConn, TcpSslConn)
D. Serialization & PDX subsystem
• PdxReader/Writer, DataSerializable, TypeRegistry modules
E. Build & Packaging
• CMakeLists.txt at top and per-module (clicache/, cppcache/, tests/, examples/)
• ci/ and docker/ for CI pipelines and container images
• packer/ for VM build recipes
F. Documentation & Examples
• docs/ for static site, API references, user guides
• examples/ for code samples in C++, .NET, Java utilities
G. Test & Validation
• cppunit/gtest-based unit tests under cppcache/test/ and clicache/test/
• integration tests under cppcache/integration-test/ and clicache/integration-test/
• acceptance & performance benchmarks under acceptance-test/ and benchmark/
Relationships & interactions
• Build and CI components feed into packaging and publish artifacts
Architectural patterns & design principles
• Layered architecture: clear separation between public API, protocol core, and transport
• Adapter/Facade pattern: clicache wraps and adapts the native C++ core to .NET
• Modularity: each concern (serialization, networking, transaction, query) packaged into its own sub-directory and CMake target
Essential elements without over-splitting
• Small modules into logical blocks (e.g., “Networking”, “Serialization”, “PDX subsystem”)
• Language-binding modules side-by-side to reflect parity
• CI & Docker as “infrastructure” on the perimeter