Server side data cache system
In an example embodiment, a system and method to store and retrieve application data from a database are provided. In an example embodiment, location data comprising a database identifier is received. A location of a database is derived based on the database identifier, the database being one of a plurality of databases, each database of the plurality of databases comprising application data, and application data is requested from the database based on the derived location.
1. A system, comprising:
at least one processor and executable instructions accessible on a computer-readable medium that, in response to being executed by the at least one processor, cause the system to perform operations comprising:
receiving location data comprising a database identifier;
deriving a location of a database based on the database identifier, the database being one of a plurality of databases, each database of the plurality of databases comprising application data;
requesting application data from the database based on the derived location;
responsive to determining that the database at the derived location is not functioning, receiving new location data comprising a new database identifier of a second database, wherein the new database identifier of the second database is sent to a routing service to identify the second database in a future transaction;
requesting the application data from the second database;
receiving the application data from the second database; and
in the future transaction, requesting additional application data from the second database using the new database identifier.
2. The system of claim 1 , the operations further comprising modifying the requested application data and transmitting the modified application data to the database corresponding to the database identifier.
3. The system of claim 1 , wherein the receiving the location data further comprises receiving a first cookie including the location data.
4. The system of claim 3 , the operations further comprising:
requesting application data from the second database of the plurality of databases, the second database corresponding to the new database identifier; and
transmitting the new location data to a client browser in a second cookie.
5. The system of claim 1 , the operations further comprising:
monitoring requests for application data associated with instructions having a set of characteristics;
compiling a list of application data associated with the instructions having the set of characteristics;
receiving subsequent instructions sharing the set of characteristics; and
requesting, based on the received subsequent instructions, the application data from the list of application data.
6. The system of claim 1 , wherein the first database is distinguished from the second database by at least one different access route.
7. A method comprising:
receiving location data from a user device, the location data comprising a cache identifier and a database identifier, the cache identifier identifying a cache of a plurality of caches;
deriving, using a processor, a location of the cache of the plurality of caches based on the cache identifier;
requesting application data from the cache based on the derived location;
determining that the cache corresponding to the cache identifier is not functioning;
requesting the requested application data from a second cache of the plurality of caches based on the determining that the cache is not functioning, wherein an identifier of the second cache is sent to a routing service to identify the second cache in a future transaction;
and
receiving the application data from the second cache.
8. The method of claim 7 , further comprising:
modifying the requested application data; and
transmitting modified application data to the cache corresponding to the cache identifier.
9. The method of claim 7 , wherein the receiving the location data
further comprises receiving a first cookie including the location data.
10. The method of claim 9 , further comprising:
receiving new location data from a cache server hosting the second cache, the new location data comprising the identifier of the second cache;
requesting application data from the second cache of the plurality of caches, the second cache corresponding to the identifier of the second cache; and
transmitting the new location data to a client browser in a second cookie.
11. The method of claim 7 , further comprising:
monitoring requests for application data associated with instructions having a set of characteristics;
compiling a list of application data associated with the instructions having the set of characteristics;
receiving subsequent instructions sharing the set of characteristics; and
requesting, based on the receiving of the subsequent instructions, the application data from the list of application data.
12. The method of claim 7 , further comprising:
in response to determining that the requested application data is not stored in the cache, requesting the requested application data from a storage element of a plurality of storage elements based on the determining, the storage element corresponding to a storage identifier.
13. The method of claim 7 , wherein each cache of the plurality of caches is distinguished from each of one or more remaining caches of the plurality of caches by a different access route.
14. A non-transitory machine-readable medium embodying instructions that, when executed by one or more processors of a machine, cause the machine to perform operations comprising:
receiving instructions to perform an activity associated with application data;
receiving a routing identifier from a user device;
querying a routing service with the routing identifier;
receiving an identification of a cache;
requesting the application data from the cache based on the identification of the cache;
determining that the cache is not functioning;
responsive to determining that the cache is not functioning, receiving new location data comprising a new database identifier of a second cache, wherein the new database identifier of the second cache is sent to the routing service to identify the second cache in a future transaction;
requesting the application data from the second cache; and
receiving the application data from the second cache.
15. The non-transitory machine-readable medium of claim 14 , wherein the operations further comprise:
modifying the requested application data; and
transmitting the modified application data to the second cache.
16. The non-transitory machine-readable medium of claim 14 , wherein the receiving the routing identifier further comprises receiving a first cookie including the routing identifier.
17. The non-transitory machine-readable medium of claim 16 , wherein the operations further comprise:
receiving the new location data from a cache server, the new location data comprising a new routing identifier;
querying the routing service with the new routing identifier;
receiving a new identifier of the second cache, the second cache corresponding to the new cache identifier;
requesting application data from the second cache; and
transmitting the new location data to a client browser in a second cookie.
18. The non-transitory machine-readable medium of claim 14 , wherein the operations further comprise:
monitoring requests for application data associated with instructions having a set of characteristics;
compiling a list of application data associated with the instructions having the set of characteristics;
receiving subsequent instructions sharing the set of characteristics; and
requesting, based on the receiving of the subsequent instructions, the application data from the list of application data.
19. The non-transitory machine-readable medium of claim 14 , wherein the operations further comprise:
determining that the requested application data is not stored in the cache corresponding to a cache identifier; and
requesting the requested application data from a storage element of a plurality of storage elements based on the determining, the storage element corresponding to a storage identifier.
20. The non-transitory machine-readable medium of claim 14 , wherein each cache of a plurality of caches is distinguished from each of one or more remaining caches of the plurality of caches by a different access route.