# US 2008/0313649 A1 · Efficient web services application status self-control system on image-forming device

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2008/0313649 A1
- Document ID: US20080313649A1
- Status: Published application
- Kind: A1
- Application number: 11/818,013
- Filed: 2007-06-12
- Published: 2008-12-18
- Earliest claimed: 2007-06-12
- Assignees: Ricoh Company, Ltd.
- Inventors: Lifen Tian
- Web page: https://patentgrep.com/patent/US20080313649A1

## CPC

- G06F 9/5016: {the resource being the memory}
- G03G 15/5087: {for receiving image data}
- G06F 9/485: {Task life-cycle, e.g. stopping, restarting, resuming execution (G06F9/4881 takes precedence)}
- G06F 9/5022: {Mechanisms to release resources}
- H04N 1/00244: {with a server, e.g. an internet server (fax-servers or the like for store and forward H04N1/324)}
- H04N 1/00885: {Power supply means, e.g. arrangements for the control of power supply to the apparatus or components thereof}
- H04N 1/00896: {using a low-power mode, e.g. standby}
- H04L 67/02: based on web technology, e.g. hypertext transfer protocol [HTTP]
- H04N 1/00204: {with a digital computer or a digital computer system, e.g. an internet server (programmed control between transmitter and receiver or between image input and image output device H04N1/32561)}
- H04N 2201/0039: Connection via a network
- H04N 2201/0094: Multifunctional device, i.e. a device capable of all of reading, reproducing, copying, facsimile transception, file transception
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G03G: ELECTROGRAPHY; ELECTROPHOTOGRAPHY; MAGNETOGRAPHY
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

Techniques and systems for controlling resources used by a device's web services applications are disclosed. In one technique, web services applications release their allocated resources and enter a “sleep mode” after being inactive for a specified period of time. In one technique, a device maintains a shared pool of memory resources. The pool contains data structures that web services applications are likely to re-use. Before allocating a new instance of a needed data structure from free memory, a web services application first determines whether the shared pool already contains a currently unused but allocated instance of a data structure of the needed type, and, if the shared pool does, then the web service application uses that instance, overwriting existing data in the instance as needed. Web services applications return such data structures to the shared pool when those web services applications are finished using those data structures.

## Claims

### Claim 1

A computer-implemented method for managing a web services application, the method comprising:
determining whether a specified amount of time has passed since a last time that a particular web services application has received a message; and
in response to determining that the specified amount of time has passed since the last time, causing the particular web services application to free at least a portion of memory that is allocated to one or more data structures that the particular web services application uses, thereby making the portion of memory available to one or more other web services applications.

### Claim 2 (depends on 1)

The method of claim 1, wherein the particular web services application executes on an image-forming device.

### Claim 3 (depends on 1)

The method of claim 1, further comprising:
in response to determining that the specified amount of time has passed since the last time, causing the particular web services application to enter a sleep mode in which the particular web services application remains idle until the particular web services application receives a signal.

### Claim 4 (depends on 3)

The method of claim 3, further comprising:
determining whether the particular web services application has received the signal; and
in response to determining that the web services application has received the signal, (a) causing the web services application to exit the sleep mode and (b) causing the web services application to allocate memory for one or more data structures.

### Claim 5 (depends on 1)

The method of claim 1, further comprising:
determining whether free memory resources of a device on which the particular web services application executes have fallen below a specified threshold; and
in response to determining that the free memory resources of the device have fallen below the specified threshold, freeing at least a portion of memory that is occupied by data structures that are used by the particular web services application.

### Claim 6 (depends on 5)

The method of claim 5, wherein the step of freeing the portion of memory comprises:
determining one or more data structures that have been assigned a lowest priority among priorities assigned to data structures that are used by the particular web services application; and
freeing memory that is occupied by the one or more data structures that have been assigned the lowest priority without freeing memory that is occupied by other data structures that are used by the particular web services application.

### Claim 7 (depends on 5)

The method of claim 5, wherein the step of freeing the portion of memory comprises:
selecting, from among a set of data structures that are being used by a plurality of web services applications, a particular data structure that is occupying a largest amount of memory among the set of data structures;
determining which web services application of the plurality of web services applications is using the particular data structure; and
in response to determining that the particular web services application is using the particular data structure, asking the particular web services application to free at least a portion of memory that the particular data structure occupies.

### Claim 8 (depends on 1)

The method of claim 1, further comprising:
receiving, at the particular web services application, a request for data;
in response to receiving the request for data, determining whether the data is contained in a cache of the particular web services application; and
in response to determining that the data is contained in the cache, responding to the request with the data that is contained in the cache.

### Claim 9 (depends on 1)

The method of claim 1, further comprising:
a memory pool manager receiving, from the particular web services application, a request for a data structure of a particular type;
the memory pool manager determining whether a memory pool currently contains an allocated data structure that is (a) of the particular type and (b) not currently being used by any web services application; and
in response to determining that the memory pool currently contains a particular allocated data structure that is (a) of the particular type and (b) not currently being used by any web services application, the memory pool manager returning the particular allocated data structure to the particular web services application.

### Claim 10 (depends on 1)

The method of claim 1, further comprising:
a memory pool manager receiving, from the particular web services application, a request for a data structure of a particular type;
the memory pool manager determining whether a memory pool currently contains an allocated data structure that is (a) of the particular type and (b) not currently being used by any web services application; and
in response to determining that the memory pool does not currently contain an allocated data structure that is (a) of the particular type and (b) not currently being used by any web services application, the memory pool manager allocating, from free memory, a particular data structure that is of the particular type and returning the particular data structure to the particular web services application.

### Claim 11

A computer-readable medium carrying one or more sequences of instructions, wherein execution of the one or more sequences of instructions by one or more processors causes the one or more processors to perform the steps of:
determining whether a specified amount of time has passed since a last time that a particular web services application has received a message; and
in response to determining that the specified amount of time has passed since the last time, causing the particular web services application to free at least a portion of memory that is allocated to one or more data structures that the particular web services application uses, thereby making the portion of memory available to one or more other web services applications;
wherein the particular web services application is not a resource manager that instructs a resource to release memory.

### Claim 12 (depends on 11)

The computer-readable medium of claim 11, wherein the particular web services application executes on an image-forming device.

### Claim 13 (depends on 11)

The computer-readable medium of claim 11, wherein the steps further comprise:
in response to determining that the specified amount of time has passed since the last time, causing the particular web services application to enter a sleep mode in which the particular web services application remains idle until the particular web services application receives a signal.

### Claim 14 (depends on 13)

The computer-readable medium of claim 13, wherein the steps further comprise:
determining whether the particular web services application has received the signal; and
in response to determining that the web services application has received the signal, (a) causing the web services application to exit the sleep mode and (b) causing the web services application to allocate memory for one or more data structures.

### Claim 15 (depends on 11)

The computer-readable medium of claim 11, wherein the steps further comprise:
determining whether free memory resources of a device on which the particular web services application executes have fallen below a specified threshold; and
in response to determining that the free memory resources of the device have fallen below the specified threshold, freeing at least a portion of memory that is occupied by data structures that are used by the particular web services application.

### Claim 16 (depends on 15)

The computer-readable medium of claim 15, wherein the step of freeing the portion of memory comprises:
determining one or more data structures that have been assigned a lowest priority among priorities assigned to data structures that are used by the particular web services application; and
freeing memory that is occupied by the one or more data structures that have been assigned the lowest priority without freeing memory that is occupied by other data structures that are used by the particular web services application.

### Claim 17 (depends on 15)

The computer-readable medium of claim 15, wherein the step of freeing the portion of memory comprises:
selecting, from among a set of data structures that are being used by a plurality of web services applications, a particular data structure that is occupying a largest amount of memory among the set of data structures;
determining which web services application of the plurality of web services applications is using the particular data structure; and
in response to determining that the particular web services application is using the particular data structure, asking the particular web services application to free at least a portion of memory that the particular data structure occupies.

### Claim 18 (depends on 11)

The computer-readable medium of claim 11, wherein the steps further comprise:
receiving, at the particular web services application, a request for data;
in response to receiving the request for data, determining whether the data is contained in a cache of the particular web services application; and
in response to determining that the data is contained in the cache, responding to the request with the data that is contained in the cache.

### Claim 19 (depends on 11)

The computer-readable medium of claim 11, wherein the steps further comprise:
a memory pool manager receiving, from the particular web services application, a request for a data structure of a particular type;
the memory pool manager determining whether a memory pool currently contains an allocated data structure that is (a) of the particular type and (b) not currently being used by any web services application; and
in response to determining that the memory pool currently contains a particular allocated data structure that is (a) of the particular type and (b) not currently being used by any web services application, the memory pool manager returning the particular allocated data structure to the particular web services application.

### Claim 20 (depends on 11)

The computer-readable medium of claim 11, wherein the steps further comprise:
a memory pool manager receiving, from the particular web services application, a request for a data structure of a particular type;
the memory pool manager determining whether a memory pool currently contains an allocated data structure that is (a) of the particular type and (b) not currently being used by any web services application; and
in response to determining that the memory pool does not currently contain an allocated data structure that is (a) of the particular type and (b) not currently being used by any web services application, the memory pool manager allocating, from free memory, a particular data structure that is of the particular type and returning the particular data structure to the particular web services application.

### Claim 21

An apparatus for managing a web services application, the apparatus comprising:
means for determining whether a specified amount of time has passed since a last time that a particular web services application has received a message; and
means for causing, in response to determining that the specified amount of time has passed since the last time, the particular web services application to free at least a portion of memory that is allocated to one or more data structures that the particular web services application uses, thereby making the portion of memory available to one or more other web services applications;
wherein the particular web services application is not a resource manager that instructs a resource to release memory.

### Claim 22 (depends on 21)

The apparatus of claim 21, wherein the apparatus is an image-forming device and wherein the particular web services application executes on the apparatus.

### Claim 23 (depends on 21)

The apparatus of claim 21, further comprising:
means for causing, in response to determining that the specified amount of time has passed since the last time, the particular web services application to enter a sleep mode in which the particular web services application remains idle until the particular web services application receives a signal.

### Claim 24 (depends on 23)

The apparatus of claim 23, further comprising:
means for determining whether the particular web services application has received the signal; and
means for causing, in response to determining that the web services application has received the signal, (a) the web services application to exit the sleep mode and (b) the web services application to allocate memory for one or more data structures.

### Claim 25 (depends on 21)

The apparatus of claim 21, further comprising:
means for determining whether free memory resources of a device on which the particular web services application executes have fallen below a specified threshold; and
means for freeing, in response to determining that the free memory resources of the device have fallen below the specified threshold, at least a portion of memory that is occupied by data structures that are used by the particular web services application.

### Claim 26 (depends on 25)

The apparatus of claim 25, wherein the means for freeing the portion of memory comprises:
means for determining one or more data structures that have been assigned a lowest priority among priorities assigned to data structures that are used by the particular web services application; and
means for freeing memory that is occupied by the one or more data structures that have been assigned the lowest priority without freeing memory that is occupied by other data structures that are used by the particular web services application.

### Claim 27 (depends on 25)

The apparatus of claim 25, wherein the means for freeing the portion of memory comprises:
means for selecting, from among a set of data structures that are being used by a plurality of web services applications, a particular data structure that is occupying a largest amount of memory among the set of data structures;
means for determining which web services application of the plurality of web services applications is using the particular data structure; and
means for asking, in response to determining that the particular web services application is using the particular data structure, the particular web services application to free at least a portion of memory that the particular data structure occupies.

### Claim 28 (depends on 21)

The apparatus of claim 21, further comprising:
means for receiving, at the particular web services application, a request for data;
means for determining, in response to receiving the request for data, whether the data is contained in a cache of the particular web services application; and
means for responding, in response to determining that the data is contained in the cache, to the request with the data that is contained in the cache.

### Claim 29 (depends on 21)

The apparatus of claim 21, further comprising a memory pool manager that:
receives, from the particular web services application, a request for a data structure of a particular type;
determines whether a memory pool currently contains an allocated data structure that is (a) of the particular type and (b) not currently being used by any web services application; and
returns the particular allocated data structure to the particular web services application in response to determining that the memory pool currently contains a particular allocated data structure that is (a) of the particular type and (b) not currently being used by any web services application.

### Claim 30 (depends on 21)

The apparatus of claim 21, further comprising a memory pool manager that:
receives, from the particular web services application, a request for a data structure of a particular type;
determines whether a memory pool currently contains an allocated data structure that is (a) of the particular type and (b) not currently being used by any web services application; and
allocates, from free memory, a particular data structure that is of the particular type in response to determining that the memory pool does not currently contain an allocated data structure that is (a) of the particular type and (b) not currently being used by any web services application; and
returns the particular data structure to the particular web services application in response to determining that the memory pool does not currently contain an allocated data structure that is (a) of the particular type and (b) not currently being used by any web services application.
