You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Shop Datacenter Shim Service is an N-Tier Java Spring Boot application that simulates a traditional on-premises retail system deployed in a datacenter environment. This service demonstrates hybrid cloud-on-premises integration by acting as a shim that bridges local shop purchases to cloud checkout services.
3
+
The Shop Datacenter Shim Service is an N-Tier Java Spring Boot application that simulates a traditional on-premises retail system deployed in a datacenter environment. This service demonstrates hybrid cloud-on-premises integration by acting as a shim that bridges local shop purchases to cloud checkout services.
4
4
5
-
## Architecture
5
+
**NOTE:** This demo is an addition to an existing Astronomy Shop Demo and expects a deployment of such in the same k8s cluster
6
6
7
-
This service follows traditional enterprise N-Tier architecture:
7
+
## Demo Use Case
8
8
9
-
-**Presentation Layer**: REST controllers for shop transaction APIs
10
-
-**Business Layer**: Service classes handling local validation and cloud integration
11
-
-**Data Layer**: JPA repositories with PostgreSQL for local transaction storage
12
-
-**Integration Layer**: gRPC client for calling cloud checkout services
9
+
This service demonstrates a real-world hybrid architecture scenario:
10
+
11
+
-**On-Premises Reality**: Traditional retail POS systems deployed in datacenters
12
+
-**Cloud Integration**: Modern checkout and payment processing in the cloud
13
+
-**Monitoring Bridge**: Shows how enterprises monitor hybrid architectures
14
+
-**Technology Evolution**: Traditional Java/DB architecture calling modern microservices
15
+
16
+
## Demo Features & Intentional Errors
13
17
14
-
## Key Features
18
+
### Intentional Jackson Serialization Errors
19
+
The service includes **intentional Jackson serialization errors** on the transaction status endpoint (`GET /api/shop/transaction/{transactionId}`) to demonstrate real-world error scenarios:
15
20
16
-
-**On-Premises Retail Simulation**: Mimics traditional datacenter-deployed point-of-sale systems
17
-
-**Cloud Integration**: Makes gRPC calls to cloud-hosted checkout service
18
-
-**Dual Instrumentation**: Supports both AppDynamics (traditional) and Splunk Observability (modern)
19
-
-**Enterprise Patterns**: Follows traditional enterprise Java patterns with database persistence
20
-
-**Async Processing**: Background processing with transaction state management
- ✅ Background transaction processing and database persistence
24
+
- ✅ gRPC calls to cloud checkout service
25
+
26
+
### Business Context
27
+
- Local shop systems handle inventory, pricing, customer data
28
+
- Cloud services provide scalable checkout, payment, and fulfillment
29
+
- Dual monitoring shows both AppDynamics and Splunk Observability
30
+
- Demonstrates enterprise modernization patterns
22
31
23
32
## Environment Configuration
24
33
25
34
### Deployment Environment
35
+
**NOTE:** These new services will be in a separate environment from your Astronomy Shop Demo. Filter to both environments to see the entire service map.
26
36
-`deployment.environment.name`: `datacenter-b01`
27
37
-`service.namespace`: `datacenter`
28
38
- Network: Separate datacenter network (172.20.0.0/16) with bridge to cloud services
- Calls `buildGrpcRequest()` to create protobuf request
287
+
- Makes blocking gRPC call to checkout service
288
+
- Returns `CloudCheckoutResult` with success/failure status
289
+
290
+
6.**CloudCheckoutService.buildGrpcRequest()**
291
+
- Converts shop purchase request to protobuf format
292
+
- Builds `Address`, `CreditCardInfo`, and `PlaceOrderRequest` messages
293
+
- Returns properly formatted gRPC request
294
+
295
+
The entire flow is instrumented with OpenTelemetry spans for distributed tracing, and each step updates the transaction status in the SQL Server database for monitoring and reconciliation.
296
+
131
297
## Transaction Processing Flow
132
298
133
299
1.**Local Purchase Initiation**: Customer makes purchase at store terminal
@@ -138,55 +304,12 @@ Health check endpoint with transaction statistics.
138
304
6.**Confirmation**: Local transaction updated with cloud response
139
305
7.**Completion**: Final status stored locally for reconciliation
140
306
141
-
## Transaction States
142
-
143
-
-`INITIATED`: Local transaction started
144
-
-`VALIDATING`: Performing local validation checks
145
-
-`SUBMITTING_CLOUD`: Sending request to cloud checkout
146
-
-`CLOUD_PROCESSING`: Cloud is processing the request
147
-
-`COMPLETED`: Successfully completed end-to-end
148
-
-`FAILED`: Failed at any stage
149
-
-`RETRY_PENDING`: Queued for retry
150
-
151
-
## Database Schema
152
-
153
-
The service uses PostgreSQL with the following main tables:
154
-
155
-
```sql
156
-
-- Main transaction table
157
-
CREATETABLEshop_transactions (
158
-
id BIGSERIALPRIMARY KEY,
159
-
transaction_id VARCHAR(255) UNIQUE NOT NULL,
160
-
local_order_id VARCHAR(255) NOT NULL,
161
-
cloud_order_id VARCHAR(255),
162
-
customer_email VARCHAR(255) NOT NULL,
163
-
customer_name VARCHAR(255),
164
-
total_amount DECIMAL(10,2),
165
-
currency_code CHAR(3),
166
-
status VARCHAR(20) NOT NULL DEFAULT 'INITIATED',
167
-
store_location VARCHAR(100),
168
-
terminal_id VARCHAR(50),
169
-
-- ... additional fields for timestamps, addresses, etc.
170
-
);
171
-
172
-
-- Store location lookup
173
-
CREATETABLEstore_locations (
174
-
id SERIALPRIMARY KEY,
175
-
store_code VARCHAR(10) UNIQUE NOT NULL,
176
-
store_name VARCHAR(100) NOT NULL,
177
-
address TEXT,
178
-
city VARCHAR(50),
179
-
state VARCHAR(50),
180
-
country VARCHAR(50),
181
-
timezone VARCHAR(50) DEFAULT 'America/New_York',
182
-
is_active BOOLEAN DEFAULT true
183
-
);
184
-
```
307
+
308
+
309
+
185
310
186
311
## Monitoring & Observability
187
312
188
-
### Dual Instrumentation
189
-
The service supports both traditional and modern observability:
0 commit comments