Systems and Methods for Limited Recursion Using Microservices or Other Computing Environments
By restricting recursion in microservices and reactive computing environments, the system addresses the issue of excessive stack consumption due to uncontrolled concurrency, enhancing performance and preventing recursive overload.
Patent Information
- Application Number
- JP2023526345
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2021-10-27
- Filing Date
- 2021-10-28
- Publication Date
- 2025-06-13
- Estimated Expiration
- 2041-10-28
AI Technical Summary
In microservices and reactive computing environments, the recursive processing of onComplete signals can lead to excessive stack consumption due to uncontrolled concurrency, making it difficult to determine whether processing occurs synchronously or concurrently.
The system imposes restrictions on recursion by determining that concurrent execution of onComplete calls is mutually exclusive with recursive calls, allowing recursion to operate within reasonable limits without additional synchronization actions, often requiring only load-load fences or a non-conflicting compare-and-set operation.
This approach reduces the need for extensive synchronization, improves system performance by limiting recursion, and prevents excessive stack consumption, while allowing concurrent execution to proceed without interference.
Smart Images

Figure 0007692478000003 
Figure 0007692478000004 
Figure 0007692478000005
Abstract
Description
Technical Field
[0001] Copyright Notice Part of the disclosure of this patent document contains subject matter that is subject to copyright protection. The copyright owner has no objection to the reproduction by anyone of the patent document or the patent disclosure, as it appears in the Patent and Trademark Office patent file or records, but otherwise retains all copyrights.
[0002] Priority Claim This application claims the benefit of priority based on U.S. Provisional Application No. 63 / 108,093, filed on October 30, 2020, entitled "SYSTEM AND METHOD FOR BOUNDED RECURSION UNDER BOUNDED CONCURRENCY WITH A MICROSERVICES OR OTHER COMPUTING ENVIRONMENT", and U.S. Patent Application No. 17 / 512,316, filed on October 27, 2021, entitled "SYSTEM AND METHOD FOR BOUNDED RECURSION WITH A MICROSERVICES OR OTHER COMPUTING ENVIRONMENT", and each of the above applications and their contents are incorporated herein by reference.
[0003] Technical Field The embodiments described herein generally relate to cloud computing and other computing environments, software development, microservices architecture, and reactive computing, and in particular, to systems and methods for providing bounded recursion under bounded concurrency in such environments.
Background Art
[0004] Background A microservices environment can present a software application as a collection of loosely coupled services that are independently deployable and communicate with each other over a network. Using the microservices approach, for example, a software application provided as a cloud service in a cloud computing environment can be developed. In such an environment, microservices can be used to provide elasticity and use computing resources efficiently.
[0005] A reactive computing environment generally supports the use of publishers and subscribers that use an onComplete signal. When using a flattened publisher, the processing of a signal from the next internal publisher can be initiated by the processing of onComplete from a previous internal publisher. However, it can be difficult to determine whether the processing of the signal from the next internal publisher is done synchronously (when the publisher already has the data ready) or concurrently (when the publisher is designed to wait for some data to come in). When the number of internal publishers is large or unrestricted, such processing can consume the stack excessively because onComplete is called recursively. SUMMARY OF THE INVENTION MEANS FOR SOLVING THE PROBLEM
[0006] Summary According to an embodiment, a system and method for providing restricted recursion under restricted concurrency for use in a microservices or reactive programming environment are described herein.
[0007] In accordance with one embodiment, the system is adapted to determine that the concurrent execution of onComplete calls is mutually exclusive with recursive calls, for example, during the evaluation of a chain of continuations. Since the number of threads to be executed concurrently can be limited, recursion only needs to operate within reasonable limits and does not need to be completely eliminated. Taking these relaxations into account, the system can impose restrictions on recursion without performing additional synchronization actions.
[0008] In many cases, only additional load-load fences are required, and if the number of concurrent threads is too large, if the concurrent calls to onComplete are not detected, one non-competing compare-and-set can be used at the end of the recursion.
Brief Description of the Drawings
[0009]
Figure 1
Figure 2
Figure 3
Figure 4
Figure 5
Figure 6
Figure 7
Figure 8
Figure 9
Figure 10
[0010] Detailed Description As described above, a microservices architecture can present a software application as a collection of loosely coupled services that are independently deployable and communicate with each other over a network. Using the microservices approach, for example, a software application provided as a cloud service in a cloud computing environment can be developed. In such an environment, microservices can be used to provide elasticity and efficiently utilize computing resources.
[0011] Software development frameworks such as Helidon assist in the development of microservices. For example, Helidon provides SE (Standard Edition) and MP (MicroProfile) programming models or environments, each of which includes a collection of software libraries that support features such as configuration, security, or web server functionality, providing a basis for software developers to create microservices.
[0012] In summary, Helidon reduces the need for software developers to program according to specific tooling or deployment models and enables the execution of microservices without the need for an application server. The Helidon libraries are interoperable with other software development, deployment, and / or monitoring tools such as Docker, Kubernetes, Prometheus, or OpenTracing, for example.
[0013] Microservices Environment (Helidon) FIG. 1 shows an example of a microservices environment that provides a software development framework according to an embodiment.
[0014] As shown in FIG. 1, according to an embodiment, the Helidon microservices environment 100 provides programming models or environments for both SE (Standard Edition) and MP (MicroProfile).
[0015] According to an embodiment, the Helidon SE environment 110 includes various libraries, APIs, or other components such as, for example, a reactive web server 111 that provides asynchronous and reactive APIs for creating web applications, a configuration API 112 that loads and processes key / value form configuration properties into a configuration object that can later be used by an application to retrieve configuration data, and a security component 113 that provides authentication, authorization, and outbound security, and can also include metrics 114, health checks 115, and traces 116 or other components.
[0016] According to an embodiment, the Helidon MP environment 120 can include various libraries, APIs, or other components such as components like JAX-RS 122, JSON-P 126, CDI 124, metrics 128, health checks 130, fault tolerance 132, MicroProfile configuration 134, and JWT authentication 136. According to an embodiment, the web server can be provided by a non-blocking client / server / web framework 118 such as Netty. The microservices environment can also enable interaction with a cloud, database, or other system or service 140.
[0017] Figure 2 shows an example of a Helidon SE microservices environment according to an embodiment.
[0018] As shown in Figure 2, according to an embodiment, the Helidon SE environment supports a functional programming style that directly uses web servers, security, and configuration components, provides transparency and control to software developers, and supports Java features such as reactive streams and asynchronous functional programming. The Helidon SE environment provides a framework that allows software developers to build lightweight reactive microservices.
[0019] Figure 3 shows an example of a Helidon MP microservices environment according to an embodiment.
[0020] As shown in Figure 3, according to an embodiment, the Helidon MP environment supports a declarative programming style by using a family of MicroProfile APIs built on top of the Helidon libraries. Application portability can be supported across multiple MicroProfile runtimes using MicroProfile definitions (specified, for example, by the Eclipse MicroProfile project).
[0021] According to an embodiment, a microservices environment can present a software application as a collection of loosely coupled services that are independently deployable and communicate with each other over a network. For example, the Helidon microservices environment can support the use of a remote procedure call (e.g., gRPC) framework or component, which enables (client and / or server) applications to communicate within the microservices environment to build connected systems.
[0022] Figure 4 shows communication in a microservices environment according to an embodiment. The example shown and described in Figure 4 is provided for the purpose of showing one type of communication supported by the microservices environment, and other types of communication may be supported according to other embodiments and examples.
[0023] As shown in Figure 4, according to an embodiment, a remote procedure call framework enables the definition of services and methods that can be called remotely. A server or service can handle calls from a client through a local object (stub) in the client that enables the client application to directly call methods on the server application as if they were local objects. The server / service can handle client calls including decoding the incoming requests, executing the service methods, and encoding the service responses by implementing the methods. The local object (stub) implements the same methods as the service and wraps the parameters for the call into an appropriate protocol buffer message type. These parameters are then provided to the server as a request.
[0024] According to an embodiment, a microservices library enables access by a client application for the purpose of accessing data, processing transactions, or performing other operations related to those systems or services, enabling communication with microservices, or enabling interaction with a cloud, database, or other systems or services.
[0025] Reactive environment In a conventional message-driven environment, a producer sends a message to a consumer when the message becomes available, but if the consumer cannot process the message in real time, the received message is stored in a buffer, which can lead to performance issues.
[0026] According to one embodiment, the microservices environment can provide a reactive environment, such as a reactive engine or a reactive messaging API, for use with activities such as transaction processing, asynchronous messaging channels, or reactive streams.
[0027] FIG. 5 shows the use of a reactive environment in a microservices environment according to one embodiment.
[0028] The example shown and described in FIG. 5 is provided for the purpose of showing an example of one type or usage of a reactive environment supported by the microservices environment, and other types and usages of reactive environments may be provided according to other embodiments and examples.
[0029] As shown in FIG. 5, according to one embodiment, the reactive environment 200 enables a client application 220 to communicate reactively with services as publishers and subscribers within the microservices environment. The connector 212 can be used to provide access to the reactive messaging channel for publishers and subscribers, or support for the use of reactive messaging with Kafka, JMS, or other types of messaging, message queuing, or stream processing environments can be provided. The reactive environment enables asynchronous stream processing with a non-blocking backpressure. That is, the subscriber notifies the publisher of the amount of data it can process, and the publisher sends an appropriate amount of data in response to the subscriber's request.
[0030] FIG. 6 further shows the use of a reactive environment according to one embodiment. As shown in FIG. 6, in accordance with one embodiment, a publisher 231 (referred to as Publisher in some examples herein) operates as a producer of data in accordance with requests made by its subscribers. A subscriber 232 (referred to as Subscriber in some examples herein) operates as a consumer of data generated by the publisher. A subscription 234 (referred to as Subscription in some examples herein) defines the relationship by which a subscriber subscribes to a publisher and provides a mechanism by which a subscriber can request more data (from the publisher). In accordance with one embodiment, a processor (referred to as Processor in some examples herein) may be provided that operates as a message / data processing stage and as both a subscriber and a publisher via a subscription.
[0031] FIG. 7 further illustrates the use of a reactive environment, according to one embodiment. As shown in FIG. 7, according to an embodiment, when a subscriber is passed to a publisher, the subscriber receives a call to the method onSubscribe(Subscription), but does not immediately start receiving data items or other events. Data items are received by the subscriber only when the subscriber calls the method request(long) within its subscription to notify the publisher of a request for more data. The subscriber can receive data through calls to the method Subscriber.onNext called with the next item, and that method can be called a number of times (n) determined by the long value passed in the method request(long) of its subscription. The method Subscriber.onError() can be called when an error occurs during the processing of the stream. The method Subscriber.onComplete() can be called when there is no more data to process. If both the onError() and onComplete() events are called, no new data will be emitted by the publisher even if the method request(long) is called again.
[0032] Limited Concurrency Reactive computing environments generally support the use of publishers and subscribers that use an onComplete signal. When using a flattened publisher, the processing of the onComplete from one internal publisher can cause the processing of the signal from the next internal publisher to start. However, it can be difficult to determine whether the processing of the signal from the next internal publisher occurs synchronously (if the publisher already has data ready) or concurrently (if the publisher is designed to wait for some data to arrive). In cases where the number of internal publishers is large or unrestricted, such processing can potentially consume the stack excessively because onComplete is called recursively.
[0033] When implementing asynchronous processing using a reactive API, it is necessary to identify that a particular computational stage is recursively re-entered in order to control the depth of recursion, which may also be executed simultaneously by collaborating threads (threads). It is not always possible to predict whether that stage will be executed recursively or simultaneously. Therefore, it is necessary to include provisions to ensure that a particular method is sequentially re-entrant but not recursively re-entrant. Typical implementations include locks or atomic counters.
[0034] Generally, regardless of whether it is recursive, executed concurrently, or neither recursive nor concurrent, there are always two atomic updates of values every time onComplete is called. Similar problems generally exist in many other cases of continuation processing. Continuations are chained, and the chain can grow during the processing of the chain. Since the chain of continuations can grow infinitely, it is necessary to limit the amount of processing executed recursively.
[0035] In accordance with an embodiment, a system and method for providing limited recursion under limited concurrency for use in a microservice or reactive programming environment are described herein.
[0036] In accordance with an embodiment, the system is adapted to determine that the concurrent execution of onComplete calls is mutually exclusive with recursive calls, for example, during the evaluation of a chain of continuations. Since the number of threads that execute concurrently can be limited, recursion only needs to operate within reasonable limits and does not need to be completely eliminated. Taking these relaxations into account, the system can impose restrictions on recursion without performing additional synchronization actions.
[0037] Often, only additional load-load fences are needed, and if the number of concurrent threads is too high, one non-conflicting compare-and-set can be used at the end of the recursion if no concurrent calls to onComplete are detected.
[0038] According to one embodiment, as a technical advantage of the described approach, for example, the process can be reduced to several load and store operations in a much relaxed ordering under certain assumptions regarding the level of concurrency, or if those assumptions cannot be made, it can be reduced to one non-conflicting compare-and-set. Additionally, this approach supports a lattice of happens-before edges between inexpensive memory operations compared to the atomic updates typically used, which operates as a lock that permits concurrent acquisition but not reacquisition from the same thread. These features contribute to improving system performance.
[0039] Limited Recursion under Limited Concurrency FIG. 8 shows a system for providing limited recursion under limited concurrency according to one embodiment.
[0040] As shown in FIG. 8, according to one embodiment, in accordance with various embodiments, this system includes or operates a limited recursion process 300 that is used with an upstream Publisher 251 that publishes data items 260, 270, 280 via a plurality of internal publishers A 262, B 272, N 282. Each of the internal publishers A 262, B 272, N 282 is associated with an internal subscriber 264, 274, 284 respectively, and provides data via internal subscriptions 268, 278, 288 as a stream of events used by a downstream Subscriber 252.
[0041] In systems that utilize continuations (e.g., shown here as continuation A 310 and continuation B 312), problems often arise in restricting recursion when evaluating chains of continuations. Such chains can be much longer than computations composed without continuations, and since the chain can grow during the evaluation of previous continuations, it can potentially become infinitely long and represent what would be a loop in a direct representation.
[0042] Approaches to dealing with such problems include, for example, the use of locking schemes such as the following.
[0043]
Number
[0044] In this example, the completion counter counts recursive or simultaneous calls to onComplete and, if detected, will loop instead of recursing. However, this comes at the cost of adding two atomic operations each time onComplete is called.
[0045] According to one embodiment, it can be observed that during the evaluation of a chain of continuations, the simultaneous execution of onComplete calls is mutually exclusive with recursive calls. Additionally, it can be observed that typically the number of threads 320 executing simultaneously is limited and recursion only needs to have a reasonable limit and does not need to be completely eliminated.
[0046] Taking these relaxations into account, it is possible to impose a limit on recursion without performing any synchronization actions. In many cases, only additional load-load fences are needed, and if the number of simultaneously executing threads is too high, and no simultaneous calls to onComplete are detected, one non-contending compare-and-set is performed at the end of the recursion (the compare-and-set remains non-contending).
[0047]
Number
[0048] Figure 9 further shows a system for providing restricted recursion under restricted simultaneous execution, according to an embodiment.
[0049] As shown in Figure 9, according to an embodiment, the processes or algorithms described herein include the following.
[0050] The value 332 of lastThreadCompleting 330 (last thread completing) can be considered equal to the current thread only from the context of a recursive call to onComplete. This establishes a condition for safely returning without recursion.
[0051] Any simultaneous calls to onComplete can occur only after a particular onComplete has set lastThreadCompleting and executed a full memory barrier. Any previous calls to onComplete store null if observed in the absence of a simultaneous call. This causes the simultaneous call to observe one of the values of lastThreadCompleting other than the current thread.
[0052] The caller does not miss a recursive call to onComplete that sets re-execution. This is because the store is in program order, and reaching that line guarantees that there are no simultaneous stores to be re-executed. That is, simultaneous calls to onComplete are mutually exclusive with recursive calls to onComplete.
[0053] If the number of concurrent execution parts of the continuation is small, lastThreadCompleting.compareAndSet(current, null) can be replaced with lastThreadCompleting.setOpaque(null). As a result, when onComplete executed concurrently observes lastThreadCompleting.getOpaque() != current, recursion may occur, but this recursion will be limited by the number of concurrent executions of onComplete.
[0054] Safety - Re - enterability According to an embodiment, this onComplete can be called sequentially or recursively by the same thread. lastThreadCompleting can be considered equal to the current thread only if no other stores to the variable are observed. At least all stores to this variable performed by the current thread will be observed, and all previously observed stores to this variable will be observed.
[0055] Assume that there was a previous call to onComplete by the same thread (sameThread). If that call observed that sameThread was true, it should have set lastThreadCompleting to null before returning, and subsequent calls to onComplete will no longer observe lastThreadCompleting equal to the current thread.
[0056] Alternatively, if that call observed that sameThread was false, it did not modify lastThreadCompleting, but subsequent calls to onComplete will also no longer observe lastThreadCompleting equal to the current thread. Because there is no intervening store of the reference from the current thread to lastThreadCompleting, and the only thread that could have done so was the current thread.
[0057] In one embodiment, the system operates such that compareAndSet can set lastThreadCompleting to null because there were no concurrent threads reaching the line that sets lastThreadCompleting, or it cannot make this setting because a concurrent thread was able to modify lastThreadCompleting. In either case, lastThreadCompleting may be considered not equal to current when re-entering onComplete.
[0058] Safety - Space Limitation In one embodiment, stack consumption is limited by flagging the call to onComplete when it is detected that onComplete is being called by the same thread. Concurrent calls to onComplete do not interfere with the recursion detection process. This is because each continuation is resumed one at a time, thereby establishing a happens - before edge between flagging and resuming the continuation. That is, when a continuation is resumed in another thread, it is the responsibility of that thread to resume subsequent continuations, and the current thread does not attempt to resume other continuations without first returning.
[0059] In one embodiment, an important aspect is the relative ordering of the re - execution and the store and load of lastThreadCompleting. Since the system is only interested in observing recursion that occurs within the same thread, the system has no obligation to observe concurrent calls to onComplete that perform the recursion. However, when the system observes that the re - execution has started to be updated, it is necessary to be able to distinguish between modifications made by the same thread and modifications made by other threads.
[0060] According to one embodiment, the store-store fence guarantees that it is observed only after the store to lastThreadCompleting can be observed when a store to re-execution is issued. As a result, the load-load fence guarantees that lastThreadCompleting is loaded only after re-execution is loaded. That is, observing a truly set re-execution and lastThreadCompleting equal to current is evidence that there is no write to lastThreadCompleting. That is, concurrent execution of onComplete can modify re-execution only when onComplete is recursively re-entered and only after lastThreadCompleting is modified.
[0061] According to one embodiment, compareAndSet of lastThreadCompleting returning from onComplete makes it possible to strictly control recursion. That is, there can be no recursive call of onComplete that does not observe lastThreadCompleting equal to current (that is, all recursive calls observe lastThreadCompleting set to current and return through the branch that sets the re-execution flag).
[0062] For some systems, unconditional modification of lastThreadCompleting may be permitted. In this case, for N simultaneous calls to onComplete, there can be up to N pending stores of null to lastThreadCompleting. This number will not exceed N, because each thread can execute only one such store. That is, even if recursion exists, the recursion observes this null store or other stores, and thus cannot observe a truly set sameThread. Additionally, these N such pending stores may cause recursion up to a maximum depth of N levels by interfering with up to N stores from current to lastThreadCompleting.
[0063] According to various embodiments, this design provides a performance advantage over designs that require calling onComplete every time to perform two atomic operations, and eliminates the need to transfer processor / CPU cache contents from a thread that accidentally executes onComplete simultaneously with a previous onComplete call.
[0064] In addition, in other approaches, the first caller of onComplete may need to process as many onCompletes as there are simultaneous calls, and thus any data that may have been generated by the concurrent execution threads would need to be moved to the processor / CPU cache of the "lock" owner. Instead, according to one embodiment, the described approach transfers ownership of the onComplete loop to any of the simultaneous callers. In this way, both can proceed without being blocked, and any data that may have been generated by the concurrent execution threads remains local to the CPU.
[0065] FIG. 10 shows a method for providing restricted recursion under restricted concurrent execution according to an embodiment.
[0066] As shown in FIG. 10, in accordance with an embodiment, at step 380, a computer including one or more processors and a memory, and a microservices environment (microservices library) provides a reactive environment that can be used with reactive streams so that a client application and a server application can communicate within the microservices environment.
[0067] At step 382, a plurality of publishers and subscribers are provided within the reactive environment, and onSubscribe may be issued by an internal publisher to indicate that it is ready to provide an internal subscription, and onComplete may be issued by the internal publisher to indicate that the internal subscription has ended.
[0068] At step 384, a continuous chain is provided within the reactive environment, the concurrent execution of onComplete calls is mutually exclusive with recursive calls, and the number of threads that can execute concurrently is limited.
[0069] At step 386, the system operates to allow setting the lastThreadCompleting value equal to the current thread only from the context of a recursive call to onComplete.
[0070] At step 388, the system operates to limit the concurrent calls to onComplete after onComplete sets lastThreadCompleting and executes a full memory barrier such that the concurrent call to onComplete observes a value of lastThreadCompleting other than the current thread and the concurrent call to onComplete is mutually exclusive with the recursive call to onComplete.
[0071] At step 390, the reactive environment processes requests in a plurality of internal publishers that request communication of data to downstream subscribers.
[0072] In accordance with various embodiments, aspects of the present disclosure may include, for example, the following. In one embodiment, a system for providing restricted recursion under restricted concurrency using a microservice or reactive programming environment that supports a publisher and the use of an on-complete signal, including a computer including one or more processors, the computer providing access to a microservice or other computing environment for use with a software application, the system determining that concurrent execution of on-complete calls is mutually exclusive with recursive calls during evaluation of a chain of continuations, the system imposing a restriction on the recursion using one or more of a load-load fence or a non-competing compare-and-set operation at the end of the recursion.
[0073] In one embodiment, a method for providing restricted recursion under restricted concurrency using a microservice or reactive programming environment that supports a publisher and the use of an on-complete signal, providing, in a computer including one or more processors, a microservice or other computing environment for use with a software application, determining that concurrent execution of on-complete calls is mutually exclusive with recursive calls during evaluation of a chain of continuations, and imposing a restriction on the recursion using one or more of a load-load fence or a non-competing compare-and-set operation at the end of the recursion.
[0074] In one embodiment, a non-transitory computer-readable storage medium storing instructions that, when read and executed by one or more computers, cause the one or more computers to perform a method, the method comprising In a computer including one or more processors, providing a microservice or other computing environment for use with a software application, during evaluation of a continuous chain, determining that concurrent execution of on-complete calls is mutually exclusive with recursive calls, a non-transitory computer-readable storage medium including imposing a restriction on recursion using one or more of a load-load fence or a non-conflicting compare-and-set operation at the end of the recursion.
[0075] In accordance with various embodiments, the teachings herein can be advantageously implemented using one or more conventional general-purpose or special-purpose computers, computing devices, machines, or microprocessors including one or more processors, memories and / or computer-readable storage media programmed in accordance with the teachings of the present disclosure. Appropriate software coding can be readily prepared by a skilled programmer based on the teachings of the present disclosure, as will be apparent to those skilled in the software arts.
[0076] In some embodiments, the teachings herein can include a computer program product that is a non-transitory computer-readable storage medium (s) storing instructions that can be used to program a computer to execute any of the processes of the present teachings. Examples of such storage media can include, but are not limited to, a hard disk drive, hard disk, hard drive, fixed disk, or other electromechanical data storage device, a floppy (R) disk, an optical disk, a DVD, a CD-ROM, a microdrive, and a magneto-optical disk, a ROM, a RAM, an EPROM, an EEPROM, a DRAM, a VRAM, a flash memory device, a magnetic or optical card, a nanosystem, or other type of storage medium or device suitable for non-transitory storage of instructions and / or data.
[0077] The foregoing description has been provided for purposes of illustration and description. It is not intended to be exhaustive or to limit the scope of protection to the precise forms disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art.
[0078] For example, while various embodiments of the systems and methods described herein are shown for use in a Helidon microservices environment, the various embodiments can be used in other types of microservices environments or other computing environments.
[0079] Embodiments have been chosen and described in order to best explain the principles of the present teachings and their practical application, to thereby enable those of ordinary skill in the art to understand the present teachings for various embodiments and various modifications that are suited to the particular use contemplated. The scope is intended to be defined by the following claims and their equivalents.
Claims
1. A system for use in a reactive computing environment for providing restricted recursion under restricted concurrent execution, comprising a computer including one or more processors, the computer providing a reactive environment that supports the use of publishers, subscribers, and on-complete signals for use with software applications. The system determines that the concurrent execution of on-complete calls is mutually exclusive with recursive calls during the evaluation of a chain of continuations associated with a software application, and in response to such determination, imposes a restriction on the recursion.
2. The system according to claim 1, wherein the system imposes a restriction on the recursion by using one or more of a load-load fence and a compare-and-set operation at the end of the recursion.
3. The system according to claim 1 or 2, wherein the system operates to set or examine the value of the last thread completion from the context of a recursive call of on-complete, and the call of on-complete operates to store null if it does not observe concurrent calls.
4. The system according to any one of claims 1 to 3, wherein the reactive environment enables a client software application to communicate reactively with services as publishers and subscribers within a microservices environment.
5. The system according to any one of claims 1 to 4, wherein the reactive environment is provided within a cloud computing environment that provides access to one or more clouds, databases, or other systems or services.
6. A method for use in a reactive computing environment for providing restricted recursion under restricted concurrent execution, comprising providing, in 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; and determining that the concurrent execution of on-complete calls is mutually exclusive with recursive calls during the evaluation of a chain of continuations associated with a software application. A method comprising imposing a limit on such recursion in response to such a determination. **Claim 7** The method according to claim 6, imposing a limit on recursion using one or more of a load-load fence and a compare-and-set operation at the end of the recursion. **Claim 8** The method according to claim 6 or 7, setting or examining the value of the last thread completion from the context of the on-complete recursive call, where the on-complete call operates to store null if it does not observe concurrent calls. **Claim 9** The method according to any one of claims 6 to 8, wherein the reactive environment enables a client software application to communicate reactively with services as a publisher and a subscriber within a microservices environment. **Claim 10** The method according to any one of claims 6 to 9, wherein the reactive environment is provided within a cloud computing environment that provides access to one or more clouds, databases, or other systems or services. **Claim 11** A computer-readable program for causing one or more computers to execute the method according to any one of claims 6 to 10.
Citation Information
Patent Citations
Stack Data Management for Software Managed Multi-Core Processors
US20140282454A1
Generic communication architecture for cloud microservice infrastructure
US20190179663A1