Skip to content

feat: implement Remote Procedure Invocation pattern (#2680) - #3551

Open
dileep98 wants to merge 1 commit into
iluwatar:masterfrom
dileep98:feature/remote-procedure-invocation-2680
Open

feat: implement Remote Procedure Invocation pattern (#2680)#3551
dileep98 wants to merge 1 commit into
iluwatar:masterfrom
dileep98:feature/remote-procedure-invocation-2680

Conversation

@dileep98

Copy link
Copy Markdown
  • Add RPI pattern demonstrating REST-based synchronous communication
  • Implement RpiService (Spring Boot REST controller)
  • Implement RpiClient (using RestTemplate)
  • Add comprehensive unit and integration tests
  • Add UML diagram and README documentation
  • Resolves Microservice pattern: Remote procedure invocation #2680

Pull Request Template

What does this PR do?

This PR implements the Remote Procedure Invocation (RPI) design pattern, demonstrating synchronous request/reply communication between microservices using REST over HTTP.

Implementation Details:

  • RpiService: Spring Boot REST controller exposing a /greet endpoint
  • RpiClient: Client using RestTemplate to make synchronous HTTP calls
  • App: Spring Boot application entry point with pattern explanation
  • Comprehensive unit and integration tests with Spring Boot Test and Mockito
  • UML class diagram showing the pattern structure
  • Complete README with YAML front matter, examples, and documentation

Pattern Characteristics:

  • Synchronous communication with blocking request/reply
  • Direct client-to-service communication (no message broker)
  • Simple HTTP/REST protocol implementation
  • Demonstrates tight runtime coupling and availability considerations

Fixes #2680

- Add RPI pattern demonstrating REST-based synchronous communication
- Implement RpiService (Spring Boot REST controller)
- Implement RpiClient (using RestTemplate)
- Add comprehensive unit and integration tests
- Add UML diagram and README documentation
- Resolves iluwatar#2680
@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown

PR Summary

Adds a complete Remote Procedure Invocation pattern module demonstrating synchronous REST-based communication between microservices. Includes RpiService (Spring Boot REST controller), RpiClient (RestTemplate-based client), application bootstrap, comprehensive tests, UML diagram, and README documentation. Updates root POM to include the new module and centralizes dependencies for Spring Boot and testing.

Changes

File Summary
modified: pom.xml Updated the root POM to include the new remote-procedure-invocation module, reorganized dependency management for Spring Boot and testing, added Lombok handling, and expanded module and repository declarations.
added: remote-procedure-invocation/README.md Introduces the Remote Procedure Invocation pattern with overview, usage, and architectural details. Documents server (RpiService), client (RpiClient), tests, UML diagram, and README front matter.
added: remote-procedure-invocation/etc/rpi.urm.png New UML diagram image illustrating the RPI pattern structure used by the README.
added: remote-procedure-invocation/etc/rpi.urm.puml PlantUML diagram defining App, RpiService, and RpiClient with their relationship and HTTP interaction.
added: remote-procedure-invocation/pom.xml Module pom declaring Spring Web and Test dependencies, JUnit engine for tests, and an assembly plugin to create a fat jar with com.iluwatar.rpi.App as the main class.
added: remote-procedure-invocation/src/main/java/com/iluwatar/rpi/App.java Spring Boot application entry point for the RPI module with a test-friendly shutdown when using the 'test' argument.
added: remote-procedure-invocation/src/main/java/com/iluwatar/rpi/RpiClient.java Client-side component using RestTemplate to call the remote service's /greet endpoint and return the response, with logs.
added: remote-procedure-invocation/src/main/java/com/iluwatar/rpi/RpiService.java Server-side REST controller exposing /greet endpoint that returns a greeting for the given name (default 'World').
added: remote-procedure-invocation/src/test/java/com/iluwatar/rpi/AppTest.java Tests the RPI module startup, default/custom greetings, and RpiClient invocation against the service.
added: remote-procedure-invocation/src/test/java/com/iluwatar/rpi/RpiClientTest.java Unit test for RpiClient using a mocked RestTemplate to verify the greeting response.
added: remote-procedure-invocation/src/test/java/com/iluwatar/rpi/RpiServiceTest.java Unit tests for RpiService ensuring correct greetings for specific and default names.

autogenerated by presubmit.ai

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Microservice pattern: Remote procedure invocation

1 participant