Patent Description:
<CIT> relates to methods and apparatuses providing a configuration machine to manage dynamic values within a configuration setting to be resolved at a runtime implementation of a configuration. The dynamic information can be referenced within the configuration setting by a calculated value that provides an expression to be evaluated to resolve the configuration setting. The elements of the calculated value expression can be provided from system-dependent values stored in a system profile and applied to the calculated value expression to result in a configuration setting value to be used by the system in configuration of the system.

<CIT> relates to fault-tolerant and highly available configuration of distributed services including a computer-implemented method for role-based configuration discovery comprising receiving a request comprising an identifier of a role; identifying a first key, in a replica of a distributed configuration store, comprising a first value that matches the role identifier; identifying one or more other key-value pairs associated in the replica with the first key; and returning a response to an entity that sent the request comprising the value of at least one key-value pair that is specific to the role the service has. Also disclosed are techniques for log forwarding.

<CIT> relates to dynamic configuration files so that various types of dynamic functions can be performed within them. Variables are utilized within the configuration files. Thus, it is possible to have parameters specified in one configuration file and a formula to which the parameters will be applied in another configuration file. This allows changing of the values in the parameter file without having to modify the formula file, thereby streamlining the modification process when changes need to be made. In addition, it provides the capability for cross-referencing between configuration properties by allowing for variables in properties that refer to other properties.

<CIT> relates to a method for configuring software modules that includes accessing a properties repository that includes a plurality of properties of the execution environment of the computer system. The method further includes generating a configuration file for each software module. Generating a configuration file includes obtaining a generator module defined for the software module, and executing the generator module to instantiate the configuration file for the software module. The generator module is configured to identify a property required for the configuration file, obtain the value for the property from the properties repository, and store the value for the property in the configuration file in accordance with a customized format required by the software module. The method further includes storing the configuration file for each of the software modules.

It is the object of the present invention to provide a method and system for processing a configuration file having a JavaScript Object Notation (JSON) format.

The following presents a simplified summary of one or more implementations in order to provide a basic understanding of such implementations. This summary is not an extensive overview of all contemplated implementations, and is intended to neither identify key or critical elements of all implementations nor delineate the scope of any or all implementations. Its sole purpose is to present some concepts of one or more implementations in a simplified form as a prelude to the more detailed description that is presented later.

In an example, a computer implemented method for processing a configuration file having a file format is provided. The method includes determining one or more static data values defined in the configuration file based on the file format, detecting one or more expressions, defined according to an expression language, in the configuration file based on the file format, interpreting, via a platform engine and based on the expression language, the one or more expressions, storing, in a memory and based on interpreting the one or more expressions, the one or more expressions and the one or more static data values as a representation of the configuration, and executing, by the platform engine and based on the representation of the configuration, an instance of a service for resolving one or more values related to the one or more expressions.

In another example, a device for processing a configuration file having a file format is provided. The device includes a memory storing one or more parameters or instructions for providing a platform engine and for storing an in-memory representation of the configuration file for executing one or more contexts of the platform engine, and at least one processor coupled to the memory. The at least one processor is configured to determine one or more static data values defined in the configuration file based on the file format, detect one or more expressions, defined according to an expression language, in the configuration file based on the file format, interpret, via the platform engine and based on the expression language, the one or more expressions, store, in the memory and based on interpreting the one or more expressions, the one or more expressions and the one or more static data values as the in-memory representation of the configuration, and execute, by the platform engine and based on the in-memory representation of the configuration, an instance of a service for resolving one or more values related to the one or more expressions.

In another example, a computer-readable medium, including code executable by one or more processors for processing a configuration file having a file format, is provided. The code includes code for determining one or more static data values defined in the configuration file based on the file format, detecting one or more expressions, defined according to an expression language, in the configuration file based on the file format, interpreting, via a platform engine and based on the expression language, the one or more expressions, storing, in a memory and based on interpreting the one or more expressions, the one or more expressions and the one or more static data values as a representation of the configuration, and executing, by the platform engine and based on the representation of the configuration, an instance of a service for resolving one or more values related to the one or more expressions.

To the accomplishment of the foregoing and related ends, the one or more implementations comprise the features hereinafter fully described and particularly pointed out in the claims. The following description and the annexed drawings set forth in detail certain illustrative features of the one or more implementations. These features are indicative, however, of but a few of the various ways in which the principles of various implementations may be employed, and this description is intended to include all such implementations.

In some instances, well-known components are shown in block diagram form in order to avoid obscuring such concepts.

This disclosure describes various examples related to utilizing an expression language in configuration files defined for a service to allow for obtaining dynamic data values and/or logic for the configuration files. For example, the expression language can be defined in a standardized format of the configuration files so that a configuration file including the expression language can comply with the standardized format and/or be validated by a tool or interpreter for reading the configuration files. For example, the standardized format can include JavaScript Object Notation (JSON), eXtensible Markup Language (XML), etc., and can include syntax for defining name/value pairs. In this regard, the name/value pairs can be used to define the expression language.

For example, an expression language interpreter can detect and interpret expressions in the configuration file that comply with a format of the expression language, while also complying with the standardized format of the configuration files. For example, the expression language can leverage the syntax of the standardized format (e.g., name/value pairs) to define literals, functions, etc. for the expression language. In one example, a name/value pair can be used to define literals as having a label (e.g., the name of the name/value pair) and a value (e.g., the value of the name/value pair), and the literals may be of one or more types that can be detected based at least in part on a format of the value. In another example, a name/value pair can be used to define a function as having an identifier of a function (e.g., the name of the name/value pair), a name of the function (e.g., a value of the name/value pair), and a set of arguments (e.g., where the name of another name/value pair identifies that arguments are provided, and the value provides one or more arguments according to an argument format).

In this regard, the expression language interpreter can execute as part of the service, or at least an application or service that configures the service, to read/parse the configuration files and execute detected expression language expressions in the configuration file. In one example, the service can register functions that can be called in the expression language expressions, and in this regard, the expression language interpreter can identify a function in the configuration file based on detecting the function identifier (e.g., as a name in the name/value pair) and the function name (e.g., as the value in the name/value pair), and can load the configuration file in a memory accessible by the platform engine. The platform engine, e.g., via a provided service, can accordingly call the registered function (e.g., with corresponding arguments indicated in the expression) to resolve configuration values in executing an instance of the service. This process can allow for defining a domain-specific programming language for the platform engine that has a syntax allowing for embedding of domain-specific programming language expressions into configuration files that can be evaluated at runtime with contextual information provided by the execution environment.

Turning now to <FIG>, examples are depicted with reference to one or more components and one or more methods that may perform the actions or operations described herein, where components and/or actions/operations in dashed line may be optional. Although the operations described below in <FIG> are presented in a particular order and/or as being performed by an example component, the ordering of the actions and the components performing the actions may be varied, in some examples, depending on the implementation. Moreover, in some examples, one or more of the actions, functions, and/or described components may be performed by a specially-programmed processor, a processor executing specially-programmed software or computer-readable media, or by any other combination of a hardware component and/or a software component capable of performing the described actions or functions.

<FIG> is a schematic diagram of an example of a device <NUM> (e.g., a computing device) that can interpret and process expression language syntax in a configuration file for a provided service. In an example, device <NUM> can include a processor <NUM> and/or memory <NUM> configured to execute or store instructions or other parameters related to providing an operating system <NUM>, which can execute one or more platform engines <NUM>, services <NUM>, etc. For example, processor <NUM> and memory <NUM> may be separate components communicatively coupled by a bus (e.g., on a motherboard or other portion of a computing device, on an integrated circuit, such as a system on a chip (SoC), etc.), components integrated within one another (e.g., processor <NUM> can include the memory <NUM> as an on-board component <NUM>), and/or the like. Memory <NUM> may store instructions, parameters, data structures, etc., for use/execution by processor <NUM> to perform functions described herein.

Operating system <NUM> may execute platform engine <NUM> configured to execute one or more backend components for providing a service <NUM>, which may be a web service or other service that can allow connectivity to an application <NUM> for accessing one or more functions of the service <NUM>. For example, the application <NUM> can execute an instance of the service <NUM> via a webpage in a web browser, an application that communicates with the service <NUM>, and/or the like, on a device (not shown) that may be remotely located from the device <NUM>. For example, the platform engine <NUM> may be operable for initializing and executing the service <NUM>, or one or more contexts of the service, configuring one or more parameters for executing the service <NUM>, etc. For example, a context of the service can relate to an execution of the service <NUM> given a set of parameters configured by the platform engine. An instance of the service can correspond to one or more instances that can execute with a specific context (e.g., a user or subscriber context) to provide data to the application <NUM> relating to the context (e.g., via an interface to the service <NUM> and one or more parameters specific to the instance, such as an instance or session identifier, subscription information for a subscriber of the service <NUM> or platform, and/or the like).

In an example, the platform engine <NUM> can include a configuration <NUM> for configuring one or more parameters for executing the platform engine <NUM> and/or the corresponding service <NUM>, a configuring component <NUM> for configuring the platform engine <NUM> and/or service <NUM> based on the configuration, and/or an instance executing component <NUM> for executing an instance of the service <NUM> for application <NUM> based on the configuration <NUM>, as described, for providing platform functionality to the application <NUM> (e.g., via service <NUM>). The configuring component <NUM> can include an expression language interpreter <NUM> for detecting and processing expression language syntax indicated in the configuration <NUM> and/or an optional expression language registry <NUM> for storing one or more definitions of functions that can be executed using the expression language. In this regard, configuration <NUM> can include a configuration file formatted based on a syntax of a standardized format, such as JSON, XML, etc., where the configuration file can define expressions that comply with the standardized format and can be interpreted by the expression language interpreter <NUM> such to allow specifying dynamic configuration values in configuration <NUM>. This, in turn, may allow for configuring functionality at the platform engine <NUM> by using the otherwise static configuration <NUM> without necessarily having to modify the platform engine <NUM> software itself.

For example, the expression language interpreter <NUM> can detect certain characters or values in the configuration <NUM> that can be indicative of the expression language syntax, and can accordingly process the expression language syntax in the configuration <NUM>. This may result, for example, in platform engine <NUM> loading an in-memory representation of the configuration <NUM> (e.g., in memory <NUM>) that includes static values that may be defined in the configuration as well as dynamic values that can be resolved by processing the corresponding expression language syntax. The expression language may define literal values, functions, etc., and/or may allow for specifying custom functions via the optional expression language registry <NUM>.

<FIG> is a flowchart of an example of a method <NUM> for interpreting expressions in a configuration file. For example, method <NUM> can be performed by a device <NUM>, and/or one or more components thereof, to process configuration files having expression language syntax.

In method <NUM>, at action <NUM>, one or more static values defined in a configuration file based on a file format are determined. In an example, configuring component <NUM>, e.g., in conjunction with processor <NUM>, memory <NUM>, operating system <NUM>, platform engine <NUM>, etc., can determine the one or more static values defined in the configuration file (e.g., configuration <NUM>) based on the file format. As described, the configuration <NUM> is of a standardized format for defining configuration values, such as a JSON format. According to the invention, the configuration files are used to indicate name/value pairs that can be parsed by an application or service to determine and utilize the configuration values for certain variable indicated by the name. Though the configuration files allow for specifying variable values for certain parameters, the nature of the configuration files themselves is conventionally static such that the configuration file itself does not change. In this regard, configuration <NUM> may include some static values defined according to the file format (e.g., as name/value pairs), and the configuring component <NUM> can parse the configuration <NUM> and determine at least some static values indicated in the configuration file.

In method <NUM>, at action <NUM>, one or more expressions defined according to an expression language are detected in the configuration file based on the file format. In an example, expression language interpreter <NUM>, e.g., in conjunction with processor <NUM>, memory <NUM>, operating system <NUM>, platform engine <NUM>, configuring component <NUM>, etc., can detect the one or more expressions, defined according to an expression language, in the configuration file (e.g., configuration <NUM>) based on the file format. As described, the expression language may include a syntax that complies with the file format (by allowing definition of expressions using the name/value pair format). For example, the syntax of the expression language may allow for defining literals where the name of the name value pair can be a string (e.g., defined by quotations) representing the name of the literal, and the value of the name value pair can be the value of the literal. In this example, the expression language interpreter <NUM> may detect a literal value expression in the configuration <NUM> based on detecting a string for the name of the name value pair.

According to the invention, the syntax of the expression language allows for defining functions where the name of the name value pair is an indicator of a function (e.g., a string reserved for indicating functions), and the value of the name value pair is the name of the function, which is called on the platform engine <NUM>. In addition, the function name/value pair can be followed by a list of arguments for the function, which are indicated as another name/value pair having a name as an indicator of arguments (e.g., a string reserved for indicating function arguments) and a value indicating a list of one or more arguments for the function, which may include static values, literals as defined above, etc. In this example, the expression language interpreter <NUM> may detect the function based on detecting the string reserved for indicating functions and/or can identify corresponding arguments based on identifying the string reserved for indicating arguments.

In method <NUM>, at action <NUM>, the one or more expressions are interpreted, via a platform engine and based on the expression language. In an example, expression language interpreter <NUM>, e.g., in conjunction with processor <NUM>, memory <NUM>, operating system <NUM>, platform engine <NUM>, configuring component <NUM>, etc., can interpret, via the platform engine <NUM> and based on the expression language, the one or more expressions. For example, the expression language interpreter <NUM> can execute to read one or more configuration files (e.g., configuration <NUM>), and interpret the expressions to allow for indicating dynamic values in the configuration, as described above and further herein. In this example, the expression language interpreter <NUM> can compile or otherwise validate the expressions by ensuring the expressions use the correct syntax to be interpreted as literals, functions, arguments for functions, etc., as described further herein. In an example, this may include verifying that function names, the list of arguments (e.g., number and/or types of the arguments) for one or more functions indicated in the one or more expressions match a signature of a function registered with the platform engine <NUM>, as described further herein. If not, for example, the expression language interpreter <NUM> may generate an error for presenting on the platform engine <NUM> in a log file, etc. indicating that one or more expressions in the configuration <NUM> were invalid.

For example, interpreting the one or more expressions at action <NUM> may optionally include, at action <NUM>, interpreting a literal value defined in a name/value pair. In an example, expression language interpreter <NUM>, e.g., in conjunction with processor <NUM>, memory <NUM>, operating system <NUM>, platform engine <NUM>, configuring component <NUM>, etc., can interpret the literal value defined in the name/value pair. For example, as described the expression language interpreter <NUM> can detect the literal value based on detecting a syntax of a literal value, which may include detecting a variable name of the literal value that is a string marked by quotation marks or some other indicator. In a specific example, for complying with a JSON file format, the expression language may allow for definition of literals of various types as {"name" : value}. For example, the literals may include strings, numbers (e.g., <NUM>-bit integers), Boolean, decimal, or date values defined, respectively, based on the following syntax:
{"string" : "example string"}
{"number" : <NUM>}
{"bool" : true}
{"decimal" : <NUM>}
{"date" : "<NUM>-<NUM>-<NUM>"}
For example, the expression language interpreter <NUM> may detect the literal value based on detecting the variable name portion of the name/value pair as having quotations (e.g., "string"), and may interpret the literal value based at least in part on identifying a type of the data in the value portion of the name/value pair (e.g., quotations can indicate string or date, which can be further identified based on the format of the value, numbers and decimals can be identified based on no quotations and identifying numbers with or without a decimal point, Booleans can be identified as true or false without quotations, etc..

In addition, for example, interpreting the one or more expressions at action <NUM> may optionally include, at action <NUM>, interpreting and executing a function and/or associated arguments defined in one or more name/value pairs. In an example, expression language interpreter <NUM>, e.g., in conjunction with processor <NUM>, memory <NUM>, operating system <NUM>, platform engine <NUM>, configuring component <NUM>, etc., can interpret and execute the function and/or associated arguments defined in the one or more name/value pairs. For example, as described the expression language interpreter <NUM> can detect the function call based on detecting a syntax of a function, which may include detecting a name portion of a name/value pair that indicates a function. In a specific example, for complying with a JSON file format, the expression language may allow for definition of a function by using the following syntax: {"f" : "function name", "args" : [arguments]}, where the arguments can be other expressions, such as literal values, other function calls, etc. In this example, the expression language interpreter <NUM> can interpret the function based on detecting the "f" name of a name/value pair, and can interpret the function name to call based on the value portion.

For example, the function name can correspond to a function registered on the platform engine <NUM> as a function callable using the expression language, and thus the expression language interpreter <NUM> can verify that the function name is registered at the platform engine <NUM> before proceeding with processing other expressions in the configuration <NUM>. In this regard, in one example, interpreting the function at action <NUM> can include determining whether the function is registered on the platform engine <NUM>. If not, for example, expression language interpreter <NUM> can return an exception or error value for the function, log an error in interpreting the configuration file, and/or the like. In addition, the expression language interpreter <NUM> can interpret the corresponding arguments for the function based on detecting the "args" name of a subsequent name/value pair, and can interpret the arguments as the value portion of the name/value pair. In this regard, for example, the expression language interpreter <NUM> can pass the argument values when calling the function via platform engine <NUM>. Similarly, in this regard, interpreting the function at action <NUM> can further include determining whether the format of the arguments (e.g., number of arguments, types of arguments, etc.) match a signature of the registered function, and if not expression language interpreter <NUM> can return an exception or error value for the function, log an error, etc. Where the arguments include additional expressions, the expression language interpreter <NUM> can first detect and interpret the expressions, as described above, to verify that the additional expressions are also valid syntax, correspond to registered functions, comply with function signatures, etc..

In method <NUM>, at action <NUM>, the one or more static data values and the one or more expressions are stored, in a memory, as a representation of the configuration file. In an example, configuring component <NUM>, e.g., in conjunction with processor <NUM>, memory <NUM>, operating system <NUM>, platform engine <NUM>, etc., can store, in the memory (e.g., memory <NUM>), the one or more static data values and the one or more expressions as a representation of the configuration file (e.g., configuration <NUM>). This can occur after interpreting the configuration <NUM>, and thus the in-memory representation of the configuration can be a compiled and/or otherwise validated representation, which can be used for executing one or more instances of the service <NUM>. For example, this in-memory representation of the configuration <NUM> can be used to configure the platform engine <NUM> to execute a certain service <NUM>, and/or one or more instances of that service <NUM>, to provide platform services to one or more applications <NUM> that instantiate the instance of the service <NUM>. In this regard, the configuration <NUM> can specify dynamic values to be resolved for an instance of the service <NUM> by use of the expression language, which may allow for executing an instance of the service <NUM> where the dynamic values in the in-memory representation of the configuration <NUM> can resolve to values specific to a user subscription or other context.

In method <NUM>, at action <NUM>, an instance of the service is executed, by the platform engine and based on the representation of the configuration, for resolving one or more values related to the one or more expressions. In an example, instance executing component <NUM>, e.g., in conjunction with processor <NUM>, memory <NUM>, operating system <NUM>, platform engine <NUM>, etc., can execute, via the platform engine <NUM> and based on the representation of the configuration (e.g., configuration <NUM>), the instance of the service <NUM> for resolving one or more values related to the one or more expressions. For example, instance executing component <NUM> can execute an instance of the service <NUM> based on a request from the application <NUM>. In an example, the request from the application <NUM> may include one or more parameters that may assist in resolving the one or more expressions in the in-memory representation of the configuration <NUM>. For example, the request may include one or more parameters related to a user subscription, context, etc., such as a subscriber identifier, which can be used to access one or more subscriber parameters, etc. This may allow for modification of, or otherwise accessing of, the platform engine <NUM> or one or more services <NUM> provided by the platform engine <NUM>, where the one or more expressions can resolve to parameters related to a user subscription or other context, as described.

In a specific example, the platform engine <NUM> can define a rewards platform for awarding points to user profiles as users use an application or service. The platform engine <NUM> may have various functions that can be performed by corresponding services <NUM> or related contexts, such as functions for awarding points to users for certain detected activities, displaying ways to earn points, redeem points for merchandise, etc. An expression language, as described herein, can be used to configure the functions of the rewards platform by allowing specifying of expressions in configuration files that may allow for obtaining contextual values without having to specify multiple configuration files for multiple different values. For example, allowing use of an expression language in the configuration files, as described above, can enable the rewards platform to provide dynamic attributes in the configuration files by using the expressions, such as the maximum number of points or activities that can be rewardable for user, the amount of points a user receives for doing an activity, an indication of whether the user is eligible to get points for an activity, an indication of whether a promotion or redemption item is visible to the user, a display order of promotions or redemption items on the user interface, various attributes for promotions and redemption items (including title, images, localized text, etc.), and/or the like.

In addition, some possible functions defined and detectable by the expression language interpreter <NUM> for the rewards platform may include type conversion functions, such as to:string, to:date, to:number, to:bool, time manipulation functions, such as time, elapsed: seconds, elapsed:hours, elapsed:days, time+days, time+months, Boolean logic/comparisons, such as not ("!"), equal ("="), not equal ("!="), greater than (">"), greater than or equal (">="), less than ("<"), less than or equal ("<="), addition ("+"), subtraction ("-"), multiplication ("*"), division ("/"), modulo ("%"), min, max, etc., conjunctions functions, such as and, or, basic user data functions, such as profile, counter, balance, properties, set operation functions, such as inRange, contains, in, offer-specific functions, such as progress, eligible, complete, completiondate, activityprogress, activityprogresshistory, activitymax, pointprogress, pointmax, session functions, such as header, item, country, language, order functions, such as redeemcount, lastsku, etc. Thus, expression language interpreter <NUM> may allow for calling such functions in the configuration <NUM> for the rewards platform.

For one specific example, a notification can be configured in configuration <NUM> to trigger if the following condition evaluates to true:
{ "f": ">=",
"args": [
{
"f": "balance",
"args": []
},
{
"f": "catalog:price",
"args": [
{
"f": "profile",
"args": [
{
"string": "goal"
} ] } ] } ]
}
When an application <NUM> makes a request to the service <NUM>, and the service <NUM> utilizes this configured notification, the expressions can be resolved based on the user subscription information. For example, the "balance" function can resolve to a point balance associated with the user profile. The "catalog:price" function can return a catalog price for an item that is passed into the function as a string (which ends up as the "goal" string in this example). The "profile" function can return a user profile parameter indicated by an argument passed in as a string. In this example, the "goal" string is passed as a parameter to the "profile" function to obtain a "goal" attribute from the user profile, which can relate to an identifier of a goal item that the user wishes to purchase with rewards. The "catalog:price" function returns the catalog price for that goal item. The ">=" function can compare two values and return true if the first value is greater than or equal to the second value, and in this case compares the user's point balance to the catalog price for the goal item. The ">=" function can return true if the user's point balance is greater than or equal to the catalog price for the goal item, or false otherwise.

<FIG> is a flowchart of an example of a method <NUM> for generating configuration files including dynamic expressions. For example, method <NUM> can be performed by a device <NUM>, and/or one or more components thereof, by a user, developer, etc., to generate configuration files having expression language syntax.

In method <NUM>, optionally at action <NUM>, a list of functions and/or function signatures available for defining one or more expressions in a configuration file may be obtained from a platform engine. In an example, expression language registry <NUM>, e.g., in conjunction with processor <NUM>, memory <NUM>, operating system <NUM>, platform engine <NUM>, etc., can obtain, from the platform engine (e.g., platform engine <NUM>), a list of functions and/or function signatures available for defining one or more expressions in the configuration file. For example, the platform engine <NUM>, in this regard, may allow for defining and registering of functions that can be subsequently interpreted by the expression language interpreter <NUM> (e.g., alternatively or in addition to functions that may be coded into the platform engine <NUM>). For example, the functions can be defined with the name and corresponding function code.

In a specific example, a function can be provided for adding functions to the expression language registry <NUM> (e.g., which can be called via an interface to platform engine <NUM>). This function may be similar to the following:
public interface IFunctionRegistry
{
void Register(string name, Func<IExpression[], IExpression> func, string
description, ArgumentsInfo, IEnumerable<IEnumerable<IExpression>> parameters =
null);
IExpression Compile(string name, IExpression[] args);
IDictionary<string, FunctionInfo> AllFunctions(); }
To register a function for returning a country from a user subscription in the specific rewards platform described above, for example, the above function may be called using the following: registry. Register("country", Country, "return true if country is set to value, false otherwise", new ArgumentsInfo("country"), arguments);
In addition, the following function expression can be registered:
public IExpression Country(IExpression[] arguments)
{
if (arguments. Length != <NUM> ∥ arguments[<NUM>]. Type !=
Expression. ResultType. String)
{
throw new ArgumentOutOfRangeException("country needs <NUM> argument"); }
return builder. Build(
Expression. ResultType. Bool,
arguments,
(args, input) =>
{
var market = input. Country ?? marketProvider. Country;
return string. Equals(market, arguments[<NUM>]. Evaluate(input). StringValue,
StringComparison. InvariantCultureIgnoreCase);
});
}
In this example, once registered, the "country" function can be called in the configuration <NUM> using the expression language as:
{
"f" : "country",
"args" : [
{
"string" : "us" } ] }
And can return true or false based on whether or not the country for the instance associated with the application <NUM> is "us. " For example, the instance associated with the application <NUM> itself (e.g., input. Country) can indicate a country corresponding to the request, and the "country" function can obtain and use this country code in comparing to "us". If this country code is not available, the marketProvider. Country associated with the user subscription can be used and compared to "us. " In either case, the "country" function can return true if the obtained country is "us" or false otherwise.

In an example, the registered function (and/or other functions) and the related signature, which may indicate arguments for the function, types of the arguments (e.g., string, number, Boolean, etc.), if any, and/or other information may be obtained from the platform engine <NUM>. This information can be used in generating the configuration <NUM>, as described herein, to allow for invoking the functions via the configuration <NUM> by using the correct syntax in calling the functions via the configuration <NUM>. The functions can then be executed via the platform engine <NUM>, as described above, based on the expression language interpreter <NUM> detecting the function syntax, verifying the function is registered on the platform engine <NUM> (e.g., based on verifying the function name in the configuration <NUM>), verifying the arguments, if any, as specified in the configuration <NUM> are of the corrected type as for the function registered on the platform engine <NUM>, etc..

In method <NUM>, at action <NUM>, a configuration file can be generated for a service based on a file format. In an example, configuring component <NUM>, e.g., in conjunction with processor <NUM>, memory <NUM>, operating system <NUM>, platform engine <NUM>, etc., can generate, or be used to generate, the configuration file (e.g., configuration <NUM>) for the service (e.g., service <NUM>) based on the file format (e.g., JSON). For example, a developer may generate the configuration file using the configuring component <NUM>, an independent device (e.g., and may load the configuration onto the platform engine <NUM>), etc..

In any case, for example, at action <NUM>, one or more expressions can be included in the configuration file based on an expression language where the one or more expressions comply with the file format. In an example, configuring component <NUM>, e.g., in conjunction with processor <NUM>, memory <NUM>, operating system <NUM>, platform engine <NUM>, etc., can include, or be used to include, in the configuration file (e.g., configuration <NUM>), the one or more expressions based on the expression language (e.g., as described above) where the one or more expressions comply with the file format. In addition, as described, this may optionally include including a literal value defined in a name/value pair, at action <NUM>, and/or including a function and/or associated arguments defined in one or more name/value pairs, at action <NUM>.

In method <NUM>, at action <NUM>, the configuration can be provided to the service for use in executing an instance of a context based on the configuration. In an example, configuring component <NUM>, e.g., in conjunction with processor <NUM>, memory <NUM>, operating system <NUM>, platform engine <NUM>, etc., can provide the configuration (e.g., configuration <NUM>) to the service (e.g., service <NUM> or platform engine <NUM>) for use in executing an instance of the context based on the configuration. As described, for example, configuring component <NUM> can interpret the expressions in the configuration <NUM> and resolve one or more dynamic values for storing in an in-memory representation of the configuration <NUM>. In the specific example described, configuring component <NUM> can interpret the values for a rewards platform user based on an invoked instance of the context by calling functions indicated in the expression language based on values in a user/subscriber profile. In any case, specification of dynamic configuration values can be used in this regard.

<FIG> illustrates an example of device <NUM>, similar to or the same as device <NUM> (<FIG>) including additional optional component details as those shown in Figure. In one implementation, device <NUM> may include processor <NUM>, which may be similar to processor <NUM> for carrying out processing functions associated with one or more of components and functions described herein. Processor <NUM> can include a single or multiple set of processors or multi-core processors. Moreover, processor <NUM> can be implemented as an integrated processing system and/or a distributed processing system.

Device <NUM> may further include memory <NUM>, which may be similar to memory <NUM> such as for storing local versions of applications being executed by processor <NUM>, such as platform engine <NUM>, configuring component <NUM>, an operating system <NUM>, other components thereof, applications, related instructions, parameters, etc. Memory <NUM> can include a type of memory usable by a computer, such as random access memory (RAM), read only memory (ROM), tapes, magnetic discs, optical discs, volatile memory, nonvolatile memory, and any combination thereof.

Further, device <NUM> may include a communications component <NUM> that provides for establishing and maintaining communications with one or more other devices, parties, entities, etc., utilizing hardware, software, and services as described herein. Communications component <NUM> may carry communications between components on device <NUM> (e.g., display device <NUM>), as well as between device <NUM> and external devices, such as devices located across a communications network and/or devices serially or locally connected to device <NUM>. For example, communications component <NUM> may include one or more buses, and may further include transmit chain components and receive chain components associated with a wireless or wired transmitter and receiver, respectively, operable for interfacing with external devices.

Additionally, device <NUM> may include a data store <NUM>, which can be any suitable combination of hardware and/or software, that provides for mass storage of information, databases, and programs employed in connection with implementations described herein. For example, data store <NUM> may be or may include a data repository for applications and/or related parameters (e.g., platform engine <NUM>, configuring component <NUM>, an operating system <NUM>, other components thereof, applications, etc.) not currently being executed by processor <NUM>. In addition, data store <NUM> may be or include a data repository for platform engine <NUM>, configuring component <NUM>, an operating system <NUM>, other components thereof, applications, and/or one or more other components of the device <NUM>.

Device <NUM> may include a user interface component <NUM> operable to receive inputs from a user of device <NUM> and further operable to generate outputs for presentation to the user. User interface component <NUM> may include one or more input devices, including but not limited to a keyboard, a number pad, a mouse, a touch-sensitive display, a navigation key, a function key, a microphone, a voice recognition component, a gesture recognition component, a depth sensor, a gaze tracking sensor, a switch/button, any other mechanism capable of receiving an input from a user, or any combination thereof. Further, user interface component <NUM> may include one or more output devices, including but not limited to a display, a speaker, a haptic feedback mechanism, a printer, any other mechanism capable of presenting an output to a user, or any combination thereof.

Device <NUM> may additionally include and/or be communicatively coupled with a platform engine <NUM>, configuring component <NUM>, components thereof, etc. for providing the functionalities described herein.

Accordingly, in one or more implementations, one or more of the functions described may be implemented in hardware, software, firmware, or any combination thereof. By way of example, and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. Disk and disc, as used herein, includes compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), and floppy disk where disks usually reproduce data magnetically, while discs reproduce data optically with lasers.

Claim 1:
A computer implemented method for processing a configuration file having a JavaScript Object Notation, JSON, format, comprising:
determining (<NUM>) one or more static data values defined in the configuration file based on the JSON format;
detecting (<NUM>) one or more expressions, defined according to an expression language, in the configuration file based on the JSON format, wherein each of the one or more expressions includes a name value pair;
interpreting (<NUM>) via a platform engine and based on the expression language, at least two name value pairs of the one or more expressions as a function, wherein a name of a first one of the at least two name value pairs includes a string reserved for indicating functions and a value of the first one of the at least two name value pairs indicates a function name of the function, and wherein a name of a second one of the at least two name value pairs includes a string reserved for indicating one or more arguments for the function and a value of the second one of the at least two name value pairs indicates the one or more arguments for the function, including determining whether the function indicated by its name is defined by the platform engine;
storing (<NUM>), in a memory and based on interpreting at least two name value pairs of the one or more expressions as a function, the one or more expressions and the one or more static data values as a representation of the configuration file; and
executing (<NUM>), by the platform engine and based on the representation of the configuration file, an instance of a service for resolving one or more values related to the one or more expressions, including calling, based on determining that the function is defined by the platform engine, the function on the platform engine with the one or more arguments, wherein at least one of the one or more arguments correspond to the instance of the service.