IP Library › Granted Patent US 11,656,850
Granted Patent B2
US 11,656,850 · App. 17/512,316 · Granted May 23, 2023

System and method for bounded recursion with a microservices or other computing environment

Inventor: Oleksandr Otenko (Winnersh, GB)
Assignee: ORACLE INTERNATIONAL CORPORATION
G06F8/20
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,656,850
App. No.
17/512,316
Granted
May 23, 2023
Kind
B2
Abstract

Described herein is a system and method for providing bounded recursion under bounded concurrency, for use with microservices or reactive programming environments. The system is adapted to determine, for example during evaluation of a chain of Continuations, that the concurrency of onComplete invocations is mutually exclusive with the recursive invocations. The number of concurrently executing threads can be bounded, such that the recursion only needs to operate within a reasonable bound—it does not need to be fully precluded. With these relaxations in mind, the system can enforce a bound on recursion without further synchronization actions.

Claims (31)

1. A computer-implemented method for use with a reactive computing environment, for providing bounded recursion under bounded concurrency, comprising:

providing, at a computer including one or more processors, a reactive environment that supports the use of publishers, subscribers, and on-complete signals for use with microservices and software applications, including wherein an upstream publisher publishes data items via a chain of continuations, each continuation having a plurality of inner publishers,

wherein each inner publisher is associated with an inner subscriber that provides its data via an inner subscription, wherein processing of an on-complete invocation from a first inner publisher causes start of processing on-complete invocations from a next inner publisher,

wherein the plurality of inner publishers operate to provide the data items as a stream of events for use by a downstream subscriber; and

determining during evaluation of the chain of continuations, that concurrency of the on-complete invocations is mutually exclusive with recursive invocations, including examining a value for last thread completing, from a context of a recursive invocation of on-complete, to determine whether the value for last thread completing is equal to current thread; and

in response to such determination enforcing a bound on recursion, including returning without recursion when the value for last thread completing is determined to be equal to current thread.

2. The method of claim 1 , wherein the bound on recursion is enforced using one or more of a load-load fence and compare and set operation at the end of recursion.

3. The method of claim 1 , wherein invocations of on-complete operate to store null if they observe no concurrent invocations.

4. The method of claim 1 , wherein the reactive environment enables a client software application to communicate reactively with services, as publishers and subscribers, within a microservices environment.

5. The method of claim 1 , wherein the reactive environment is provided within a cloud computing environment that provides access to one or more cloud, database, or other systems or services.

6. A system for use with a reactive computing environment, for providing bounded recursion under bounded concurrency, comprising:

a computer including one or more processors, that provides a reactive environment that supports the use of publishers, subscribers, and on-complete signals for use with microservices and software applications, wherein an upstream publisher publishes data items via a chain of continuations, each continuation having a plurality of inner publishers,

wherein each inner publisher is associated with an inner subscriber that provides its data via an inner subscription, wherein processing of an on-complete invocation from a first inner publisher causes start of processing on-complete invocations from a next inner publisher,

wherein the plurality of inner publishers operate to provide the data items as a stream of events for use by a downstream subscriber; and

wherein the system:

determines during evaluation of the chain of continuations, that concurrency of the on-complete invocations is mutually exclusive with recursive invocations, including examining a value for last thread completing, from a context of a recursive invocation of on-complete, to determine whether the value for last thread completing is equal to current thread; and

in response to such determination enforces a bound on recursion, including returning without recursion when the value for last thread completing is determined to be equal to current thread.

7. The system of claim 6 , wherein the system enforces the bound on recursion using one or more of a load-load fence and compare and set operation at the end of recursion.

8. The system of claim 6 , wherein invocations of on-complete operate to store null if they observe no concurrent invocations.

9. The system of claim 6 , wherein the reactive environment enables a client software application to communicate reactively with services, as publishers and subscribers, within a microservices environment.

10. The system of claim 6 , wherein the reactive environment is provided within a cloud computing environment that provides access to one or more cloud, database, or other systems or services.

11. A non-transitory computer readable storage medium, including instructions stored thereon which when read and executed by one or more computers cause the one or more computers to perform a method comprising:

providing, at a computer including one or more processors, a reactive environment that supports the use of publishers, subscribers, and on-complete signals for use with microservices and software applications, including wherein an upstream publisher publishes data items via a chain of continuations, each continuation having a plurality of inner publishers,

wherein each inner publisher is associated with an inner subscriber that provides its data via an inner subscription, wherein processing of an on-complete invocation from a first inner publisher causes start of processing on-complete invocations from a next inner publisher,

wherein the plurality of inner publishers operate to provide the data items as a stream of events for use by a downstream subscriber; and

determining during evaluation of the chain of continuations, that concurrency of the on-complete invocations is mutually exclusive with recursive invocations, including examining a value for last thread completing, from a context of a recursive invocation of on-complete, to determine whether the value for last thread completing is equal to current thread; and

in response to such determination enforcing a bound on recursion, including returning without recursion when the value for last thread completing is determined to be equal to current thread.

12. The non-transitory computer readable storage medium of claim 11 , wherein the bound on recursion is enforced using one or more of a load-load fence and compare and set operation at the end of recursion.

13. The non-transitory computer readable storage medium of claim 11 , wherein invocations of on-complete operate to store null if they observe no concurrent invocations.

14. The non-transitory computer readable storage medium of claim 11 , wherein the reactive environment enables a client software application to communicate reactively with services, as publishers and subscribers, within a microservices environment.

15. The non-transitory computer readable storage medium of claim 11 , wherein the reactive environment is provided within a cloud computing environment that provides access to one or more cloud, database, or other systems or services.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 27, 2021
From: OTENKO, OLEKSANDR
To: ORACLE INTERNATIONAL CORPORATION
Reel/Frame 057937/0768 →
Continuity (2)
Provisional Application 63108093 · Oct 30, 2020
Related Publication 20220137931A1 · May 5, 2022