Back to search

San Jose State University

Asynchronous Validations using Programming Contracts in Java

Abstract

dc:description.abstract

Design by Contract is a software development methodology based on the idea of having contracts between two software components. Programming contracts are invariants specified as pre-conditions and post-conditions. The client component must ensure that all the pre-conditions are satisfied before calling the server component. The server component must guarantee the post-conditions are met before the call returns to the client component. Current work in Design by Contract in Java focuses on writing shorthand contracts using annotations that are processed serially. Modern software systems require a lot of business rules validations on complicated domain objects. Often, such validations are in the form of a chain of independent tasks that need to be validated one after another. These tasks are computation-intensive and often involve numerous database calls and API calls over the web. This paper presents a validation rule engine framework, Rule4j to facilitate writing such business rules with the help of programming contracts in Java. The contracts are organized in a hierarchy similar to the Racket programming language. The programmer can specify the business rules in the form of a series of higher-order contracts that form a chain. These chains of contracts are validated concurrently and asynchronously to present a final validation result to the programmer. A sample scenario of trade execution is used to demonstrate the performance gain and maintainability of the framework. The experiments conducted show that validations executed using Rule4J run four times faster than the traditional approach. A clear separation of business logic and business validations for the trade execution scenario was achieved using Rule4J.

Degree

thesis:*
Name thesis:degree_name
Master of Science in Computer Science (MSCS)
Discipline thesis:degree_discipline
Computer Science

Author and committee

dc:creator, dc:contributor.*
Author dc:creator
  • Shukla, Rahul
Contributors dc:contributor
  • Thomas Austin
  • Chris Pollett
  • Mike Wu

Subjects

dc:subject × 7

Identifiers

dc:identifier.*

Chain of custody

source
Harvested from
San Jose State University
Base URL
scholarworks.sjsu.edu/do/oai/
Last updated
2026-11-26
Source record
OAI-PMH GetRecord
citation

Shukla, Rahul. Asynchronous Validations using Programming Contracts in Java. https://doi.org/10.31979/etd.j77e-66nt