Client-side performance optimization system for streamed applications6959320
Abstract
An client-side performance optimization system for streamed applications provides several approaches for fulfilling client-side application code and data file requests for streamed applications. A streaming file system or file driver is installed on the client system that receives and fulfills application code and data requests from a persistent cache or the streaming application server. The client or the server can initiate the prefetching of application code and data to improve interactive application performance. A client-to-client communication mechanism allows local application customization to travel from one client machine to another without involving server communication. Applications are patched or upgraded via a change in the root directory for that application. The client can be notified of application upgrades by the server which can be marked as mandatory, in which case the client will force the application to be upgraded. The server broadcasts an application program's code and data and any client that is interested in that particular application program stores the broadcasted code and data for later use.
Claims
1. A process for client-side retrieval, storage, and execution of application programs and other related data streamed from a server across a computer network to a client system in a computer environment, comprising the steps of:
providing a streaming file system on said client;
wherein said streaming file system appears to install parts of an application program on said client sufficient for execution;
while executing the application program, said streaming file system receives requests from local processes of said client for application program code and data that are part of the application program not already installed when said application program code and data are needed;
loading a portion of said application program code and data into a persistent cache on said client wherein said portion of said application program code and data stored in said persistent cache is available for reuse after termination of execution of said application program; and
wherein said streaming file system satisfies said requests for said application program code and data by retrieving said requested application program code and data from said persistent cache or by retrieving said requested application program code and data from said server without interrupting the execution of the application program.
2. The process of claim 1, wherein said persistent cache is encrypted with a key not permanently stored on said client to prevent unauthorized use or duplication of application code or data; and wherein said key is sent to said client upon application startup from said server and said key is not stored in the application program's persistent storage area in said persistent cache.
3. The process of claim 1, wherein said client initiates the prefetching of application program code and data from said server; and wherein said client inspects program code and data file requests and consults the contents of said persistent cache as well as historic information about application program fetching patterns and uses said historic information to request additional blocks of application program code and data from said server that said client expects will be needed soon.
4. The process of claim 1, wherein said server initiates the prefetching of application program code and data for said client; and wherein said server examines the patterns of requests made by said client and selectively returns to said client additional blocks that said client did not request but is likely to need soon.
5. The process of claim 1, further comprising the step of:
providing a client-to-client communication mechanism that allows local application customization to migrate from one client machine to another without involving server communication;
wherein when a user wishes to run an application on a second machine, but wishes to retain customizations made previously on the first, said client-to-client mechanism contacts the first machine to retrieve customized files and other customization data and
wherein unmodified files are retrieved from said server.
6. The process of claim 1, further comprising the step of:
wherein said streaming file system is a copy-on-write file system that allows applications to write configuration or initialization files where they want to without rewriting the application, and without disturbing the local customization of other clients;
wherein each block of data in said persistent cache is marked as clean or dirty;
wherein pages marked as dirty have been customized by the application program and cannot be removed from the cache without losing client customization;
wherein pages marked as clean may be purged from the cache because they can be retrieved again from said server;
providing a cache index;
wherein said cache index indicates which pages in said persistent cache are clean and dirty; and
wherein said copy-on-write file system references said cache index to determine if a page is clean or dirty.
7. The process of claim 1, further comprising the step of:
marking specific files in said persistent cache as not modifiable;
wherein said streaming file system does not allow any data to be written to said specific files that are marked as not modifiable; and
wherein attempts by any processes to mark any of said specific files as modifiable will not succeed.
8. The process of claim 1, further comprising the step of:
maintaining checksums of application code and data in said persistent cache;
wherein when a block of code and/or data is requested by a local process said streaming file system computes the checksum of the data block before it is returned to the local process; and
wherein if a computed checksum does not match the checksum stored in said persistent cache the cache entry is invalidated and a fresh copy of the page is retrieved from said server.
9. The process of claim 1, further comprising the step of:
assigning each files in an application program a unique identifier;
wherein files that are changed or added in an application upgrade are given new identifiers never before used for that application program;
wherein files that are unchanged retain the same number; and
wherein directories whose contents change are also considered changes and if any file changes, this will cause its parent to change, all the way up to a root directory.
10. The process of claim 9, wherein when an application upgrade occurs said client is given a new root directory for the application program by said server; wherein said new root directory is used by said streaming file system to search for files in the application program; wherein files that do not change can be reused from said persistent cache without downloading them again from said server; and wherein files with new identifiers are retrieved from said server.
11. The process of claim 10, wherein said application upgrades can be marked as mandatory by said server causing the new root directory for the application program to be used immediately; and wherein said streaming file system contacts said server when an application program is started in order to receive any application upgrades.
12. The process of claim 1, wherein said server broadcasts an application program's code and data and any client that is interested in that particular application program stores the broadcasted code and data for later use.
13. A process for client-side retrieval, storage, and execution of application programs and other related data streamed from a server across a computer network to a client system in a computer environment, comprising the steps of:
providing a kernel-mode streaming file system driver on said client;
wherein said kernel-mode streaming file system appears to install parts of an application program on said client sufficient for execution;
providing a user-mode client on said client;
while executing the application program, said streaming file system receives requests from local processes of said client for application program code and data that are part of said application program not already installed when said application program code and data are needed;
loading a portion of said application program code and data into a persistent cache on said client wherein said portion of said application program code and data stored in said persistent cache is available for reuse;
wherein requests made to said streaming file system are directed to said user-mode client or retrieved from said persistent cache; and
wherein said user-mode client handles the application program code and data streams from said server and sends the results back to said streaming file system driver without interrupting the execution of the application program.
14. The process of claim 13, wherein said persistent cache is encrypted with a key not permanently stored on said client to prevent unauthorized use or duplication of application code or data; and wherein said key is sent to said client upon application startup from said server and said key is not stored in the application program's persistent storage area in said persistent cache.
15. The process of claim 13, wherein said client initiates the prefetching of application program code and data from said server; and wherein said client inspects program code and data file requests and consults the contents of said persistent cache as well as historic information about application program fetching patterns and uses said historic information to request additional blocks of application program code and data from said server that said client expects will be needed soon.
16. The process of claim 13, wherein said server initiates the prefetching of application program code and data for said client; and wherein said server examines the patterns of requests made by said client and selectively returns to said client additional blocks that said client did not request but is likely to need soon.
17. The process of claim 13, further comprising the step of:
providing a client-to-client communication mechanism that allows local application customization to migrate from one client machine to another without involving server communication;
wherein when a user wishes to run an application on a second machine, but wishes to retain customizations made previously on the first, said client-to-client mechanism contacts the first machine to retrieve customized files and other customization data and
wherein unmodified files are retrieved from said server.
18. The process of claim 13, further comprising the step of:
wherein said streaming file system is a copy-on-write file system that allows applications to write configuration or initialization files where they want to without rewriting the application, and without disturbing the local customization of other clients;
wherein each block of data in said persistent cache is marked as clean or dirty;
wherein pages marked as dirty have been customized by the application program and cannot be removed from the cache without losing client customization;
wherein pages marked as clean may be purged from the cache because they can be retrieved again from said server;
providing a cache index;
wherein said cache index indicates which pages in said persistent cache are clean and dirty; and
wherein said copy-on-write file system references said cache index to determine if a page is clean or dirty.
19. The process of claim 13, further comprising the step of:
marking specific files in said persistent cache as not modifiable;
wherein said streaming file system does not allow any data to be written to said specific files that are marked as not modifiable; and
wherein attempts by any processes to mark any of said specific files as modifiable will not succeed.
20. The process of claim 13, further comprising the step of:
maintaining checksums of application code and data in said persistent cache;
wherein when a block of code and/or data is requested by a local process said streaming file system computes the checksum of the data block before it is returned to the local process; and
wherein if a computed checksum does not match the checksum stored in said persistent cache the cache entry is invalidated and a fresh copy of the page is retrieved from said server.
21. The process of claim 13, further comprising the step of:
assigning each file in an application program a unique identifier;
wherein files that are changed or added in an application upgrade are given new identifiers never before used for that application program;
wherein files that are unchanged retain the same number;
wherein directories whose contents change are also considered changes and if any file changes, this will cause its parent to change, all the way up to a root directory.
22. The process of claim 21, wherein when an application upgrade occurs said client is given a new root directory for the application program by said server; wherein said new root directory is used by said streaming file system to search for files in the application program; wherein files that do not change can be reused from said persistent cache without downloading them again from said server; and wherein files with new identifiers are retrieved from said server.
23. The process of claim 22, wherein said application upgrades can be marked as mandatory by said server causing the new root directory for the application program to be used immediately; and wherein said streaming file system contacts said server when an application program is started in order to receive any application upgrades.
24. The process of claim 13, wherein said server broadcasts an application program's code and data and any client that is interested in that particular application program stores the broadcasted code and date for later use.
25. A process for client-side retrieval, storage, and execution of application programs and other related data streamed from a server across a computer network to a client system in a computer environment, comprising the steps of:
providing a streaming block driver on said client;
wherein said block driver provides the abstraction of a physical disk to a native file system already installed on the client operating system and appears to install parts of an application program on said client sufficient for execution;
loading a portion of said application program code and data into a persistent cache on said client wherein said application program code and data stored in said persistent cache is available for reuse;
wherein said block driver receives requests for application program code and data for physical block reads and writes from local processes of said client which said block driver satisfies out of said persistent cache on a standard file system that is backed by a physical disk drive without interrupting the execution of the application program; and
wherein said requests that cannot be satisfied by said persistent cache are sent to said server.
26. The process of claim 25, wherein said persistent cache is encrypted with a key not permanently stored on said client to prevent unauthorized use or duplication of application code or data; and wherein said key is sent to said client upon application startup from said server and said key is not stored in the application program's persistent storage area in said persistent cache.
27. The process of claim 25 wherein said client initiates the prefetching of application program code and data from said server; and wherein said client inspects program code and data file requests and consults the contents of said persistent cache as well as historic information about application program fetching patterns and uses said historic information to request additional blocks of application program code and data from said server that said client expects will be needed soon.
28. The process of claim 25, wherein said server initiates the prefetching of application program code and data for said client; and wherein said server examines the patterns of requests made by said client and selectively returns to said client additional blocks that said client did not request but is likely to need soon.
29. The process of claim 25, further comprising the step of:
providing a client-to-client communication mechanism that allows local application customization to migrate from one client machine to another without involving server communication;
wherein when a user wishes to run an application on a second machine, but wishes to retain customizations made previously on the first, said client-to-client mechanism contacts the first machine to retrieve customized files and other customization data; and
wherein unmodified files are retrieved from said server.
30. The process of claim 25, further comprising the step of:
wherein said block driver is a copy-on-write block driver that allows applications to write configuration or initialization files where they want to without rewriting the application, and without disturbing the local customization of other clients;
wherein each block of data in said persistent cache is marked as clean or dirty;
wherein pages marked as dirty have been customized by the application program and cannot be removed from the cache without losing client customization;
wherein pages marked as clean may be purged from the cache because they can be retrieved again from said server;
providing a cache index;
wherein said cache index indicates which pages in said persistent cache are clean and dirty; and
wherein said copy-on-write block driver references said cache index to determine if a page is clean or dirty.
31. The process of claim 25, further comprising the step of:
marking specific files in said persistent cache as not modifiable;
wherein said block driver does not allow any data to be written to said specific files that are marked as not modifiable; and
wherein attempts by any processes to mark any of said specific files as modifiable will not succeed.
32. The process of claim 25, further comprising the step of:
maintaining checksums of application code and data in said persistent cache;
wherein when a block of code and/or data is requested by a local process said streaming file system computes the checksum of the data block before it is returned to the local process; and
wherein if a computed checksum does not match the checksum stored n said persistent cache the cache entry is invalidated and a fresh copy of the page is retrieved from said server.
33. The process of claim 25, further comprising the step of:
assigning each file in an application program a unique identifier;
wherein files that are changed or added in an application upgrade are given new identifiers never before used for that application program;
wherein files that are unchanged retain the same number; and
wherein directories whose contents change are also considered changes and if any file changes, this will cause its parent to change, all the way up to a root directory.
34. The process of claim 33, wherein when an application upgrade occurs said client is given a new root directory for the application program by said server; wherein said new root directory is used by said block driver to search for files in the application program; ram; wherein files that do not change can be reused from said persistent cache without downloading them again from said server; and wherein files with new identifiers are retrieved from said server.
35. The process of claim 34, wherein said application upgrades can be marked as mandatory by said server causing the new root directory for the application program to be used immediately; and wherein said block driver contacts said server when an application program is started in order to receive any application upgrades.
36. The process of claim 25, wherein said server broadcasts an application program's code and data and any client that is interested in that particular application program stores the broadcasted code and data for later use.
37. A process for client-side retrieval, storage, and execution of application programs and other related data streamed from a server across a computer network to a client system in a computer environment, comprising the steps of:
providing a disk driver on said client;
providing a user-mode client on said client;
wherein said user-mode client appears to install parts of an application program on said client sufficient for execution;
while executing the application program, said disk driver sends all file requests that said disk driver receives to said user-mode client requesting for application program code and data that are part of said application program not already installed when said application program code and data are needed;
loading a portion of said application program code and data into a persistent cache on said client wherein said application program code and data stored in said persistent cache is available for reuse; and
wherein said user-mode client attempts to satisfy said file requests from said persistent cache or from said server without interrupting the execution of the application program.
38. The process of claim 37, wherein said persistent cache is encrypted with a key not permanently stored on said client to prevent unauthorized use or duplication of application code or data; and wherein said key is sent to said client upon application startup from said server and said key is not stored in the application program's persistent storage area in said persistent cache.
39. The process of claim 37, wherein said client initiates the prefetching of application program code and data from said server; and wherein said client inspects program code and data file requests and consults the contents of said persistent cache as well as historic information about application program fetching patterns and uses said historic information to request additional blocks of application program code and data from said server that said client expects will be needed soon.
40. The process of claim 37, wherein said server initiates the prefetching of application program code and data for said client; and wherein said server examines the patterns of requests made by said client and selectively returns to said client additional blocks that said client did not request but is likely to need soon.
41. The process of claim 37, further comprising the step of:
providing a client-to-client communication mechanism that allows local application customization to migrate from one client machine to another without involving server communication;
wherein when a user wishes to run an application on a second machine, but wishes to retain customizations made previously on the first, said client-to-client mechanism contacts the first machine to retrieve customized files and other customization data; and
wherein unmodified files are retrieved from said server.
42. The process of claim 37, further comprising the step of:
wherein said user-mode client is a copy-on-write user-mode client that allows applications to write configuration or initialization files where they want to without rewriting the application, and without disturbing the local customization of other clients;
wherein each block of data in said persistent cache is marked as clean or dirty;
wherein pages marked as dirty have been customized by the application program and cannot be removed from the cache without losing client customization;
wherein pages marked as clean may be purged from the cache because they can be retrieved again from said server;
providing a cache index;
wherein said cache index indicates which pages in said persistent cache are clean and dirty; and
wherein said copy-on-write user-mode client references said cache index to determine if a page is clean or dirty.
43. The process of claim 37, further comprising the step of:
marking specific files in said persistent cache as not modifiable;
wherein said user-mode client does not allow any data to be written to said specific files that are marked as not modifiable; and
wherein attempts by any processes to mark any of said specific files as modifiable will not succeed.
44. The process of claim 37, further comprising the step of:
maintaining checksums of application code and data in said persistent cache;
wherein when a block of code and/or data is requested by a local process said streaming file system computes the checksum of the data block before it is returned to the local process; and
wherein if a computed checksum does not match the checksum stored n said persistent cache the cache entry is invalidated and a fresh copy of the page is retrieved from said server.
45. The process of claim 37, further comprising the step of:
assigning each file in an application program a unique identifier;
wherein files that are changed or added in an application upgrade are given new identifiers never before used for that application program;
wherein files that are unchanged retain the same number; and
wherein directories whose contents change are also considered changes and if any file changes, this will cause its parent to change, all the way up to a root directory.
46. The process of claim 45, wherein when an application upgrade occurs said client is given a new root directory for the application program by said server; wherein said new root directory is used by said user-mode client to search for files in the application program; wherein files that do not change can be reused from said persistent cache without downloading them again from said server; and wherein files with new identifiers are retrieved from said server.
47. The process of claim 46, wherein said application upgrades can be marked as mandatory by said server causing the new root directory for the application program to be used immediately; and wherein said user-mode client contacts said server when an application program is started in order to receive any application upgrades.
48. The process of claim 37, wherein said server broadcasts an application program's code and data and any client that is interested in that particular application program stores the broadcasted code and data for later use.
49. An apparatus for client-side retrieval, storage, and execution of application programs and other related data streamed from a server across a computer network to a client system in a computer environment, comprising:
a streaming file system on said client;
wherein said streaming file system appears to install parts of an application program on said client sufficient for execution;
while executing the application program, said streaming file system receives requests from local processes of said client for application program code or data that are part of an application program not already installed when said application program code and data are needed;
a persistent cache on said client wherein the persistent cache stores a portion of said application program code and data, and wherein said portion of said application program code and data is available for reuse after termination of execution of said application program; and
wherein said streaming file system satisfies said requests for said application program code and data by retrieving said requested application program code and data from said persistent cache stored in a native file system or by retrieving said requested application program code and data from said server without interrupting the execution of the application program.
50. The apparatus of claim 49, wherein said persistent cache is encrypted with a key not permanently stored on said client to prevent unauthorized use or duplication of application code or data; and wherein said key is sent to said client upon application startup from said server and said key is not stored in the application program's persistent storage area in said persistent cache.
51. The apparatus of claim 49, wherein said client initiates the prefetching of application program code and data from said server; and wherein said client inspects program code and data file requests and consults the contents of said persistent cache as well as historic information about application program fetching patterns and uses said historic information to request additional blocks of application program code and data from said server that said client expects will be needed soon.
52. The apparatus of claim 49, wherein said server initiates the prefetching of application program code and data for said client; and wherein said server examines the patterns of requests made by said client and selectively returns to said client additional blocks that said client did not request but is likely to need soon.
53. The apparatus of claim 49, further comprising:
a client-to-client communication mechanism that allows local application customization to migrate from one client machine to another without involving server communication;
wherein when a user wishes to run an application on a second machine, but wishes to retain customizations made previously on the first, said client-to-client mechanism contacts the first machine to retrieve customized files and other customization data; and
wherein unmodified files are retrieved from said server.
54. The apparatus of claim 49, further comprising:
wherein said streaming file system is a copy-on-write file system that allows applications to write configuration or initialization files where they want to without rewriting the application, and without disturbing the local customization of other clients;
wherein each block of data in said persistent cache is marked as clean or dirty;
wherein pages marked as dirty have been customized by the application program and cannot be removed from the cache without losing client customization;
wherein pages marked as clean may be purged from the cache because they can be retrieved again from said server;
a cache index;
wherein said cache index indicates which pages in said persistent cache are clean and dirty; and
wherein said copy-on-write file system references said cache index to determine if a page is clean or dirty.
55. The apparatus of claim 49, further comprising:
a module for marking specific files in said persistent cache as not modifiable;
wherein said streaming file system does not allow any data to be written to said specific files that are marked as not modifiable; and
wherein attempts by any processes to mark any of said specific files as modifiable will not succeed.
56. The apparatus of claim 49, further comprising:
a module for maintaining checksums of application code and data in said persistent cache;
wherein when a block of code and/or data is requested by a local process said streaming file system computes the checksum of the data block before it is returned to the local process; and
wherein if a computed checksum does not match the checksum stored n said persistent cache the cache entry is invalidated and a fresh copy of the page is retrieved from said server.
57. The apparatus of claim 49, further comprising:
a module for assigning each file in an application program a unique identifier;
wherein files that are changed or added in an application upgrade are given new identifiers never before used for that application program;
wherein files that are unchanged retain the same number; and
wherein directories whose contents change are also considered changes and if any file changes, this will cause its parent to change, all the way up to a root directory.
58. The apparatus of claim 57, wherein when an application upgrade occurs said client is given a new root directory for the application program by said server; wherein said new root directory is used by said streaming file system to search for files in the application program; wherein files that do not change can be reused from said persistent cache without downloading them again from said server; and wherein files with new identifiers are retrieved from said server.
59. The apparatus of claim 58, wherein said application upgrades can be marked as mandatory by said server causing the new root directory for the application program to be used immediately; and wherein said streaming file system contacts said server when an application program is started in order to receive any application upgrades.
60. The apparatus of claim 49, wherein said server broadcasts an application program's code and data and any client that is interested in that particular application program stores the broadcasted code and data for later use.
61. An apparatus for client-side retrieval, storage, and execution of application program and other related data streamed from a server across a computer network to a client system in a computer environment, comprising:
a kernel-mode streaming file system driver on said client;
wherein said kernel-mode streaming file system appears to install parts of an application program on said client sufficient for execution;
a user-mode client on said client;
while executing the application program, said streaming file system receives requests from local processes of said client for application program code and data that are part of the application program not already installed when said application program code and data are needed;
a persistent cache on said client wherein said persistent cache has a portion of said application program code and data loaded therein and wherein said portion of said application program code and data is available for reuse after termination of execution of said application program;
wherein requests made to said streaming file system are directed to said user-mode client or retrieved from said persistent cache; and
wherein said user-mode client handles the application program code and data streams from said server and sends the results back to said streaming file system driver without interrupting the execution of the application program.
62. The apparatus of claim 61, wherein said persistent cache is encrypted with a key not permanently stored on said client to prevent unauthorized use or duplication of application code or data; and wherein said key is sent to said client upon application startup from said server and said key is not stored in the application program's persistent storage area in said persistent cache.
63. The apparatus of claim 61, wherein said client initiates the prefetching of application program code and data from said server; and wherein said client inspects program code and data file requests and consults the contents of said persistent cache as well as historic information about application program fetching patterns and uses said historic information to request additional blocks of application program code and data from said server that said client expects will be needed soon.
64. The apparatus of claim 61, wherein said server initiates the prefetching of application program code and data for said client; and wherein said server examines the patterns of requests made by said client and selectively returns to said client additional blocks that said client did not request but is likely to need soon.
65. The apparatus of claim 61, further comprising:
a client-to-client communication mechanism that allows local application customization to migrate from one client machine to another without involving server communication;
wherein when a user wishes to run an application on a second machine, but wishes to retain customizations made previously on the first, said client-to-client mechanism contacts the first machine to retrieve customized files and other customization data; and
wherein unmodified files are retrieved from said server.
66. The apparatus of claim 61, further comprising:
wherein said streaming file system is a copy-on-write file system that allows applications to write configuration or initialization files where they want to without rewriting the application, and without disturbing the local customization of other clients;
wherein each block of data in said persistent cache is marked as clean or dirty;
wherein pages marked as dirty have been customized by the application program and cannot be removed from the cache without losing client customization;
wherein pages marked as clean may be purged from the cache because they can be retrieved again from said server; a cache index;
wherein said cache index indicates which pages in said persistent cache are clean and dirty; and
wherein said copy-on-write file system references said cache index to determine if a page is clean or dirty.
67. The apparatus of claim 61, further comprising: a module for marking specific files in said persistent cache as not modifiable;
wherein said streaming file system does not allow any data to be written to said specific files that are marked as not modifiable; and
wherein attempts by any processes to mark any of said specific files as modifiable will not succeed.
68. The apparatus of claim 61, further comprising: a module for maintaining checksums of application code and data in said persistent cache;
wherein when a block of code and/or data is requested by a local process said streaming file system computes the checksum of the data block before it is returned to the local process; and
wherein if a computed checksum does not match the checksum stored n said persistent cache the cache entry is invalidated and a fresh copy of the page is retrieved from said server.
69. The apparatus of claim 61, further comprising:
a module for assigning each file in an application program a unique identifier;
wherein files that are changed or added in an application upgrade are given new identifiers never before used for that application program; wherein files that are unchanged retain the same number; and
wherein directories whose contents change are also considered changes and if any file changes, this will cause its parent to change, all the way up to a root directory.
70. The apparatus of claim 69, wherein when an application upgrade occurs said client is given a new root directory for the application program by said server; wherein said new root directory is used by said streaming file system to search for files in the application program; wherein files that do not change can be reused from said persistent cache without downloading them again from said server; and wherein files with new identifiers are retrieved from said server.
71. The apparatus of claim 70, wherein said application upgrades can be marked as mandatory by said server causing the new root directory for the application program to be used immediately; and wherein said streaming file system contacts said server when an application program is started in order to receive any application upgrades.
72. The apparatus of claim 61, wherein said server broadcasts an application program's code and data and any client that is interested in that particular application program stores the broadcasted code and data for later use.
73. An apparatus for client-side retrieval, storage, and execution of application program and other related data streamed from a server across a computer network to a client system in a computer environment, comprising:
a streaming block driver on said client;
wherein said block driver provides the abstraction of a physical disk to a native file system already installed on the client operating system and appears to install parts of an application program on said client sufficient for execution;
a persistent cache on said client wherein said persistent cache has a portion of said application program code and data stored therein and wherein said application program code and data stored in said persistent cache is available for reuse after termination of execution of said application program;
wherein said block driver receives requests for said application program code and data for physical block reads and writes from local processes of said client which said block driver satisfies out of said persistent cache on a standard file system that is backed by a physical disk drive without interrupting the execution of the application program; and
wherein said requests that cannot be satisfied by said persistent cache are sent to said server.
74. The apparatus of claim 73, wherein said persistent cache is encrypted with a key not permanently stored on said client to prevent unauthorized use or duplication of application code or data; and wherein said key is sent to said client upon application startup from said server and said key is not stored in the application program's persistent storage area in said persistent cache.
75. The apparatus of claim 73, wherein said client initiates the prefetching of application program code and data from said server; and wherein said client inspects program code and data file requests and consults the contents of said persistent cache as well as historic information about application program fetching patterns and uses this information to request additional blocks of application program code and data from said server that said client expects will be needed soon.
76. The apparatus of claim 73, wherein said server initiates the prefetching of application program code and data for said client; and wherein said server examines the patterns of requests made by said client and selectively returns to said client additional blocks that said client did not request but is likely to need soon.
77. The apparatus of claim 73, further comprising:
a client-to-client communication mechanism that allows local application customization to migrate from one client machine to another without involving server communication;
wherein when a user wishes to run an application on a second machine, but wishes to retain customizations made previously on the first, said client-to-client mechanism contacts the first machine to retrieve customized files and other customization data; and
wherein unmodified files are retrieved from said server.
78. The apparatus of claim 73, further comprising:
wherein said block driver is a copy-on-write block driver that allows applications to write configuration or initialization files where they want to without rewriting the application, and without disturbing the local customization of other clients;
wherein each block of data in said persistent cache is marked as clean or dirty;
wherein pages marked as dirty have been customized by the application program and cannot be removed from the cache without losing client customization;
wherein pages marked as clean may be purged from the cache because they can be retrieved again from said server;
a cache index;
wherein said cache index indicates which pages in said persistent cache are clean and dirty; and
wherein said copy-on-write block driver references said cache index to determine if a page is clean or dirty.
79. The apparatus of claim 73, further comprising:
a module for making specific files in said persistent cache as not modifiable;
wherein said block driver does not allow any data to be written to said specific files that are marked as not modifiable; and
wherein attempts by any processes to mark any of said specific files as modifiable will not succeed.
80. The apparatus of claim 73, further comprising:
a module for maintaining checksums of application code and data in said persistent cache;
wherein when a block of code and/or data is requested by a local process said streaming file system computes the checksum of the data block before it is returned to the local process; and
wherein if a computed checksum does not match the checksum stored n said persistent cache the cache entry is invalidated and a fresh copy of the page is retrieved from said server.
81. The apparatus of claim 73, further comprising:
a module for assigning each file in an application program a unique identifier;
wherein files that are changed or added in an application upgrade are given new identifiers never before used for that application program; wherein files that are unchanged retain the same number; and
wherein directories whose contents change are also considered changes and if any file changes, this will cause its parent to change, all the way up to a root directory.
82. The apparatus of claim 81, wherein when an application upgrade occurs said client is given a new root directory for the application program by said server; wherein said new root directory is used by said block driver to search for files in the application program wherein files that do not change can be reused from said persistent cache without downloading them again from said server; and wherein files with new identifiers are retrieved from said server.
83. The apparatus of claim 82, wherein said application upgrades can be marked as mandatory by said server causing the new root directory for the application program to be used immediately; and wherein said block driver contacts said server when an application program is started in order to receive any application upgrades.
84. The apparatus of claim 73, wherein said server broadcasts an application program's code and data and any client that is interested in that particular application program stores the broadcasted code and data for later use.
85. An apparatus for client-side retrieval, storage, and execution of application programs and other related data streamed from a server across a computer network to a client system in a computer environment, comprising:
a disk driver on said client;
a user-mode client on said client;
wherein said user-mode client appears to install parts of an application program on said client sufficient for execution;
while executing the application program, said disk driver sends all file requests that said disk driver receives to said user-mode client requesting for application program code and data that are part of said application program not already installed when said application program code and data are needed;
a persistent cache on said client wherein said persistent cache has a portion of said application program code and data stored therein and wherein said application program code and data stored in said persistent cache is available for reuse after termination of said application program; and
wherein said user-mode client attempts to satisfy said file requests from said persistent cache or from said server without interrupting the execution of the application program.
86. The apparatus of claim 85, wherein said persistent cache is encrypted with a key not permanently stored on said client to prevent unauthorized use or duplication of application code or data; and wherein said key is sent to said client upon application startup from said server and said key is not stored in the application program's persistent storage area in said persistent cache.
87. The apparatus of claim 85, wherein said client initiates the prefetching of application program code and data from said server; and wherein said client inspects program code and data file requests and consults the contents of said persistent cache as well as historic information about application program fetching patterns and uses said historic information to request additional blocks of application program code and data from said server that said client expects will be needed soon.
88. The apparatus of claim 85, wherein said server initiates the prefetching of application program code and data for said client; and wherein said server examines the patterns of requests made by said client and selectively returns to said client additional blocks that said client did not request but is likely to need soon.
89. The apparatus of claim 85, further comprising:
a client-to-client communication mechanism that allows local application customization to migrate from one client machine to another without involving server communication;
wherein when a user wishes to run an application on a second machine, but wishes to retain customizations made previously on the first, said client-to-client mechanism contacts the first machine to retrieve customized files and other customization data; and
wherein unmodified files are retrieved from said server.
90. The apparatus of claim 85, further comprising:
wherein said user-mode client is a copy-on-write user-mode client that allows applications to write configuration or initialization files where they want to without rewriting the application, and without disturbing the local customization of other clients;
wherein each block of data in said persistent cache is marked as clean or dirty;
wherein pages marked as dirty have been customized by the application program and cannot be removed from the cache without losing client customization;
wherein pages marked as clean may be purged from the cache because they can be retrieved again from said server;
a cache index;
wherein said cache index indicates which pages in said persistent cache are clean and dirty; and
wherein said copy-on-write user-mode client references said cache index to determine if a page is clean or dirty.
91. The apparatus of claim 85, further comprising:
a module for marking specific files in said persistent cache as not modifiable;
wherein said user-mode client does not allow any data to be written to said specific files that are marked as not modifiable; and
wherein attempts by any processes to mark any of said specific files as modifiable will not succeed.
92. The apparatus of claim 85, further comprising:
a module for maintaining checksums of application code and data in said persistent cache;
wherein when a block of code and/or data is requested by a local process said streaming file system computes the checksum of the data block before it is returned to the local process; and
wherein if a computed checksum does not match the checksum stored in said persistent cache the cache entry is invalidated and a fresh copy of the page is retrieved from said server.
93. The apparatus of claim 85, further comprising:
a module for assigning each file in an application program a unique identifier;
wherein files that are changed or added in an application upgrade are given new identifiers never before used for that application program; wherein files that are unchanged retain the same number; and
wherein directories whose contents change are also considered changes and if any file changes, this will cause its parent to change, all the way up to a root directory.
94. The apparatus of claim 93, wherein when an application upgrade occurs said client is given a new root directory for the application program by said server; wherein said new root directory is used by said user-mode client to search for files in the application program; wherein files that do not change can be reused from said persistent cache without downloading them again from said server; and wherein files with new identifier are retrieved from said server.
95. The apparatus of claim 94, wherein said application upgrades can be marked as mandatory by said server causing the new root directory for the application program to be used immediately; and wherein said user-mode client contacts said serve when an application program is started in order, to receive any application upgrades.
96. The apparatus of claim 85, wherein said server broadcasts an application program's code and data and any client that is interested in that particular application program stores the broadcasted code and data for later use.
Description
BACKGROUND OF THE INVENTION
1. Technical Field
The invention relates to the streaming of computer program object code across a network in a computer environment. More particularly, the invention relates to client-side data retrieval, storage, and execution performance optimization techniques for computer program object code and other related data streamed across a network from a server.
2. Description of the Prior Art
Retail sales models of computer application programs are fairly straight forward. The consumer either purchases the application program from a retailer that is either a brick and mortar or an ecommerce entity. The product is delivered to the consumer in a shrink-wrap form.
The consumer installs the program from a floppy disk or a CD-ROM included in the packaging. A serial number is generally provided that must be entered at installation or the first time the program is run. Other approaches require that the CD-ROM be present whenever the program is run. However, CD-ROMs are easily copied using common CDR technology.
Another approach is for the consumer to effectuate the purchase through an ecommerce entity. The application program is downloaded in its entirety to the consumer across the Internet. The consumer is emailed a serial number that is required to run the program. The consumer enters the serial number at the time the program is installed or the first time the program is run.
Once the application program is installed on a machine, it resides on the machine, occupying precious hard disk space, until It is physically removed. The installer portion of the program can also be installed on a server along with the installation files. Users within an intranet can install the program from the server, across the network, onto their machines. The program is a full installation of the program and resides on the user's machine until it is manually removed.
Trial versions of programs are also available online that are a partial or full installation of the application program. The program executes normally for a preset time period. At the end of the time period, the consumer is told that he must purchase the program and execution is terminated. The drawback to this approach is that there is an easy way for the consumer to fool the program. The consumer simply uninstalls the program and then reinstalls it, thereby restarting the time period.
Additionally, piracy problems arise once the application program is resident on the consumer's computer. Serial numbers for programs are easily obtained across the Internet. Software companies lose billions of dollars a year in revenue because of this type of piracy.
The above approaches fail to adequately protect software companies' revenue stream. These approaches also require the consumer to install a program that resides indefinitely on the consumer's hard disk, occupying valuable space even though the consumer may use the program infrequently.
The enterprise arena allows Application Service Providers (ASP) to provide browser-based implementations such as Tarantella offered by Santa Cruz Operation, Inc. in Santa Cruz, Calif. and Metaframe offered by Citrix Systems Inc. of Fort Lauderdale, Fla. A remote application portal site allows the user to click on an application in his browser to execute the application. The application runs on the portal site and GUI interfaces such as display, keystrokes and mouse clicks are transferred over the wire. The access to the program is password protected. This approach allows the provider to create an audit trail and to track the use of an application program.
AppStream Inc. of Palo Alto, Calif. uses Java code streamlets to provide streaming applications to the user. The system partitions a Web application program into Java streamlets. Java streamlets are then streamed to the user's computer on an as-needed basis. The application runs on the user's computer, but is accessed through the user's network browser.
The drawback to the browser-based approaches is that the user is forced to work within his network browser, thereby adding another layer of complexity. The browser or Java program manages the application program's run-time environment. The user loses the experience that the software manufacturer had originally intended for its product including features such as application invocation based on file extension associations.
It would be advantageous to provide a client-side performance optimization system for streamed applications that enables a client system to efficiently stream and execute application programs that are remotely served from a server. It would further be advantageous to provide a client-side performance optimization system for streamed applications that easily integrates into the client system's operating system.
SUMMARY OF THE INVENTION
The invention provides a client-side performance optimization system for streamed applications. The system enables a client system to efficiently stream and execute application programs that are remotely served from a server. In addition, the invention provides a system that that easily integrates into the client system's operating system.
The invention provides several approaches for fulfilling client-side application code and data file requests for streamed applications. A streaming file system or file driver is installed on the client system that receives and fulfills application code and data requests.
One approach installs an application streaming file system on the client machine that appears to contain the installed application. The application streaming file system receive all requests for code or data that are part of the application and satisfies requests for application code or data by retrieving it from its persistent cache or by retrieving it directly from the streaming application server. Code or data retrieved from the server is placed in the cache for reuse.
Another approach installs a kernel-mode streaming file system driver and a user-mode client. Requests made to the streaming file system driver are directed to the user-mode client which handles the streams from the application streaming server or persistent cache and sends the results back to the driver.
Yet another approach is comprised of a streaming block driver on the client system. It appears as a physical disk to the native file system already installed on the client operating system. The driver receives requests for application code and data block reads and writes and satisfies the requests from the persistent cache or the streaming application server.
A final approach adds a disk driver and a user mode client on the client system. The disk driver sends program code and data requests to the user-mode client which satisfies them out of the persistent cache or by going to the streaming application server.
The persistent cache may be encrypted with a key not permanently stored on the client to prevent unauthorized use or duplication of application code or data. The key is sent to the client by the streaming application server upon application startup and is not stored in the application's persistent storage area.
The client can initiate the prefetching of application code and data to improve interactive application performance. The client software examines code and data requests and consults the contents of the persistent cache as well as historic information about application fetching patterns. It uses this information to request additional blocks of code and data from the streaming application server that it expects will be needed soon.
The server also initiates prefetching of application code and data by examining the patterns of requests made by the client and selectively returns to the client additional blocks that the client did not request but is likely to need soon.
A client-to-client communication mechanism allows local application customization to travel from one client machine to another without involving server communication.
A local copy-on-write file system allows some applications to write configuration or initialization files where they want to without rewriting the application, and without disturbing the local customization of other clients.
The invention disallows modifications to certain application files to prevent virus infections and reduce the chance of accidental application corruption. The system does not allow any data to be written to files that are marked as not modifiable. Attempts to mark the file as modifiable will not succeed.
The invention maintains checksums of application code and data and repairs damaged or deleted files by retrieving another copy from the application streaming server.
Applications are patched or upgraded via a change in the root directory for that application. The client can be notified of application upgrades by the streaming application server. The upgrades can be marked as mandatory, in which case the client will force the application to be upgraded.
The streaming application server broadcasts an application program's code and data and any client that is interested in that particular application program stores the broadcasted code and data for later use.
Other aspects and advantages of the invention will become apparent from the following detailed description in combination with the accompanying drawings, illustrating, by way of example, the principles of the invention.
BRIEF DESCRIPTION OF THE DRAWINGS
FIG. 1 is a block schematic diagram of a preferred embodiment of the invention showing components on the server that deal with users subscribing to and running applications according to the invention;
FIG. 2 is a block schematic diagram of a preferred embodiment of the invention showing the client components supporting application delivery and execution according to the invention;
FIG. 3 is a block schematic diagram of a preferred embodiment of the invention showing the components needed to install applications on the client according to the invention;
FIG. 4 is a block schematic diagram of the Builder that takes an existing application and extracts the Application File Pages for that application according to the invention;
FIG. 5a is a block schematic diagram illustrating how the Client Network Spoofer is used to handle mapping TCP interfaces to HTTP interfaces according to the invention;
FIG. 5b is a block schematic diagram illustrating how the Client Network Spoofer is used to handle mapping TCP interfaces to HTTP interfaces according to the invention;
FIG. 6a is a block schematic diagram showing several different components of the client software according to the invention;
FIG. 6b is a block schematic diagram showing the use of volatile and non-volatile storage of code and data in the client and server according to the invention;
FIG. 7a is a block schematic diagram showing one of two ways in which data may be compressed while in transit between the server and client according to the invention;
FIG. 7b is a block schematic diagram showing the other way in which data may be compressed while in transit between the server and client according to the invention;
FIG. 8 is a block schematic diagram showing an organization of the streaming client software according to the invention;
FIG. 9 is a block schematic diagram showing an alternative organization of the streaming client software according to the invention;
FIG. 10 is a block schematic diagram showing the application streaming software consisting of a streaming block driver according to the invention;
FIG. 11 is a block schematic diagram showing the application streaming software has been divided into a disk driver and a user mode client according to the invention;
FIG. 12 is a block schematic diagram showing the unencrypted and encrypted client caches according to the invention;
FIG. 13 is a block schematic diagram showing an application generating a sequence of code or data requests to the operating system according to the invention;
FIG. 14 is a block schematic diagram showing server-based prefetching according to the invention;
FIG. 15 is a block schematic diagram showing a client-to-client communication mechanism that allows local application customization to travel from one client machine to another without involving server communication according to the invention;
FIG. 16 is a block schematic diagram showing a client cache with extensions for supporting local file customization according to the invention;
FIG. 17 is a block schematic diagram showing aspects of a preferred embodiment of the invention related to load balancing and hardware fail over according to the invention;
FIG. 18 is a block schematic diagram showing the benefits to the use of compression in the streaming of Application File Pages according to the invention;
FIG. 19 is a block schematic diagram showing pre-compression of Application File Pages according to the invention;
FIG. 20 is a block schematic diagram showing multi-page compression of Application File Pages according to the invention;
FIG. 21 is a block schematic diagram showing profile-based prefetching according to the invention;
FIG. 22 is a block schematic diagram showing the use of tokens and a License Server according to the invention;
FIG. 23 is a block schematic diagram showing a flowchart for the Builder Install Monitor according to the invention;
FIG. 24 is a block schematic diagram showing a flowchart for the Builder Application Profiler according to the invention;
FIG. 25 is a block schematic diagram showing a flowchart for the Builder SAS Packager according to the invention;
FIG. 26a is a block schematic diagram showing versioning support according to the invention;
FIG. 26b is a block schematic diagram showing versioning support according to the invention;
FIG. 27 is a block schematic diagram showing a data flow diagram for the Streamed Application Set Builder according to the invention;
FIG. 28 is a block schematic diagram showing the Streamed Application Set format according to the invention;
FIG. 29 is a block schematic diagram showing an SAS client using a device driver paradigm according to the invention;
FIG. 30 is a block schematic diagram showing an SAS client using a file system paradigm according to the invention;
FIG. 31a through 31h is a schematic diagram showing various components of the AppinstallBlock format according to the invention;
FIG. 32 is a block schematic diagram showing the Application Install Block lifecycle according to the invention;
FIG. 33 is a block schematic diagram showing peer caching according to the invention;
FIG. 34 is a block schematic diagram showing proxy caching according to the invention;
FIG. 35 is a block schematic diagram showing multicast within a LAN and a packet protocol according to the invention;
FIG. 36 is a block schematic diagram showing concurrent requests for application server pages, for the case when the page is first requested through the proxy according to the invention;
FIG. 37 is a block schematic diagram showing concurrent requests for application server pages, for the case when the page is first requested through the peer caching according to the invention;
FIG. 38 is a block schematic diagram showing concurrent requests for application server pages, for the case when the page is received only through peer caching according to the invention;
FIG. 39 is a block schematic diagram showing a client-server system using peer and proxy caching according to the invention;
FIG. 40 is a block schematic diagram showing a preferred embodiment of the invention preventing piracy of remotely served, locally executed applications according to the invention;
FIG. 41 is a block schematic diagram showing the filtering of accesses to remote application files according to the invention;
FIG. 42 is a block schematic diagram showing the filtering of accesses to remote files based on process code location according to the invention;
FIG. 43 is a block schematic diagram showing the filtering of accesses to remote files based on targeted file section according to the invention;
FIG. 44 is a block schematic diagram showing the filtering of accesses to remote files based on surmised purpose according to the invention; and
FIG. 45 is a block schematic diagram showing the filtering of accesses to remote files based on past access history according to the invention.
DETAILED DESCRIPTION OF THE INVENTION
The invention is embodied in a client-side performance optimization system for streamed applications. A system according to the invention enables a client system to efficiently stream and execute application programs that are remotely served from a server. In addition, the invention provides a system that easily integrates into the client system's operating system.
The invention provides a highly efficient and secure application delivery system in conjunction with the adaptively optimized execution of applications across a network such as the Internet, a corporate intranet, or a wide area network. This is done in such a way that existing applications do not need to be recompiled or recoded. Furthermore, the invention is a highly scalable, load-balancing, and fault-tolerant system that provides anti-piracy protection of the streamed applications.
When using the invention, an end-user requests applications that are resident on remote systems to be launched and run on the end-user's local system. The end-user's local system is called the client or client system, e.g., a desktop, laptop, palmtop, or information appliance. A remote system is a called a server or server system and is located within a collection of one or more servers called a server cluster.
From the point of view of the client system, the application appears to be installed locally on the client even though it was initially installed on a different computer system. The applications execute locally on the client system and not on the server system. To achieve this result, the application is converted into a form suitable for streaming over the network. The streaming-enabled form of an application is called the Streamed Application Set (SAS) and the conversion process is termed the SAS Builder. The conversion of an application into its SAS form typically takes place on a system different from either an end-user client system or an Application Service Provider Server Cluster. This system is called the SAS Conversion System or, simply, the conversion system.
Components of the invention are installed on the client system to support activities such as the installation, invocation, and execution of a SAS-based application. Other components of the invention are installed on the server system to support activities such as the verification of end user application subscription and license data and the transfer and execution of a SAS-based application on the client system. Some of the client and some of the server components run in the kernel-mode while other components run in the usual user-mode.
The term Application Service Provider (ASP) refers to an entity that uses the server components on one or more server systems, i.e., an ASP Server Cluster, to deliver applications to end-user client systems. Such an entity could be, for example, a software manufacturer, an e-commerce vendor that rents or leases software, or a service department within a company. The invention enables an ASP to deliver applications across a network, in a highly efficient and secure way; the applications are adaptively optimized for execution on an end-user's client system.
A number of techniques are employed to increase the overall performance of the delivery of an application and its subsequent execution by minimizing the effect of network latency and bandwidth. Among the techniques employed are: the SAS Builder identifies sequences of frequently accessed application pages and uses this information when generating a SAS; individual SAS pages and sequences of SAS pages are compressed and cached in an in-memory cache on the server system; various aspects of the applications are monitored during their actual use on a client and the resulting profiling data is used by the client to pre-fetch (pull) and by the server to send (push) additional pages which have a high likelihood of being used prior to their actual use; and SAS pages are cached locally on a client for their immediate use when an application is invoked.
Aggregate profile data for an application, obtained by combining the profile data from all the end-user client systems running the application, is used to increase the system performance as well. A number of additional caching techniques that improve both system scalability and performance are also employed. The above techniques are collectively referred to as collaborative caching.
In an embodiment of the invention, the SAS Builder consists of three phases: installation monitoring, execution profiling, and application stream packaging. In the final SAS Builder phase, the Application Stream Packager takes the information gathered by the Application Install Monitor and the Application Execution Profiler and creates the SAS form of the application, which consists of a Stream Enabled Application Pages File and a Stream Enabled Application Install Block.
The Stream Enabled Application Install Block is used to install a SAS-based application on a client system while selected portions of the Stream Enabled Application Pages File are streamed to a client to be run on the client system. The Stream Enabled Application Install Block is the first set of data to be streamed from the server to the client and contains, among other things, the information needed by the client system to prepare for the streaming and execution of the particular application. Individual and aggregate client dynamic profile data is merged into the existing Stream Enabled Application Install Block on the server to optimize subsequent streaming of the application.
The invention employs a Client Streaming File System that is used to manage specific application-related file accesses during the execution of an application. For example, there are certain shared library files, e.g., "foo.dll", that need to be installed on the local file system, e.g., "c:\winnt\system32\foo.dll", for the application to execute. Such file names get added to a "spoof database". For the previous example, the spoof database would contain an entry saying that "c:\winnt\system32\foo.dll" is mapped to "z:\word\winnt\system32\foo.dll" where "z:" implies that this file is accessed by the Client Streaming File System. The Client Spoofer will then redirect all accesses to "c:\winnt\system32\foo.dll" to "z:\word\winnt\system32\foo.dll". In this manner, the client system gets the effect of the file being on the local machine whereas in reality the file is streamed from the server. Several different classes of files can be treated in this way, e.g., specific application registry entries and application-based networking calls when such calls cross a firewall.
Lastly, the invention incorporates a number of software anti-piracy techniques directed at combating the piracy of applications of the type described herein that are delivered to the end-user over a network for execution on a client system. Among the anti-piracy techniques included are: client-side fine-grained filtering of file accesses directed at remotely served files; filtering of file accesses based on where the code for the process that originated the request is stored; identification of crucial portions of application files and filtering file access depending on the portions of the application targeted; filtering of file accesses based on the surmised purpose of the file access, as determined by examining the program stack or flags associated with the request; and filtering of file accesses based on the surmised purpose of the file access, as determined by examining a history of previous file accesses by the same process.
As mentioned above, the invention provides server and client technology for streaming application delivery and execution. The invention includes secure license-based streaming delivery of applications over Internet/extranets/intranets utilizing client-based execution with client caching and server-based file accesses by page.
1. The invention provides many advantages over the present approaches, including: - Secure license-based streaming delivery over Internet/extranets/intranets:
- reduces IT costs over client installation;
- supports rental model of app delivery, which opens new markets and increases user convenience over purchase and client installation; and
- enhances the opportunities to prevent software piracy over purchase and client installation.
- Client-based execution with client caching:
- increases typical application performance over server-based execution;
- reduces network latency and bandwidth usage over non-cached client execution; and
- allows existing applications to be run w/o rewrite/recompile/rebuild unlike other explicitly-distributed client/server application delivery approaches.
- Server-based file accesses:
- improve server-scaling over server-based execution;
- allow transparent failover to another server whereas server-based execution does not;
- make server load balancing easier than it is with server-based execution; and
- allow increased flexibility in server platform selection over server-based execution.
- Server-based file accesses by page:
- reduce network latency over complete file downloads;
- reduce network bandwidth overhead over complete file downloads; and
- reduce client cache footprint over complete file downloads.
2. Features of the Invention A) Server Components Supporting Application Delivery and Execution.
i) referring to FIG. 1, the server components include: - a. Client/server network interface 110 that is common to the client 113 and the server. This is the communication mechanism through which the client and the server communicate.
- b. The Subscription Server 105—This is the server the client 113 connects to for subscribing and unsubscribing applications. This server then adds/deletes the subscription information to the Subscription Database 101 and also updates the License Database 102 with the information stating that the client 113 can/cannot run the subscribed information under the agreed upon licensing terms. This communication between the client 113 and the Subscription Server 105 happens over SSL that is an industry standard protocol for secure communication. The Subscription Server 105 is also contacted for updating any existing subscription information that is in the Subscription Database 101.
- c. The License Server 106—This is the server the client 113 connects to for getting a license to run an application after the client has subscribed to the application. This server validates the user and his subscriptions by consulting the License Database 102. If the client 113 does have a valid license, the License Server 106 sends an "Access token" to the client that is encrypted using an "encryption key" that the License Database 102 obtains from the Server Config Database 103. The "Access token" contains information like the Application ID and an expiration time. Along with the "Access token," the License Server 106 also sends a list of least loaded application servers that it obtains from the Server Config Database 103 and also the expiration time that was encoded in the "Access token". The client 113 uses this expiration time to know when to ask for a new token. This communication between the client 113 and the License Server 106 happens over SSL.
- d. The Application Server 107—Once the client 113 obtains an "Access token" to run an application, it connects to the Application Server 107 and presents to it the "Access token" along with the request for the application bits. Note that the "Access token" is opaque to the client 113 since it does not have the key to decrypt it. The Application Server 107 validates the "Access token" by decrypting it using a "decryption key" obtained from the Server Config Database 103 and checking the content against a predefined value like for example the Application ID and also by making sure that the expiration time in the "Access token" has not elapsed. It then serves the appropriate bits to the client 113 to enable it to run the application. The encryption and decryption keys could be something like a private key/public key pair or a symmetric key or any other means of providing security. Note that the keys are uniform across all the servers within an ASP.
- e. The Monitor Server 108—It monitors the load in terms of percent of CPU utilization on the Application Servers 107 and the License Servers 106 on a periodic basis (for example—every minute) and adds that information to the Server Config Database 103.
- f. The Profile Server 109—It receives profile information from the clients periodically. It adds this information to the Profile Database 104. The Profile Server 109 based on the profile information from different clients updates the App Prefetch Page List section of the Stream App Install Blocks 112.
ii) The data structures supporting the above server components include: - a. Subscription Database 101—This is the database that stores the user information in terms of usename, list of apps subscribed, password, billing information, address, group, admin. The username is the primary key. The admin field identifies if this user has admin privileges for the group he belongs to.
- b. License Database 102—This is the database that stores licensing information, i.e., which user can run what application and under which license. This database also keeps track of usage information, i.e., which user has used which application for how long and how many times. The information looks like:
- Username, application, time of usage, number of times run
- Username, application, licensing policy
- Username, application, is app running, no of instances, time of start The username is the primary key. The licensing policy could be something simple like expiry date or something more complicated like number of instances simultaneously allowed within a group etc.
- c. Server Config Database 103—This database stores information about which server can run which application, what is the load on all the servers, what is the encryption "key" to be used by the servers and all other information that is needed by the servers. The information looks like:
- Server IP address, App/Slim server, application list, current load
- Encryption key, Decryption key
- The Server IP address is the primary key for the first table. The keys are common across all servers.
- d. Profile Database 104—This database stores the profile information received by the profile server from the clients periodically. The information looks like:
- Application ID, File ID, Block ID number of hits
- The Application ID is the primary key.
- e. Application File Pages 111—This is the one of the outputs of the "builder" as explained below and is put on the Application Server 107 so that it can serve the appropriate bits to the client.
- f. Stream App Install Blocks 112—This is the other output of the "builder" and contains the information for successfully installing applications on the client for streaming applications.
B) Client Components Supporting Application Delivery & Execution
i) With respect to FIGS. 1 and 2, these client components include: - a. Client/Server Network interface 202—This is the same interface as explained above.
- b. Client License Manager 205—This component requests licenses ("Access tokens") from the License Server 106 when the client wants to run applications. The License Server 106 sends an "Access token" to the client that can be used to run the applications by presenting it to the Application Server 107. Along with the token, the License Server 106 also sends the expiry time of the token. The Client License Manager 205 renews the token just before the expiry period so that the client can continue running the application. When the application is complete, the Client License Manager 205 releases the token by sending a message to the License Server 106. In addition, when a user has subscribed to an application, the Client License Manager 205 first checks to make sure that the application is installed on the machine the user is trying to run the application from and if not requests for the application installation. It does this using a list of Installed Apps that it maintains.
- c. Client Cache Manager 207—This component caches the application bits received from the Application Server 107 so that next time a request is made to the same bits, the request can be served by the cache instead of having to go to the Application Server 107. The Client Cache Manager 207 has a limited amount of space on the disk of the client machine that it uses for the cache. When the space is fully occupied, the Client Cache Manager 207 uses a policy to replace existing portions of the cache. This policy can be something like LRU, FIFO, random etc. The Client Cache Manager 207 is responsible for getting the application bits requested by the Client Streaming File System 212. If it does not have the bits cached, it gets them from the Application Server 107 through the network interface. However it also need to get the "Access token" from the Client License Manager 205 that it needs to send along with the request for the application bits. The Client Cache Manager 207 also updates the Prefetch History Info 209 with the requests it receives from the Client Streaming File System 212.
- d. Client Streaming File System 212—This component serves all file system requests made by the application running on the client. The application makes calls like "read", "write" etc. to files that need to be streamed. These requests lead to page faults in the operating system and the page faults are handled by the Client Streaming File System 212 that in turn asks the Client Cache Manager 207 for the appropriate bits. The Client Cache Manager 207 will send those bits from the cache if they exist there or forward the request to the Application Server 107 through the network interface to get the appropriate bits.
- e. Client Prefetcher 208—This component monitors the requests made by the client to the Application Server 107 and uses heuristics to make additional requests to the Application Server 107 so that the bits can be obtained from the Application Server 107 before the client machine makes the request for them. This is mainly to hide the latency between the client and the Application Server 107. The history information of the requests is stored in the Prefetch History Info file 209.
- f. Client Profiler 203—At specific time intervals, the client profiler sends the profile information, which is the Prefetch History Info to the prefetch server at the ASP that can then update the App Prefetch Page Lists for the different applications accordingly.
- g. Client File Spoofer 211—Certain files on the client need to be installed at specific locations on the client system. To be able to stream these files from the Application Server 107, the Client Spoofer 211 intercepts all requests to these files made by a running application and redirects them to the Client Streaming File System 212 so that the bits can be streamed from the Application Server 107.
- h. Client Registry Spoofer 213—Similar to files, certain registry entries need to be different when the application being streamed is running and since it is undesirable to overwrite the existing registry value, the read of the registry value is redirected to the Client Registry Spoofer 215 which returns the right value. However, this is optional as it is very likely that overwriting the existing registry value will make the system work just fine.
- i. Client Network Spoofer 213—Certain applications make networking calls through a protocol like TCP. To make these applications work across firewalls, these networking calls need to be redirected to the Client Network Spoofer 213 which can tunnel these requests through a protocol like HTTP that works through firewalls.
ii) The data structures needed to support the above client components include: - a. File Spoof Database 210—The list of files the requests to which need to be redirected to the Client Streaming File System 212. This information looks like (The source file name is the primary key)
- Source File Name, Target File Name
- b. Registry Spoof Database 216—List of registry entries and their corresponding values that need to be spoofed. Each entry looks like:
- Registry entry, new value
- c. Network Spoof Database 214—Like of IP addresses, the networking connections to which need to be redirected to the Client Network Spoofer 213. Each entry looks like (IP address is the primary key):
- IP address, Port number, new IP address, new Port number
- d. Client Stream Cache 206—The on-disk cache that persistently stores application bits.
- e. Known ASPs and Installed Apps 204—The list of ASP servers (Application, License and Subscription) and also the list of applications that are installed on the client.
- f. Prefetch History Info 209—The history of the requests made to the cache. This consists of which blocks were requested from which file for which application and how many times each block was requested. It also consists of predecessor-successor information indicating which block got requested after a particular block was requested.
C) Client Application Installation
Referring to FIG. 3, the client application installation components include: - i) Client License Manager 303—This is the same component explained above.
- ii) Client Application Installer 305—This component is invoked when the application needs to be installed. The Client Application Installer 305 sends a specific request to the Application Server 107 for getting the Stream App Install Block 301 for the particular application that needs to be installed. The Stream App Install Block 301 consists of the App Prefetch Page List 306, Spoof Database 308, 309, 310, and App Registry Info 307. The Client Application Installer 305 then updates the various Spoof Databases 308, 309, 310 and the Registry 307 with this information. It also asks the Client Prefetcher 208 to start fetching pages in the App Prefetch Page List 306 from the Application Server 107. These are the pages that are known to be needed by a majority of the users when they run this application.
D) Application Stream Builder Input/Output
With respect to FIG. 4, the Builder components include the following: - i) Application Install Monitor 403—This component monitors the installation of an application 401 and figures out all the files that have been created during installation 402, registry entries that were created and all the other changes made to the system during installation.
- ii) Application Profiler 407—After the application is installed, it is executed using a sample script. The Application Profiler 407 monitors the application execution 408 and figures out the application pages that got referenced during the execution.
- iii) App Stream Packager 404—The App Stream Packager 404 takes the information gathered by the Application Profiler 407 and the Application Install Monitor 403 and forms the Application File Pages 406 and the Stream App Install Block 405 from that information.
E) Network Spoofing for client-server applications: - Referring to FIGS. 1, 4, 5a, 5b, and 6a, the component that does the Network Spoofing is the TCP to HTTP converter 503, 507. The basic idea is to take TCP packets and tunnel them through HTTP on one side and do exactly the opposite on the other. As far as the client 501 and the server 502 are concerned the communication is TCP and so existing applications that run with that assumption work unmodified. This is explained in more detail below.
On the client side, the user launches an application that resides on the Client Streaming File System. That application may be started in the same ways that applications on other client file systems may be started, e.g., opening a data file associated with the application or selecting the application from the Start/Programs menu in a Windows system. From the point of view of the client's operating system and from the point of view of the application itself, that application is located locally on the client.
Whenever a page fault occurs on behalf of any application file residing on the Client Streaming File System 604, that file system requests the page from the Client Cache Manager 606. The Client Cache Manager 606, after ensuring via interaction with the Client License Manager 608 that the user's client system holds a license to run the application at the current time, checks the Client Stream Cache 611 and satisfies the page fault from that cache, if possible. If the page is not currently in the Client Stream Cache 611, the Client Cache Manager 606 makes a request to the Client/Server Network Interface 505, 609 to obtain that page from the Application File Pages stored on an Application Server 506.
The Client Prefetcher 606 tracks all page requests passed to the Client Cache Manager 606. Based on the pattern of those requests and on program locality or program history, the Client Prefetcher 606 asks the Client Cache Manager 606 to send additional requests to the Client/Server Network Interface 505, 609 to obtain other pages from the Application File Pages stored on the Application Server 506.
Files located on the Client Streaming File System 604 are typically identified by a particular prefix (like drive letter or pathname). However, some files whose names would normally imply that they reside locally are mapped to the Client Streaming File System 604, in order to lower the invention's impact on the user's local configuration. For instance, there are certain shared library files (dil's) that need to be installed on the local file system (c:\winnt\system32\foo.dll). It is undesirable to add that file on the user's system. The file name gets added to a "spoof database" which contains an entry saying that c:\winnt\system32\foo.dll is mapped to z:\word\winnt\system32\foo.dll where z: implies that it is the Client Streaming File System. The Client Spoofer 603 will then redirect all accesses to c:\winnt\system32\foo.dll to z:\word\winnt\system32\foo.dll. In this manner the client system gets the effect of the file being on the local machine whereas in reality the file is streamed from the server.
In a similar fashion the Client Spoofer 603 may also be used to handle mapping TCP interfaces to HTTP interfaces. There are certain client-server applications (like ERP/CRM applications) that have a component running on a client and another component running on a database server, Web server etc. These components talk to each other through TCP connections. The client application will make TCP connections to the appropriate server (for this example, a database server) when the client piece of this application is being streamed on a user's machine.
The database server could be resident behind a firewall and the only way for the client and the server to communicate is through a protocol like HTTP that can pass through firewalls. To enable the client to communicate with the database server, the client's TCP requests need to be converted to HTTP and sent to the database server. Those requests can be converted back to TCP so that the database server can appropriately process the requests just before the requests reach the database server. The Client Spoofer's 603 responsibility in this case is to trap all TCP requests going to the database server and convert it into HTTP requests and take all HTTP requests coming from the database server and convert them into TCP packets. Note that the TCP to HTTP converters 505, 507 convert TCP traffic to HTTP and vice versa by embedding TCP packets within the HTTP protocol and by extracting the TCP packets from the HTTP traffic. This is called tunneling.
When the Client License Manager 608 is asked about a client's status with respect to holding a license for a particular application and the license is not already being held, the Client License Manager 608 contacts the License Server 106 via the Client/Server Network Interface 609 and asks that the client machine be given the license. The License Server 106 checks the Subscription 101 and License 102 Databases and, if the user has the right to hold the license at the current time, it sends back an Access Token, which represents the right to use the license. This Access Token is renewed by the client on a periodic basis.
The user sets up and updates his information in the Subscription 101 and License 102 Databases via interacting with the Subscription Server 105. Whenever a user changes his subscription information, the Subscription Server 105 signals the user's client system since the client's Known ASPs and Installed Apps information potentially needs updating. The client system also checks the Subscription 101 and License 102 Databases whenever the user logs into any of his client systems set up for Streaming Application Delivery and Execution. If the user's subscription list in the Subscription 101 and License 102 Databases list applications that have not been installed on the user's client system, the user is given the opportunity to choose to install those applications.
Whenever the user chooses to install an application, the Client License Manager 608 passes the request to the Client Application Installer 607 along with the name of the Stream App Install Block to be obtained from the Application Server 107. The Client Application Installer 607 opens and reads that file (which engages the Client Streaming File System) and updates the Client system appropriately, including setting up the spoof database, downloading certain needed non-application-specific files, modifying the registry file, and optionally providing a list of applications pages to be prefetched to warm up the Client Stream Cache 611 with respect to the application.
The Application Stream Builder creates the Stream App Install Block 405 used to set up a client system for Streaming Application Delivery and Execution and it also creates the set of Application File Pages 406 sent to satisfy client requests by the Application Server 107. The process that creates this information is offline and involves three components. The Application Install Monitor 403 watches a normal installation of the application and records various information including registry entries, required system configuration, file placement, and user options. The Application Profiler 407 watches a normal execution of the application and records referenced pages, which may be requested to pre-warm the client's cache on behalf of this application. The Application Stream Packager 404 takes information from the other two Builder components, plus some information it compiles with respect to the layout of the installed application and forms the App Install Block 405 and the set of Application File Pages 406.
Server fail-over and server quality of service problems are handled by the client via observation and information provided by the server components. An ASP's Subscription Server provides a list of License Servers associated with that ASP to the client, when the user initiates/modifies his account or when the client software explicitly requests a new list. A License Server provides a list of Application Servers associated with an application to the client, whenever it sends the client an Access Token for the application.
Should the client observe apparent non-response or slow response from an Application Server, it switches to another Application Server in its list for the application in question. If none of the Application Servers in its list respond adequately, the client requests a new set for the application from a License Server. The strategy is similar in the case in which the client observes apparent non-response or slow response from a License Server; the client switches to another License Server in its list for the ASP in question. If none of the License Servers in its list responds adequately, the client requests a new set of License Servers from the ASP.
Server load balancing is handled by the server components in cooperation with the client. A server monitor component tracks the overall health and responsiveness of all servers. When a server is composing one of the server lists mentioned in the previous paragraph, it selects a set that is alive and relatively more lightly used than others. Client cooperation is marked by the client using the server lists provided by the servers in the expected way, and not unilaterally doing something unexpected, like continuing to use a server which does not appear in the most recent list provided.
Security issues associated with the server client relationship are considered in the invention. To ensure that the communication between servers and clients is private and that the servers in question are authorized via appropriate certification, an SSL layer is used. To ensure that the clients are licensed to use a requested application, user credentials (username+password) are presented to a License Server, which validates the user and his licensing status with respect to the application in question and issues an Access Token, and that Access Token is in turn presented to an Application Server, which verifies that the Token's validity before delivering the requested page. Protecting the application in question from piracy on the client's system is discussed in another section, below.
Client-Side Performance Optimization
This section focuses on client-specific portions of the invention. The invention may be applied to any operating system that provides a file system interface or block driver interface. A preferred embodiment of the invention is Windows 2000 compliant.
With respect to FIG. 6a, several different components of the client software are shown. Some components will typically run as part of the operating system kernel, and other portions will run in user mode.
The basis of the client side of the streamed application delivery and execution system is a mechanism for making applications appear as though they were installed on the client computer system without actually installing them.
Installed applications are stored in the file system of the client system as files organized in directories. In the state of the art, there are two types of file systems: local and network. Local file systems are stored entirely on media (disks) physically resident in the client machine. Network file systems are stored on a machine physically separate from the client, and all requests for data are satisfied by getting the data from the server. Network file systems are typically slower than local file systems. A traditional approach to use the better performance of a local file system is to install important applications on the local file system, thereby copying the entire application to the local disk. The disadvantages of this approach are numerous. Large applications may take a significant amount of time to download, especially across slower wide area networks. Upgrading applications is also more difficult, since each client machine must individually be upgraded.
The invention eliminates these two problems by providing a new type of file system: a streaming file system. The streaming file system allows applications to be run immediately by retrieving application file contents from the server as they are needed, not as the application is installed. This removes the download cost penalty of doing local installations of the application. The streaming file system also contains performance enhancements that make it superior to running applications directly from a network file system. The streaming file system caches file system contents on the local machine. File system accesses that hit in the cache are nearly as fast as those to a local file system. The streaming file system also has sophisticated information about application file access patterns. By using this knowledge, the streaming file system can request portions of application files from the server in advance of when they will actually be needed, thus further improving the performance of applications running on the application streaming file system.
In a preferred embodiment of the invention, the application streaming file system is implemented on the client using a file system driver and a helper application running in user mode. The file system driver receives all requests from the operating system for files belonging to the application streaming file system. The requests it handles are all of the standard file system requests that every file system must handle, including (but not limited to) opening and closing files, reading and writing files, renaming files, and deleting files. Each file has a unique identifier consisting of an application number, and a file number within that application. In one embodiment of the invention, the application number is 128 bits and the file number is 32 bits, resulting in a unique file ID that is 160 bits long. The file system driver is responsible for converting path names (such as "z:\program files\foo.exe") into file IDs (this is described below). Once the file system driver has made this translation, it basically forwards the request to the user-mode program to handle.
The user-mode program is responsible for managing the cache of application file contents on the local file system and contacting the application streaming server for file contents that it cannot satisfy out of the local cache. For each file system request, such as read or open, the user-mode process will check to see if it has the requested information in the cache. If it does, it can copy the data from the cache and return it to the file system driver. If it does not, it contacts the application streaming server over the network and obtains the information it needs. To obtain the contents of the file, the user-mode process sends the file identifier for the file it is interested in reading along with an offset at which to read and the number of bytes to read. The application streaming server will send back the requested data.
The file system can be implemented using a fragmented functionality to facilitate development and debugging. All of the functionality of the user-mode component can be put into the file system driver itself without significantly changing the scope of the invention. Such an approach is believed to be preferred for a client running Windows 95 as the operating system.
Directories are specially formatted files. The file system driver reads these from the user mode process just like any other files with reads and writes. Along with a header containing information about the directory (such as how long it is), the directory contains one entry for each file that it contains. Each entry contains the name of the file and its file identifier. The file identifier is necessary so that the specified file can be opened, read, or written. Note that since directories are files, directories may recursively contain other directories. All files in an application streaming file system are eventual descendents of a special directory called the "root". The root directory is used as the starting point for parsing file names.
Given a name like "z:/foo/bar/baz", the file system driver must translate the path "z:/foo/bar/baz" into a file identifier that can be used to read the file from the application streaming service. First, the drive letter is stripped off, leaving "/foo/bar/baz". The root directory will be searched for the first part of the path, in this case "foo". If the file "foo" is found in the root directory, and the file "foo" is a directory, then "foo" will be searched for the next portion of the path, "bar". The file system driver achieves this by using the file id for "foo" (found by searching the root directory) to open the file and read its contents. The entries inside "foo" are then searched for "bar", and this process continues until the entire path is parsed, or an error occurs.
In the following examples and text, the root directory is local and private to the client. Each application that is installed will have its own special subdirectory in the root directory. This subdirectory will be the root of the application. Each application has its own root directory.
The invention's approach is much more efficient than other approaches like the standard NFS approach. In those cases, the client sends the entire path "/foo/bar/baz" to the server and the server returns the file id for that file. The next time there is a request for "/foo/bar/baz2" the entire path again needs to be sent. In the approach described here, once the request for "bar" was made, the file ids for all files within bar are sent back including the ids for "baz" and "baz2" and hence "baz2" will already be known to client. This reduces communication between the client and the server.
In addition, this structure also allows applications to be easily updated. If certain code segments need to be updated, then the code segment listing in the application root directory is simply changed and the new code segment subdirectory added. This results in the new and correct code segment subdirectory being read when it is referenced. For example if a file by the name of "/foo/bar/baz3" needs to be added, the root directory is simply changed to point to a new version of "foo" and that new version of "foo" points to a new version of "bar" which contains "baz3" in addition to the files it already contained. However the rest of the system is unchanged.
Client Features
Referring to FIGS. 6a and 6b, a key aspect of the preferred embodiment of the invention is that application code and data are cached in the client's persistent storage 616, 620. This caching provides better performance for the client, as accessing code and data in the client's persistent storage 620 is typically much faster than accessing that data across a wide area network. This caching also reduces the load on the server, since the client need not retrieve code or data from the application server that it already has in its local persistent storage.
In order to run an application, its code and data must be present in the client system's volatile storage 619. The client software maintains a cache of application code and data that normally reside in the client system's nonvolatile memory 620. When the running application requires data that is not present in volatile storage 619, the client streaming software 604 is asked for the necessary code or data. The client software first checks its cache 611, 620 in nonvolatile storage for the requested code or data. If it is found there, the code or data are copied from the cache in nonvolatile storage 620 to volatile memory 619. If the requested code or data are not found in the nonvolatile cache 611, 620, the client streaming software 604 will acquire the code or data from the server system via the client's network interface 621, 622.
Application code and data may be compressed 623, 624 on the server to provide better client performance over slow networks. Network file systems typically do not compress the data they send, as they are optimized to operate over local area networks.
FIGS. 7a & 7b demonstrate two ways in which data may be compressed while in transit between the server and client. With either mechanism, the client may request multiple pieces of code and data from multiple files at once. FIG. 7A illustrates the server 701 compressing the concatenation of A, B, C, and D 703 and sending this to the client 702. FIG. 7B illustrates the server 706 separately compressing A, B, C, and D 708 and sending the concatenation of these compressed regions to the client 707. In either case, the client 702, 707 will decompress the blocks to retrieve the original contents A, B, C, and D 704, 709 and these contents will be stored in the cache 705, 710.
The boxes marked "Compression" represent any method of making data more compact, including software algorithms and hardware. The boxes marked "Decompression" represent any method for expanding the compacted data, including software algorithms and hardware. The decompression algorithm used must correspond to the compression algorithm used.
The mechanism for streaming of application code and data may be a file system. Many network file systems exist. Some are used to provide access to applications, but such systems typically operate well over a local area network (LAN) but perform poorly over a wide area network (WAN). While this solution involves a file system driver as part of the client streaming software, it is more of an application delivery mechanism than an actual file system.
With respect to FIG. 8, application code and data are installed onto the file system 802, 805, 806, 807 of a client machine, but they are executed from the volatile storage (main memory). This approach to streamed application delivery involves installing a special application streaming file system 803, 804. To the client machine, the streaming file system 803, 804 appears to contain the installed application 801. The application streaming file system 803 will receive all requests for code or data that are part of the application 801. This file system 803 will satisfy requests for application code or data by retrieving it from its special cache stored in a native file system or by retrieving it directly from the streaming application server 802. Code or data retrieved from the server 802 will be placed in the cache in case it is used again.
Referring to FIG. 9, an alternative organization of the streaming client software is shown. The client software is divided into the kernel-mode streaming file system driver 905 and a user-mode client 902. Requests made to the streaming file system driver 905 are all directed to the user-mode client 902, which handles the streams from the application streaming server 903 and sends the results back to the driver 905. The advantage of this approach is that it is easier to develop and debug compared with the pure-kernel mode approach. The disadvantage is that the performance will be worse than that of a kernel-only approach.
As shown in FIGS. 10 and 11, the mechanism for streaming of application code and data may be a block driver 1004, 1106. This approach is an alternative to that represented by FIGS. 8 and 9.
With respect to FIG. 10, the application streaming software consists of a streaming block driver 1004. This block driver 1004 provides the abstraction of a physical disk to a native file system 1003 already installed on the client operating system 1002. The driver 1004 receives requests for physical block reads and writes, which it satisfies out of a cache on a standard file system 1003 that is backed by a physical disk drive 1006, 1007. Requests that cannot be satisfied by the cache go to the streaming application server 1005, as before.
Referring to FIG. 11, the application streaming software has been divided into a disk driver 1106 and a user mode client 1102. In a manner similar to that of FIG. 9, the disk driver 1106 sends all requests it gets to the user-mode client 1102, which satisfies them out of the cache 1107, 1108 or by going to the application streaming server 1103.
The persistent cache may be encrypted with a key not permanently stored on the client to prevent unauthorized use or duplication of application code or data. Traditional network file systems do not protect against the unauthorized use or duplication of file system data.
With respect to FIG. 12, unencrypted and encrypted client caches. A, B, C, and D 1201 representing blocks of application code and data in their natural form are shown. Ek(X) represents the encryption of block X with key k 1202. Any encryption algorithm may be used. The key k is sent to the client upon application startup, and it is not stored in the application's persistent storage.
Client-initiated prefetching of application code and data helps to improve interactive application performance. Traditional network file systems have no prefetching or simple locality based prefetching.
Referring to FIG. 13, the application 1301 generates a sequence of code or data requests 1302 to the operating system(OS) 1303. The OS 1303 directs these 1304 to the client application streaming software 1305. The client software 1305 will fetch the code or data 1306 for any requests that do not hit in the cache from the server 1307, via the network. The client software 1305 inspects these requests and consults the contents of the cache 1309 as well as historic information about application fetching patterns 1308. It will use this information to request additional blocks of code and data that it expects will be needed soon. This mechanism is referred to as "pull prefetching."
Server-initiated prefetching of application code and data helps to improve interactive application performance. Traditional network file systems have no prefetching or simple locality based prefetching.
With respect to FIG. 14, the server-based prefetching is shown. As in FIG. 13, the client application streaming software 1405 makes requests for blocks 1407 from the application streaming server 1408. The server 1408 examines the patterns of requests made by this client and selectively returns to the client additional blocks 1406 that the client did not request but is likely to need soon. This mechanism is referred to as "push prefetching."
A client-to-client communication mechanism allows local application customization to travel from one client machine to another without involving server communication. Some operating systems have a mechanism for copying a user's configuration and setup to another machine. However, this mechanism typically doesn't work outside of a single organization's network, and usually will copy the entire environment, even if only the settings for a single application are desired.
Referring to FIG. 15, a client-to-client mechanism is demonstrated. When a user wishes to run an application on a second machine, but wishes to retain customizations made previously on the first, the client software will handle this by contacting the first machine to retrieve customized files and other customization data. Unmodified files will be retrieved as usual from the application streaming server.
Here, File 4 exists in three different versions. The server 1503 provides one version of this file 1506, client 11501 has a second version of this file 1504, and client 21502 has a third version 1505. Files may be modified differently for each client.
The clients may also contain files not present on the server or on other clients. File 51507 is one such file; it exists only on client 11501. File 61508 only exists on client 21502.
Local Customization
A local copy-on-write file system allows some applications to write configuration or initialization files where they want to without rewriting the application, and without disturbing the local customization of other clients. Installations of applications on file servers typically do not allow the installation directories of applications to be written, so additional reconfiguration or rewrites of applications are usually necessary to allow per-user customization of some settings.
With respect to FIG. 16, the cache 1602 with extensions for supporting local file customization is shown. Each block of data in the cache is marked as "clean" 1604 or "dirty" 1605. Pages marked as dirty have been customized by the client 1609, and cannot be removed from the cache 1602 without losing client customization. Pages marked as clean may be purged from the cache 1602, as they can be retrieved again from the server 1603. The index 1601 indicates which pages are clean and dirty. In FIG. 16, clean pages are white, and dirty pages are shaded. File 11606 contains only clean pages, and thus may be entirely evicted from the cache 1602. File 21607 contains only dirty pages, and cannot be removed at all from the cache 1602. File 31608 contains some clean and some dirty pages 1602. The clean pages of File 31608 may be removed from the cache 1602, while the dirty pages must remain.
Selective Write Protection
The client streaming software disallows modifications to certain application files. This provides several benefits, such as preventing virus infections and reducing the chance of accidental application corruption. Locally installed files are typically not protected in any way other than conventional backup. Application file servers may be protected against writing by client machines, but are not typically protected against viruses running on the server itself. Most client file systems allow files to be marked as read-only, but it is typically possible to change a file from read-only to read-write. The client application streaming software will not allow any data to be written to files that are marked as not modifiable. Attempts to mark the file as writeable will not be successful.
Error Detection and Correction
The client streaming software maintains checksums of application code and data and can repair damaged or deleted files by retrieving another copy from the application streaming server. Traditional application delivery mechanisms do not make any provisions for detecting or correcting corrupted application installs. The user typically detects a corrupt application, and the only solution is to completely reinstall the application. Corrupt application files are detected by the invention automatically, and replacement code or data are invisibly retrieved by the client streaming software without user intervention.
When a block of code or data is requested by the client operating system, the client application streaming software will compute the checksum of the data block before it is returned to the operating system. If this checksum does not match that stored in the cache, the client will invalidate the cache entry and retrieve a fresh copy of the page from the server.
File Identifiers
Applications may be patched or upgraded via a change in the root directory for that application. Application files that are not affected by the patch or upgrade need not be downloaded again. Most existing file systems do not cache files locally.
Each file has a unique identifier (number). Files that are changed or added in the upgrade are given new identifiers never before used for this application. Files that are unchanged keep the same number. Directories whose contents change are also considered changes. If any file changes, this will cause its parent to change, all the way up to the root directory.
Upgrade Mechanism
When the client is informed of an upgrade, it is told of the new root directory. It uses |