CtrlK
BlogDocsLog inGet started
Tessl Logo

finkel/spring-grpc

Spring gRPC reference documentation covering server, client, security, and configuration

92

2.19x
Quality

Pending

Does it follow best practices?

Impact

92%

2.19x

Average score across 3 eval scenarios

SecuritybySnyk

Pending

The risk profile of this skill

Overview
Eval results
Files

task.mdevals/scenario-1/

Order Management gRPC Service

Problem/Feature Description

Your team is building an order management microservice using Spring Boot and gRPC. The service exposes three RPC methods: PlaceOrder, CancelOrder, and GetOrderStatus. The ops team has requested that every incoming gRPC call be logged (including the method name and caller identity), and that a separate rate-limiting check be applied only to PlaceOrder calls — without cluttering the service implementation itself.

Additionally, certain domain exceptions (such as OrderNotFoundException and InsufficientInventoryException) are currently leaking as raw gRPC UNKNOWN statuses to clients. The team wants these translated into proper gRPC status codes (NOT_FOUND and RESOURCE_EXHAUSTED respectively) through a centralized mechanism rather than try/catch blocks scattered across service methods.

The logging interceptor should run before the rate limiter. The rate limiter only applies to the PlaceOrder service, but should still participate in the same ordering framework as the global interceptors.

Output Specification

Produce a self-contained Maven project (no need to be compilable — focus on the configuration and wiring code) with the following files:

  • pom.xml — project dependencies including Spring gRPC BOM and necessary gRPC artifacts
  • src/main/java/.../OrderServiceImpl.java — gRPC service implementation (stub logic is fine)
  • src/main/java/.../LoggingInterceptor.java — the global logging interceptor bean
  • src/main/java/.../RateLimitInterceptor.java — the per-service rate limiting interceptor
  • src/main/java/.../OrderExceptionHandler.java — centralized exception handler
  • src/main/java/.../GrpcConfig.java — Spring configuration class wiring interceptors, exception handler, and any other beans
  • src/main/resources/application.properties — server configuration

Provide a notes.md file explaining the key design decisions made in the configuration.

tile.json