Method and apparatus for reducing client-server messages associated with opening a file
First Claim
1. A method of reducing client-server messages, comprising the computer-implemented steps of:
- receiving a first request to open a file, wherein the first request includes first information that indicates a first access mode for opening the file;
wherein the first request is sent from a client to a file server that manages access to the file;
modifying the first information to indicate a most extended access mode for opening the file;
sending the first request with the modified first information to the file server that manages access to the file;
receiving a first response from the file server, wherein the first response comprises second information which indicates a specific access mode for opening the file that is granted by the file server;
wherein the specific access mode is different and less restrictive than the first access mode;
storing the second information in a cache;
responding to the first request by creating and sending a second response to the client, wherein the second response indicates that the file is opened in the first access mode even though at the file server the file is opened in the specific access mode;
in response to a second request to close the file, delaying the closing of the file;
wherein the closing of the file is delayed for a specified interval of time that represents an interval of time during which no requests to open the file have been received; and
closing the file on the file server after the specified interval of time expires;
wherein the method is performed by one or more computer systems.
1 Assignment
0 Petitions
Accused Products
Abstract
A method is disclosed for reducing client-server messages. A first request to open a file is received. The first request includes first information that indicates a first access mode for opening the file. The first information is modified to indicate a most extended access mode for opening the file. The first request with the modified first information is sent to a file server that manages access to the file. A first response is received. The first response comprises second information which indicates a specific access mode for opening the file that is granted by the file server. The second information is stored in a cache. In response to a second request to close the file, the closing of the file is delayed.
-
Citations
30 Claims
-
1. A method of reducing client-server messages, comprising the computer-implemented steps of:
-
receiving a first request to open a file, wherein the first request includes first information that indicates a first access mode for opening the file; wherein the first request is sent from a client to a file server that manages access to the file; modifying the first information to indicate a most extended access mode for opening the file; sending the first request with the modified first information to the file server that manages access to the file; receiving a first response from the file server, wherein the first response comprises second information which indicates a specific access mode for opening the file that is granted by the file server; wherein the specific access mode is different and less restrictive than the first access mode; storing the second information in a cache; responding to the first request by creating and sending a second response to the client, wherein the second response indicates that the file is opened in the first access mode even though at the file server the file is opened in the specific access mode; in response to a second request to close the file, delaying the closing of the file; wherein the closing of the file is delayed for a specified interval of time that represents an interval of time during which no requests to open the file have been received; and closing the file on the file server after the specified interval of time expires; wherein the method is performed by one or more computer systems.
-
-
2. A method as recited in claim 1, wherein:
-
the most extended access mode identifies a largest set of types of operations, among a plurality of sets ranging from extended to restricted, which are allowed to be performed on the file after the file is opened; and the specific access mode is the most extended access mode.
-
-
3. A method as recited in claim 1, wherein:
-
the first access mode identifies a first set of types of operations that are allowed to be performed on the file after the file is opened; the specific access mode identifies a specific set of types of operations that are allowed to be performed on the file after the file is opened, wherein the specific set of types of operations includes at least the first set of types of operations.
-
-
4. A method as recited in claim 1, further comprising:
prior to closing the file on the file server, performing the steps of; creating a third response which indicates that the file is closed even though the closing of the file has been delayed; and responding to the second request to close the file by sending the third response to the client.
-
5. A method as recited in claim 1, further comprising:
-
receiving a third request to open the file; determining whether the file is still open at the file server by determining whether the second information is still stored in the cache; and if it is determined that the file is still open, then responding to the third request by creating and sending a third response, wherein the third response is based at least in part on the second information.
-
-
6. A method as recited in claim 5, wherein:
-
the third request includes third information that indicates a second access mode for opening the file, wherein the second access mode is different than the first access mode; each of the first access mode, the second access mode, and the specific access mode identifies a set of types of operations that are allowed to be performed on the file after the file is opened in that access mode; and when the set of types of operations identified in the second access mode is included in the set of types of operations identified in the specific access mode, then the third response indicates that the file is opened in the second access mode.
-
-
7. A method as recited in claim 5, wherein:
-
the first request to open the file, the second request to close the file, and the third request to open the file are associated with a user of the client that sent the first request, the second request, and the third request; the second information is associated in the cache with an identifier of the user; and the determining whether the second information is still stored in the cache is based at least in part on the identifier of the user.
-
-
8. A method as recited in claim 1, wherein the steps are performed by a computer system that executes any of the client and a proxy server.
-
9. A method of reducing client-server messages, comprising the computer-implemented steps of:
-
at a local server, receiving from a client a first request to open a file, wherein the first request includes a first access mask that indicates a first access mode of a plurality of access modes for opening the file, wherein the file is accessed through a remote server that is connected over a communication link; modifying the first access mask to indicate a most extended access mode from the plurality of access modes for opening the file; sending the first request with the modified first access mask to the remote server; receiving a first response from the remote server, wherein the first response comprises a first file handle to the file, wherein the first file handle is associated with a specific access mode of the plurality of access modes for opening the file; wherein the specific access mode is different and less restrictive than the first access mode; storing the first file handle in a cache; responding to the first request by creating and sending a second response to the client, wherein the second response indicates that the file is opened in the first access mode even though the file is opened in the specific access mode at a file server that manages access to the file; and in response to a second request from the client to close the file, delaying the closing of the file; wherein the closing of the file is delayed for a specified interval of time; and closing the file after the specified interval of time expires and removing the first file handle from the cache; wherein the method is performed by one or more computer systems.
-
-
10. A method as recited in claim 9, further comprising:
prior to closing the file on the file server, performing the steps of; creating a third response which indicates that the file is closed even though the closing of the file has been delayed; and responding to the second request to close the file by sending the third response to the client.
-
11. A method as recited in claim 9, further comprising:
-
receiving a third request to open the file from the client; determining whether the file is still open by determining whether the first file handle is still stored in the cache; and if it is determined that the file is still open, then responding to the third request by creating and sending a third response, wherein the third response includes at least a second file handle that is created based on the first file handle.
-
-
12. A method as recited in claim 11, wherein
the third request includes a second access mask that indicates a second access mode of the plurality of access modes for opening the file, wherein the second access mode is different than the first access mode; -
each of the plurality of access modes identifies a set of types of operations that are allowed to be performed on the file after the file is opened in that access mode; and when the set of types of operations identified in the second access mode is included in the set of types of operations identified in the specific access mode, then the second file handle indicates that the file is opened in the second access mode.
-
-
13. A method as recited in claim 11, wherein:
-
the first request to open the file, the second request to close the file, and the third request to open the file are associated with a specific user of one or more users of the client; the first file handle is associated in the cache with at least a user identifier of the specific user and a client identifier of the client; and the determining whether the first file handle is still stored in the cache is based at least in part on the user identifier and the client identifier.
-
-
14. A method as recited in claim 9, wherein:
-
the first request to open the file and the second request to close the file are associated with a specific user of the client; and the first request further includes a first data that indicates that no user except the specific user is allowed to perform any operation on the file until the file is closed.
-
-
15. A method as recited in claim 9, wherein:
-
the client is a first client of a plurality of clients that are communicatively connected to the local server; the first request to open the file and the second request to close the file are sent from the first client; and the first request comprises; a first share mask that indicates a first share mode for opening the file; and a first data that indicates that users of the plurality of clients are allowed to share the file according to the first share mode.
-
-
16. A method as recited in claim 9,
the communication link between the local server and the remote server is any one of a dial-up connection, a Wide Area Network (WAN) connection, a Digital Subscriber Line (DSL) connection, and an Integrated Services Digital Network (ISDN) connection; -
the client is communicatively connected to the local server over a first Local Area Network (LAN) connection; and the remote server is communicatively connected to the file server over a second LAN connection, wherein the file server manages access to the file.
-
-
17. A method as recited in claim 9, wherein:
-
the remote server is communicatively coupled to the file server that manages access to the file; and the remote server determines the specific access mode by successively requesting the file server to open the file in successively different access modes until the file server successfully opens the file, wherein successively requesting comprises starting with the most extended access mode and proceeding to the next least restricted access mode left in the plurality of access modes, wherein that one access mode in which the file is opened successfully is identified as the specific access mode.
-
-
18. An apparatus for reducing client-server messages, comprising:
-
means for receiving a first request to open a file, wherein the first request includes first information that indicates a first access mode for opening the file; wherein the first request is sent from a client to a file server that manages access to the file; means for modifying the first information to indicate a most extended access mode for opening the file; means for sending the first request with the modified first information to the file server that manages access to the file; means for receiving a first response from the file server, wherein the first response comprises second information which indicates a specific access mode for opening the file that is granted by the file server; wherein the specific access mode is different and less restrictive than the first access mode; means for storing the second information in a cache; means for responding to the first request by creating and sending a second response to the client, wherein the second response indicates that the file is opened in the first access mode even though at the file server the file is opened in the specific access mode; means for delaying the closing of the file in response to a second request to close the file; wherein the closing of the file is delayed for a specified interval of time that represents an interval of time during which no requests to open the file have been received; and means for closing the file on the file server after the specified interval of time expires.
-
-
19. The apparatus of claim 18, wherein:
-
the most extended access mode identifies a largest set of types of operations, among a plurality of sets ranging from extended to restricted, which are allowed to be performed on the file after the file is opened; and the specific access mode is the most extended access mode.
-
-
20. The apparatus of claim 18, wherein:
-
the first access mode identifies a first set of types of operations that are allowed to be performed on the file after the file is opened; the specific access mode identifies a specific set of types of operations that are allowed to be performed on the file after the file is opened, wherein the specific set of types of operations includes at least the first set of types of operations.
-
-
21. The apparatus of claim 18, further comprising:
-
means for creating, prior to closing the file on the file server, a third response which indicates that the file is closed even though the closing of the file has been delayed; and means for responding to the second request to close the file by sending the third response to the client.
-
-
22. The apparatus of claim 18, further comprising:
-
means for receiving a third request to open the file; means for determining whether the file is still open at the file server by determining whether the second information is still stored in the cache; and means for responding to the third request if it is determined that the file is still open, wherein the means for responding comprise means for creating and sending a third response, wherein the third response is based at least in part on the second information.
-
-
23. The apparatus of claim 22, wherein:
-
the third request includes third information that indicates a second access mode for opening the file, wherein the second access mode is different than the first access mode; each of the first access mode, the second access mode, and the specific access mode identifies a set of types of operations that are allowed to be performed on the file after the file is opened in that access mode; and when the set of types of operations identified in the second access mode is included in the set of types of operations identified in the specific access mode, then the third response indicates that the file is opened in the second access mode.
-
-
24. An apparatus for reducing client-server messages, comprising:
-
one or more processors; and one or more stored sequences of instructions which, when executed by the one or more processors, cause the one or more processors to perform the steps of; receiving from a client a first request to open a file, wherein the first request includes a first access mask that indicates a first access mode of a plurality of access modes for opening the file, wherein the file is accessed through a remote server that is connected over a communication link; modifying the first access mask to indicate a most extended access mode from the plurality of access modes for opening the file; sending the first request with the modified first access mask to the remote server; receiving a first response from the remote server, wherein the first response comprises a first file handle to the file, wherein the first file handle is associated with a specific access mode of the plurality of access modes for opening the file; wherein the specific access mode is different and less restrictive than the first access mode; storing the first file handle in a cache; responding to the first request by creating and sending a second response to the client, wherein the second response indicates that the file is opened in the first access mode even though the file is opened in the specific access mode at a file server that manages access to the file; in response to a second request from the client to close the file, delaying the closing of the file; wherein the closing of the file is delayed for a specified interval of time; and closing the file after the specified interval of time expires and removing the first file handle from the cache.
-
-
25. The apparatus of claim 24, wherein the one or more stored sequences of instructions further comprise instructions which, when executed by the one or more processors, cause the one or more processors to perform the steps of:
prior to closing the file, performing the steps of; creating a third response which indicates that the file is closed even though the closing of the file has been delayed; and responding to the second request to close the file by sending the third response to the client.
-
26. The apparatus of claim 24, wherein the one or more stored sequences of instructions further comprise instructions which, when executed by the one or more processors, cause the one or more processors to perform the steps of:
-
receiving a third request to open the file from the client; determining whether the file is still open by determining whether the first file handle is still stored in the cache; and if it is determined that the file is still open, then responding to the third request by creating and sending a third response, wherein the third response includes at least a second file handle that is created based on the first file handle.
-
-
27. The apparatus of claim 26, wherein:
-
the third request includes a second access mask that indicates a second access mode of the plurality of access modes for opening the file, wherein the second access mode is different than the first access mode; each of the plurality of access modes identifies a set of types of operations that are allowed to be performed on the file after the file is opened in that access mode; and when the set of types of operations identified in the second access mode is included in the set of types of operations identified in the specific access mode, then the second file handle indicates that the file is opened in the second access mode.
-
-
28. The apparatus of claim 24, wherein:
-
the first request to open the file and the second request to close the file are associated with a specific user of the client; and the first request further includes a first data that indicates that no user except the specific user is allowed to perform any operation on the file until the file is closed.
-
-
29. The apparatus of claim 24, wherein:
-
the client is a first client of a plurality of clients; the first request to open the file and the second request to close the file are sent from the first client; and the first request comprises; a first share mask that indicates a first share mode for opening the file; and a first data that indicates that users of the plurality of clients are allowed to share the file according to the first share mode.
-
-
30. The apparatus of claim 24, wherein:
-
the remote server is communicatively coupled to the file server that manages access to the file; and the remote server determines the specific access mode by successively requesting the file server to open the file in successively different access modes until the file server successfully opens the file, wherein successively requesting comprises starting with the most extended access mode and proceeding to the next least restricted access mode left in the plurality of access modes, wherein that one access mode in which the file is opened successfully is identified as the specific access mode.
-
Specification