US20150199451A1 - Methods and systems for simplifying obejct mapping for external interfaces - Google Patents
Methods and systems for simplifying obejct mapping for external interfaces Download PDFInfo
- Publication number
- US20150199451A1 US20150199451A1 US14/603,069 US201514603069A US2015199451A1 US 20150199451 A1 US20150199451 A1 US 20150199451A1 US 201514603069 A US201514603069 A US 201514603069A US 2015199451 A1 US2015199451 A1 US 2015199451A1
- Authority
- US
- United States
- Prior art keywords
- adl
- expression
- list
- expressions
- application
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 95
- 238000013507 mapping Methods 0.000 title claims abstract description 9
- 238000012545 processing Methods 0.000 claims description 17
- 230000000903 blocking effect Effects 0.000 abstract description 4
- 230000014509 gene expression Effects 0.000 description 54
- 230000008569 process Effects 0.000 description 29
- 238000013515 script Methods 0.000 description 13
- 101100379633 Xenopus laevis arg2-a gene Proteins 0.000 description 12
- 101150088826 arg1 gene Proteins 0.000 description 12
- 238000011156 evaluation Methods 0.000 description 8
- 101150026173 ARG2 gene Proteins 0.000 description 7
- 101100005166 Hypocrea virens cpa1 gene Proteins 0.000 description 7
- 101100379634 Xenopus laevis arg2-b gene Proteins 0.000 description 7
- 230000006870 function Effects 0.000 description 7
- 230000015654 memory Effects 0.000 description 6
- 230000008901 benefit Effects 0.000 description 4
- 238000004891 communication Methods 0.000 description 4
- ZLIBICFPKPWGIZ-UHFFFAOYSA-N pyrimethanil Chemical compound CC1=CC(C)=NC(NC=2C=CC=CC=2)=N1 ZLIBICFPKPWGIZ-UHFFFAOYSA-N 0.000 description 4
- 238000013461 design Methods 0.000 description 3
- 238000013459 approach Methods 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 238000012360 testing method Methods 0.000 description 2
- 230000001413 cellular effect Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000012854 evaluation process Methods 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
Images
Classifications
-
- G06F17/30917—
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/25—Integrating or interfacing systems involving database management systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/25—Integrating or interfacing systems involving database management systems
- G06F16/258—Data format conversion from or to a database
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/80—Information retrieval; Database structures therefor; File system structures therefor of semi-structured data, e.g. markup language structured data such as SGML, XML or HTML
- G06F16/84—Mapping; Conversion
- G06F16/86—Mapping to a database
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
-
- H04L67/42—
Definitions
- FIG. 1 is a network according to an embodiment of the invention.
- FIG. 2 is an application dialog language (ADL) application according to an embodiment of the invention.
- ADL application dialog language
- FIG. 3 is a mapping process according to an embodiment of the invention.
- FIG. 4 is an ADL process according to an embodiment of the invention.
- FIG. 5 is a general definition of s-expressions according to an embodiment of the invention.
- FIG. 6A is an in-process ADL application implementation according to an embodiment of the invention.
- FIG. 6B is an out-of-process ADL application implementation according to an embodiment of the invention.
- Contemporary web service approaches may be based on request/response protocols that send and receive documents, for example third-party scripts.
- Third-party scripts may commit security and/or resource violations.
- Systems and methods described herein may enable the safe execution of programs such as third-party scripts.
- Systems and methods described herein may provide rich interactions based on entity schemas.
- a lightweight scripting system may allow entity interactions to be composed remotely and then distributed across participating back ends. Each participating back end may implement the scripting system.
- Original architecture and design may be provided so that a systems programmer can create a compatible scripting system in any application programming language.
- the lightweight scripting system may be conversational so that requesters may be able to preserve session state between calls to the scripting engine.
- the lightweight scripting system may be composable so that it may support programming-in-the-small abstractions that allow for sub-procedures, looping, and building of expressions from other expressions.
- the lightweight scripting system may be multi-tenant friendly so that it may be fair to Software as a Service (SaaS) environments that house multiple tenants. A tenant may not be able to prevent another tenant from its fair share of resources.
- SaaS Software as a Service
- the lightweight scripting system may be highly scalable so that it may be scalable to new heights compared to typical enterprise architectures (e.g., 100,000's of concurrent users per process instead of the typical 1,000s of users).
- the lightweight scripting system may be very low risk so that it may help ensure the basic tenets of security, which are confidentiality, integrity, and availability.
- a computer may be any programmable machine capable of performing arithmetic and/or logical operations.
- computers may comprise processors, memories, data storage devices, and/or other commonly known or novel circuits and/or components. These components may be connected physically or through network or wireless links
- Computers may also comprise software which may direct the operations of the aforementioned components.
- Computers may be referred to with terms that are commonly used by those of ordinary skill in the relevant arts, such as servers, PCs, mobile devices, communication devices, and other terms.
- Computers may facilitate communications between users, may provide databases, may perform analysis and/or transformation of data, and/or perform other functions.
- Computers may be linked to one another via a network or networks.
- a network may be any plurality of completely or partially interconnected computers wherein some or all of the computers are able to communicate with one another. It will be understood by those of ordinary skill that connections between computers may be wired in some cases (i.e. via Ethernet, coaxial, optical, or other wired connection) or may be wireless (i.e. via Wi-Fi, WiMax, cellular, satellite, or other wireless connection). Connections between computers may use any protocols, including connection oriented protocols such as TCP or connectionless protocols such as UDP. Any connection through which at least two computers may exchange data may be the basis of a network.
- FIG. 1 is a network 100 according to an embodiment of the invention.
- the network 100 may include one or more computers.
- the network 100 may include one or more servers 110 which may be configured to provide web services and which may implement application dialog language (ADL) applications 200 .
- An ADL application 200 may be an application or logical/virtual machine that enables execution of large numbers of instructions with minimal resources, as described in greater detail below.
- the ADL application and related functions may be contained within a single server 110 (e.g., implementation 600 of FIG. 6A ) or may interact with functions on other servers 110 (e.g., implementation 650 of FIG. 6B ).
- the ADL application 200 may communicate with other computers via the Internet 120 or other communication networks in some embodiments.
- the ADL application 200 may include and/or be in communication with a local database 130 .
- One or more client computers 140 may be included in the network 100 . These client computers 140 may communicate with the ADL application 200 via the Internet 120 or some other connection.
- the scripting systems and methods described herein may introduce an ADL as a lightweight scripting language and the ADL application 200 as an execution environment for the language. Implementations, discussions, and examples presented herein may be based on the Scala programming language, the Java Virtual Machine (JVM), the Akka model of actors, and the libraries of the respective frameworks, although ADL and the ADL application 200 described herein may be used with other languages, models, libraries, etc.
- JVM Java Virtual Machine
- Akka model of actors the libraries of the respective frameworks
- ADL may be a compact, infinitely composable scripting language.
- ADL may be based on symbolic expressions (s-expressions), which are the foundation of languages like Lisp and Scheme.
- the atoms, lists, and procedures of ADL may be as follows:
- Variable names may be descriptive like ⁇ days-integer> as opposed to just ⁇ integer>.
- Atoms may be the indivisible building blocks of ADL and may include the following:
- the following expression may determine whether an s-expression is an atom.
- Data and programs may be specified equivalently as lists of words, numbers, or other lists, separated by whitespace and surrounded by parentheses.
- ADL may be based on s-expressions and may be defined inductively as:
- the following convenience functions may determine whether an s-expression is a list or an empty list, respectively.
- An association may be a pair where the first value may be an atom and the second value may be an atom or another s-expr.
- the following convenience function determines whether an s-expr may be an association.
- An association list may be a data structure used frequently in ADL.
- An a-list may be a list of pairs (conses); each pair may be an association. The head of a pair may be called the key, and the tail may be called the datum.
- Key values may be atoms, but datum values may be an atom or another s-expr.
- variable association list may be abbreviated as ⁇ a-list>.
- a typed list (or t-list) may be used to convert object instances between ADL and the JVM.
- the first element may be a capitalized symbol, and the remaining elements may be one or more s-expressions.
- a typed list may be abbreviated as ⁇ t-list>.
- symOrFormals expr Define a variable or a procedure. If symOrFormals is a symbol, then bind into the environment the evaluation of expr at the symbol symOrFormals, otherwise symOrFormals has to be a formal procedure definition where the first symbol is the procedure name and the remaining symbols are the argument names. For example, the expression (factorial n) describes the factorial procedure that takes one argument.
- the expr argument contains the body of the procedure definition. (if pred conseq alt) If the pred expression is non nil (true) then evaluate the conseq expression. Otherwise evaluate the alt expression. The alt expression is optional. If alt is not provided, and the pred expression evaluates to false, then nil (undefined) is returned.
- (lambda formals body) Define a closure (ad-hoc procedure) over the current environment. The formals and body are specified under the same rules as the define expression.
- an example expression (map (lambda (x) (* x x)) (list 1 2 3 4 5 6)) that uses a lambda inline and returns (1 4 9 16 25 36) when evaluated. (or arg1, arg2, .
- map( ) Procedure Return a new list by mapping the given “lis” argument to ;a new set of values transformed with the “proc” function. (define (map proc lis) (if (not (list? lis)) (error “Invalid map call. Argument is not a List.”)) (cond ((empty? lis) ′( )) (else (cons (proc (head lis)) (map proc (tail lis)))) ) ) ) ) ) )
- ADL may be immutable. Procedures may create new expressions from other expressions, but all strings, numbers, symbols, and lists may be immutable.
- An s-expression may be classically defined as an atom or an expression of the form (x . y) where x and y are s-expressions.
- the second, recursive part of the definition may represent an ordered pair so that s-expressions are effectively binary trees.
- ADL may use an abbreviated notation (like most modern s-expression notations) to represent lists in s-expressions, so that
- the ADL application may be a non-blocking design.
- the requester may submit an ADL expression (e.g., an ADL script) to be evaluated, and an environment of procedures and variables, and a continuation call for when the result is ready.
- ADL expression e.g., an ADL script
- This approach may allow processing to be suspended until sub-processing is completed, which may also be suspended until some external event is achieved.
- FIG. 2 is an ADL application 200 according to an embodiment of the invention.
- the ADL application 200 may include at least three modules that may work together to achieve an overall non-blocking execution of an ADL expression externally from the ADL application 200 and/or within a session environment 240 : an evaluator module 210 , a scheduler module 220 , and a governor module 230 .
- the data to be read may enter the ADL application 200 from an external process at step 1 of FIG. 2 and a result may be provided to the external process at step 2 in FIG. 2 .
- the evaluator module 210 may evaluate an expression, but if the expression contains sub-expressions (known as procedures in Lisp), the evaluator module 210 may submit the expression to the scheduler module 220 to be run in the future (asynchronously) from a pool of threads. If the expression does not contain sub-expressions, it may be sent out for execution at step 3 of FIG. 2 .
- the expression may be executed according to the systems and methods described in related U.S. patent application Ser. No. 12/829,680. Some expressions may be executed within the session environment 240 and/or by the evaluator module 210 .
- the evaluator module 210 and the scheduler module 220 may check their execution with the governor module 230 , which may prevent any one session from abusing its use of resources.
- FIG. 3 is a mapping process 300 according to an embodiment of the invention.
- a request is received at the server 110 , for example from a client computer 140 .
- the request may be associated with an ADL application 200 , and in 330 the ADL application 200 may be associated to a logical object.
- the ADL application 200 may perform tasks such as those described with respect to FIG. 4 below to facilitate a response to the request.
- the server 110 may convert the logical object to a physical object.
- the server 110 may map between the physical object and a relational database (e.g., database 130 ).
- FIG. 4 is an ADL process 400 which may be carried out by the ADL application 200 according to an embodiment of the invention.
- the evaluator module 210 may break the request into one or more to-do items and pass these items to the scheduler module 220 , which may schedule the items for processing.
- the evaluator module 210 may receive data to be evaluated (step 1 of FIG. 2 ).
- the data may be a request comprising one or more s-expressions.
- the evaluator module 210 may schedule an initial s-expression from the data.
- the evaluator module 210 may determine whether there are presently any s-expressions scheduled for execution by the scheduler module 220 . If not, in 480 the process 400 may complete with a final result (step 2 of FIG. 2 ), and in 485 the process 400 may end.
- the evaluator module 210 may get the next s-expression from the data. In 425 , the evaluator module 210 may pass this s-expression to the governor module 230 .
- the governor module 230 may check execution to prevent any individual session from abusing resources of the ADL application 200 to ensure that security or resource violations do not occur. If the governor module 230 detects a violation, for example because execution would exceed specified security or resource constraints, it may notify the evaluator module 210 , and in 430 the evaluator module 210 may complete processing of the s-expression with a violation error return and the process 400 may exit 485 .
- the evaluator module 210 may determine whether there are any more s-expressions to evaluate. If so, in 420 the evaluator module 210 may get the next s-expression from the scheduler module 220 . If not, in 480 the process 400 may complete with a final result (step 2 of FIG. 2 ), and in 485 the process 400 may end.
- the evaluator module 210 may analyze the s-expression to determine whether it can be calculated locally by the ADL application 200 in the session environment 240 . If it can, in 440 the evaluator module 210 may complete processing of the s-expression with a request for execution by the session environment 240 , which may then process the s-expression. In 475 , the evaluator module 210 may determine whether there are any more s-expressions to evaluate. If so, in 420 the evaluator module 210 may get the next s-expression from the scheduler module 220 . If not, in 480 the process 400 may complete with a final result (step 2 of FIG. 2 ), and in 485 the process 400 may end.
- the evaluator module 210 may analyze the s-expression to determine whether it can be calculated externally after a dialog request. If so, in 450 the evaluator module 210 may complete processing of the s-expression with a call to a dialog system (step 3 of FIG. 2 ). In 475 , the evaluator module 210 may determine whether there are any more s-expressions to evaluate. If so, in 420 the evaluator module 210 may get the next s-expression from the scheduler module 220 . If not, in 480 the process 400 may complete with a final result (step 2 of FIG. 2 ), and in 485 the process 400 may end.
- the evaluator module 210 may analyze the s-expression to determine whether it is a primitive request that can be executed by the evaluator module 210 itself. If so, in 460 the evaluator module 210 may complete processing of the s-expression and return a primitive result. In 475 , the evaluator module 210 may determine whether there are any more s-expressions to evaluate. If so, in 420 the evaluator module 210 may get the next s-expression from the scheduler module 220 . If not, in 480 the process 400 may complete with a final result (step 2 of FIG. 2 ), and in 485 the process 400 may end.
- the evaluator module 210 may analyze the s-expression to determine whether it is a complex request that should be executed by external resources. If so, in 470 the evaluator module 210 may pass the contents of the s-expression to the scheduler module 220 for scheduling. In 475 , the evaluator module 210 may determine whether there are any more s-expressions to evaluate. If so, in 420 the evaluator module 210 may get the next s-expression from the scheduler module 220 . If not, in 480 the process 400 may complete with a final result (step 2 of FIG. 2 ), and in 485 the process 400 may end.
- the process 400 may thus allow multiple client requests to be performed using the ADL application 200 before a result is returned.
- the following example script may be executed according to this process 400 .
- the following example is a simple read of name, phoneNumber, and emailAddress from the entity identified as com.catavolt.mk.test.case002.domain.Customer.
- the data to be read enters the ADL application 200 at step 1 of FIG. 2 and a result is provided at step 2 in FIG. 2 .
- the example illustrates a number of features; the script is conversational and resumes an existing session based on a cryptographic hash of a session key; a procedure is composed (using begin) of three other procedures: createEditorModel, openEditorModel, and readEditorModel; session state is conditionally defined and maintained using the procedures if, not, defined?, and define; a request number field rqsNr is computed each time the script is run; and finally, the script ends with a list literal that contains the request number and the read result.
- the last expression of a script determines the result, so the list literal of the example is returned to the caller through a continuation every time the script is evaluated.
- the Evaluator Module 210 The Evaluator Module 210
- the ADL application 200 may be implemented as an actor in Scala using the Akka framework.
- the design may take advantage of the built-in and highly scalable Akka runtime for asynchronous processing.
- the following code snippet is an example Machine class illustrating method signatures which may be involved in a non-blocking evaluator module 210 .
- the runEval( ) method may be the entry point to the recursive evaluation process. It may receive an expression, environment, and continuation that correspond to the main entry point (step 1 of FIG. 2 ). The implementation may set up a continuation object that may be used to complete the process with either a success or a failure.
- the eval( ) method may be the main program loop (i.e., 320 - 350 of FIG. 3 ) and may run repeatedly until all expressions and sub-expressions are evaluated, or until an exception halts the process.
- the eval method may reveal the simplistic power of s-expressions and the ADL language. The entire language may be built upon types of String, Decimal, Boolean, Sym, and List.
- the evalProc( ) method may be used to invoke procedures, which may be the only higher level expression supported, all other expressions may be atoms.
- the system of evaluation may be applicative order.
- the first element of the list may evaluate to a procedure defined by the language.
- the remaining list elements (the tail) may be evaluated and may all be defined after evaluation.
- the procedure associated with the first element may then be applied to the arguments from the remaining list elements.
- the evalArgs( ) method may be used to evaluate arguments before they are applied within the evalProc( ) method described above. Each argument may be evaluated individually and asynchronously if it involves a sub-expression. Finally, when all arguments are known, the continuation may be called to apply the procedure to these arguments.
- the Scheduler Module 220 The Scheduler Module 220
- the scheduler module 220 in the Machine class described above may be built on the Akka framework.
- the scheduling details that determine when a procedure will run, and on what thread the procedure will run, may be determined by the Akka runtime.
- the ADL application 200 may implement the receive method to handle the asynchronous processing.
- Expressions may be submitted for scheduling through an actor send method.
- the eval( ) method shown above may use the self ! CallProc(list, pEnv, pCont) statement to schedule an asynchronous evaluation of a sub-expression.
- the ADL application 200 may be activated by the scheduler module 220 by invoking its receive method.
- One embodiment of a basic receive method is shown below.
- the two messages which may be essential to the operation of the ADL application 200 are Eval and CallProc.
- the Governor Module 230 The Governor Module 230
- the governor module 230 may contain the necessary protocol to ensure that maximum allowances are not exceeded for at least the following metrics: elapsed running time, call depth, number of calls, number of object references, and size allocations.
- Procedure calls may be checked with the governor module 230 at the entry points and exit points using enterProc( ) and exitProc( ) as shown above in the sample code for evalProc( ).
- the governor module 230 may use these calls to track the elapsed running time, number of calls, and call depth.
- the enterProc( ) and exitProc( ) procedures may make calls to incRef( ) and decRef( ) so that object references and size allocations may be tracked as arguments move in and out of scope with expressions.
- the concur procedure, as defined above, may dispatch work concurrently. In this case, the call depth tracking may suffice for “call width” tracking as well.
- the methods incRef( ) and decRef( ) may be called any time an object is held or released (respectively) through a reference. This may allow the governor module 230 to track the number of object references and size allocations. There may be at least three scenarios where reference counting need to occur: when arguments are passed to a sub-expression, when a cons procedure creates a pair, and when a value is held by the Env object.
- the only output available to ADL scripts may be a simple println procedure for system logging and debugging. This procedure may route its output through the governor module 230 to ensure that the maximum log output for a session is not exceeded.
- the printStatus method may be an internal method used for debugging and may not be available to ADL scripts during execution.
- FIG. 5 is a general definition of s-expressions 500 according to an embodiment of the invention.
- This definition 500 may indicate that all expressions other than atoms may be evaluated recursively. This one point may be used to reason about governance in terms of expressions.
- the elements of expressions may be atoms and expressions.
- the elements of expressions may be immutable. Elements may be referenced in nested expressions, so elements passed to nested expressions may be actively counted and uncounted as they move in and out of scope.
- the cons operator may create a reference to the tail element that may need to be counted.
- a head element that is no longer referenced may need to uncount its tail reference.
- Elements bound to the Env object may have acquired a new reference and may need to be counted.
- an element unbound from the Env object may have lost a reference and may need to be uncounted.
- An element that is no longer referenced may be eligible to have its memory reclaimed.
- the reference implementation and implementations based on the JVM that may mean the object is left for garbage collection.
- An expression that is evaluated and not used may leave an element that is not referenced. The element may be eligible to have its memory reclaimed.
- n may be changed.
- the previous value stored at n may be unbound from the Env object and may be uncounted.
- the new value at n may be bound and counted. See element “a” of FIG. 5 for an example.
- a complex expression may be evaluated.
- the begin procedure may cause an expression to be bound to the Env object under the factorial symbol.
- the nested expressions under define may be counted and may remain as active references because they were bound transitively through the Env object.
- the actual call (factorial 6) may not be used, therefore its result may no longer be referenced and may be eligible to have its memory reclaimed. See element “b” of FIG. 5 for an example.
- a computation may be made. During computation the operator and integer objects may have been active and referenced. At completion however, the final result and all intermediate results may no longer be referenced and may be eligible to have their memory reclaimed. See element “c” of FIG. 5 for an example.
- the ADL application 200 may be implemented in process if the application server 110 has a structured web services API, or it can be implemented out of process as a services broker.
- FIG. 6A is an in-process ADL application 200 implementation 500 according to an embodiment of the invention.
- the ADL application 200 may be implemented within a JVM environment 610 which may also include TCP/IP 620 , web services API 630 , and application 640 modules.
- FIG. 6B is an out-of-process ADL application 200 implementation 650 according to an embodiment of the invention.
- the ADL application 200 may be implemented within a JVM environment 660 by itself, and a separate JVM environment 670 may include TCP/IP 620 , web services API 630 , and application 640 modules.
- conversational applications may be supported through the notion of a session.
- Each session may have its own ADL environment 240 that may preserve state between process-to-process invocations.
- An invocation may look up the session environment 240 and then may pass it through on the eval(expr, env, cont) call shown in FIGS. 2-3 .
- All processing within an ADL application 200 may be isolated to its environment; therefore the session may be isolated to its session environment 240 .
- the continuation callback
- the continuation may be invoked to complete processing.
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Stored Programmes (AREA)
Abstract
Description
- This application is a continuation of U.S. patent application Ser. No. 14/106,427, filed Dec. 13, 2013, which claims the benefit of U.S. Provisional Application No. 61/736,882, filed Dec. 13, 2012. U.S. patent application Ser. No. 14/106,427 is also a continuation-in-part of U.S. patent application Ser. No. 13/830,667, filed Mar. 14, 2013, which is a continuation of U.S. patent application Ser. No. 12/829,680, filed Jul. 2, 2010 (now U.S. Pat. No. 8,423,561, Issued Apr. 16, 2013), which claims the benefit of U.S. Provisional Application No. 61/222,557, filed Jul. 2, 2009. All of the foregoing are incorporated by reference in their entireties.
-
FIG. 1 is a network according to an embodiment of the invention. -
FIG. 2 is an application dialog language (ADL) application according to an embodiment of the invention. -
FIG. 3 is a mapping process according to an embodiment of the invention. -
FIG. 4 is an ADL process according to an embodiment of the invention. -
FIG. 5 is a general definition of s-expressions according to an embodiment of the invention. -
FIG. 6A is an in-process ADL application implementation according to an embodiment of the invention. -
FIG. 6B is an out-of-process ADL application implementation according to an embodiment of the invention. - Contemporary web service approaches may be based on request/response protocols that send and receive documents, for example third-party scripts. Third-party scripts may commit security and/or resource violations. Systems and methods described herein may enable the safe execution of programs such as third-party scripts. Systems and methods described herein may provide rich interactions based on entity schemas. A lightweight scripting system may allow entity interactions to be composed remotely and then distributed across participating back ends. Each participating back end may implement the scripting system. Original architecture and design may be provided so that a systems programmer can create a compatible scripting system in any application programming language.
- The lightweight scripting system may be conversational so that requesters may be able to preserve session state between calls to the scripting engine. The lightweight scripting system may be composable so that it may support programming-in-the-small abstractions that allow for sub-procedures, looping, and building of expressions from other expressions. The lightweight scripting system may be multi-tenant friendly so that it may be fair to Software as a Service (SaaS) environments that house multiple tenants. A tenant may not be able to prevent another tenant from its fair share of resources. The lightweight scripting system may be highly scalable so that it may be scalable to new heights compared to typical enterprise architectures (e.g., 100,000's of concurrent users per process instead of the typical 1,000s of users). The lightweight scripting system may be very low risk so that it may help ensure the basic tenets of security, which are confidentiality, integrity, and availability.
- The systems and methods described herein may comprise one or more computers. A computer may be any programmable machine capable of performing arithmetic and/or logical operations. In some embodiments, computers may comprise processors, memories, data storage devices, and/or other commonly known or novel circuits and/or components. These components may be connected physically or through network or wireless links Computers may also comprise software which may direct the operations of the aforementioned components. Computers may be referred to with terms that are commonly used by those of ordinary skill in the relevant arts, such as servers, PCs, mobile devices, communication devices, and other terms. Computers may facilitate communications between users, may provide databases, may perform analysis and/or transformation of data, and/or perform other functions. It will be understood by those of ordinary skill that those terms used herein are interchangeable, and any computer capable of performing the described functions may be used. For example, though the terms “database” and “server” may appear in the following specification, the disclosed embodiments may not necessarily be limited to databases and/or servers.
- Computers may be linked to one another via a network or networks. A network may be any plurality of completely or partially interconnected computers wherein some or all of the computers are able to communicate with one another. It will be understood by those of ordinary skill that connections between computers may be wired in some cases (i.e. via Ethernet, coaxial, optical, or other wired connection) or may be wireless (i.e. via Wi-Fi, WiMax, cellular, satellite, or other wireless connection). Connections between computers may use any protocols, including connection oriented protocols such as TCP or connectionless protocols such as UDP. Any connection through which at least two computers may exchange data may be the basis of a network.
-
FIG. 1 is anetwork 100 according to an embodiment of the invention. Thenetwork 100 may include one or more computers. For example, thenetwork 100 may include one ormore servers 110 which may be configured to provide web services and which may implement application dialog language (ADL)applications 200. AnADL application 200 may be an application or logical/virtual machine that enables execution of large numbers of instructions with minimal resources, as described in greater detail below. The ADL application and related functions may be contained within a single server 110 (e.g.,implementation 600 ofFIG. 6A ) or may interact with functions on other servers 110 (e.g.,implementation 650 ofFIG. 6B ). The ADLapplication 200 may communicate with other computers via the Internet 120 or other communication networks in some embodiments. TheADL application 200 may include and/or be in communication with alocal database 130. One ormore client computers 140 may be included in thenetwork 100. Theseclient computers 140 may communicate with theADL application 200 via the Internet 120 or some other connection. - The scripting systems and methods described herein may introduce an ADL as a lightweight scripting language and the
ADL application 200 as an execution environment for the language. Implementations, discussions, and examples presented herein may be based on the Scala programming language, the Java Virtual Machine (JVM), the Akka model of actors, and the libraries of the respective frameworks, although ADL and theADL application 200 described herein may be used with other languages, models, libraries, etc. - ADL may be a compact, infinitely composable scripting language. ADL may be based on symbolic expressions (s-expressions), which are the foundation of languages like Lisp and Scheme. The atoms, lists, and procedures of ADL may be as follows:
- The following documentation conventions may be used to describe variables:
-
- Symbol variables are specified as <symbol>
- Number variables are specified as <number> or some subset of the real number space like <integer>
- String variables are specified as “<some-variable-name>”
- S-expression variables are specified as <s-expr>
- Variable lists of strings like (“<value-1>” . . . “<value-2>”) are specified as <string-list>
- Variable names may be descriptive like <days-integer> as opposed to just <integer>.
- Atoms may be the indivisible building blocks of ADL and may include the following:
-
- Symbol—may be a value that may begin with a letter and may be followed by any character expect <whitespace>, a left parenthesis “(”, or a right parenthesis “)”.
- String—may any set of characters within double quotation marks. A double quotation may be escaped with \” when appearing as part of a string.
- Number—may be any numeric expression in decimal format, which may be any string beginning with an optional “-” character, followed by any number of digits 0-9, followed by an optional “.” character, followed by an optional sequence of digits 0-9. The value may be parsed by the Scala class scala.math.BigDecimal.
- nil or ( )—an empty list that may be used as the second argument of a cons expression, the false value of a boolean expression, or as an indication of “undefined”.
- The following expression may determine whether an s-expression is an atom.
-
(atom?<s-expr>) - Data and programs may be specified equivalently as lists of words, numbers, or other lists, separated by whitespace and surrounded by parentheses.
- ADL may be based on s-expressions and may be defined inductively as:
- 1. An atom, or
- 2. An expression of the form (x . y) where x and y are s-expressions and . is the cons operator.
- An abbreviated notation may be used to represent lists in s-expressions, so that (x y z) stands for (x . (y . (z . nil)))
- The following convenience functions may determine whether an s-expression is a list or an empty list, respectively.
-
(list? <s-expr>) (empty? <s-expr>) - An association may be a pair where the first value may be an atom and the second value may be an atom or another s-expr.
-
(<atom><s-expr>) - The following convenience function determines whether an s-expr may be an association.
-
(assoc?<s-expr>) - An association list (or a-list) may be a data structure used frequently in ADL. An a-list may be a list of pairs (conses); each pair may be an association. The head of a pair may be called the key, and the tail may be called the datum.
- Key values may be atoms, but datum values may be an atom or another s-expr.
-
((<atom-1><s-expr-1>) . . . (<atom-N><s-expr-N>)) - A variable association list may be abbreviated as <a-list>.
- A typed list (or t-list) may be used to convert object instances between ADL and the JVM. The first element may be a capitalized symbol, and the remaining elements may be one or more s-expressions.
-
(<Type><s-expr-1> . . . <s-expr-N>) - A typed list may be abbreviated as <t-list>.
- Special forms may be different because they may not evaluate in strict applicative order.
-
(and arg1, arg2, . . . argN) At least two arguments are required. Return the last evaluation if all arguments evaluate to non-nil (true) values. Return nil (false) the first time an argument evaluates to nil. This expression short circuits. (begin arg1 . . . argN) Evaluate each argument in order. Return the last evaluation as the value for the begin expression. (cond (p1 e1) . . . (pN eN)) The predicate p1 is evaluated first. If its value is nil (false), then p2 is evaluated. If p2's value is nil, then p3 is evaluated. This process continues until a predicate is found whose value is non nil (true), in which case the interpreter returns the value of the corresponding consequent expression eN of the clause as the value of the conditional expression. If none of the predicates is found to be non nil, the value of cond is nil. (define symOrFormals expr) Define a variable or a procedure. If symOrFormals is a symbol, then bind into the environment the evaluation of expr at the symbol symOrFormals, otherwise symOrFormals has to be a formal procedure definition where the first symbol is the procedure name and the remaining symbols are the argument names. For example, the expression (factorial n) describes the factorial procedure that takes one argument. The expr argument contains the body of the procedure definition. (if pred conseq alt) If the pred expression is non nil (true) then evaluate the conseq expression. Otherwise evaluate the alt expression. The alt expression is optional. If alt is not provided, and the pred expression evaluates to false, then nil (undefined) is returned. (lambda formals body) Define a closure (ad-hoc procedure) over the current environment. The formals and body are specified under the same rules as the define expression. Here's an example expression (map (lambda (x) (* x x)) ( list 1 2 3 4 5 6)) that uses a lambda inline and returns (1 4 9 16 25 36) when evaluated. (or arg1, arg2, . . . argN) At least two arguments are required. Return the first evaluation that is non nil (true). If all arguments evaluate to nil (false), then return nil. This expression short circuits. (quote arg) Return arg without evaluation. (set! sym arg) Set the value of sym to arg in the environment structure. The variable at sym must already be defined. -
-
(atom? arg) Is arg an atom? Return arg if true, otherwise return nil. (concur arg1 . . . argN) Evaluate each argument concurrently. Return results in the same order as the expressions. (cons arg1 arg2) Return a new list where arg1 is the head and arg2 is the tail. (empty? arg) Is arg an empty list? Return true or nil. (eq? arg1 arg2) Is arg1 and arg2 the same object in memory? (equal? arg1 arg2) Do the two arguments have equal value? Return true or nil. (error “msg”) Escape processing with a “msg” as the error message. (eval arg) Evaluate arg as an expression. (list arg1 . . . argN) Return a list containing arg1 . . . argN. (list? arg) Is arg a list? Return arg if true, otherwise return nil. (map proc lis) Map the procedure over the given list. See details below under “The map( ) Procedure”. (not arg) Return true if arg is nil, otherwise return nil. (num? arg) Is arg a number? Return arg if true, otherwise return nil. (pair? arg) Is arg a pair? Return arg if true, otherwise return nil. (println arg) Print the string representation of arg to the system log. (string arg) Return a string representation of arg. In JVM based languages, this is equivalent to the toString( ) method. (string? arg) Is arg a string? stringConcat(arg1 . . . argN) Concatenate the string representation of each argument into one string. (substring str start end) Return the substring starting and start and ending at end, which is the first character that is NOT part of the string. (sym? arg) Is arg a symbol? (head arg) Return the head of the list arg. (tail arg) Return the tail of the list arg. -
The map( ) Procedure ;Return a new list by mapping the given “lis” argument to ;a new set of values transformed with the “proc” function. (define (map proc lis) (if (not (list? lis)) (error “Invalid map call. Argument is not a List.”)) (cond ((empty? lis) ′( )) (else (cons (proc (head lis)) (map proc (tail lis)))) ) ) - The elements of ADL may be immutable. Procedures may create new expressions from other expressions, but all strings, numbers, symbols, and lists may be immutable.
- An s-expression may be classically defined as an atom or an expression of the form (x . y) where x and y are s-expressions. The second, recursive part of the definition may represent an ordered pair so that s-expressions are effectively binary trees. ADL may use an abbreviated notation (like most modern s-expression notations) to represent lists in s-expressions, so that
-
- (x y z) stands for (x . (y . (z . nil)))
- The ADL application may be a non-blocking design. The requester may submit an ADL expression (e.g., an ADL script) to be evaluated, and an environment of procedures and variables, and a continuation call for when the result is ready. This approach may allow processing to be suspended until sub-processing is completed, which may also be suspended until some external event is achieved.
-
FIG. 2 is anADL application 200 according to an embodiment of the invention. TheADL application 200 may include at least three modules that may work together to achieve an overall non-blocking execution of an ADL expression externally from theADL application 200 and/or within a session environment 240: anevaluator module 210, ascheduler module 220, and agovernor module 230. The data to be read may enter theADL application 200 from an external process atstep 1 ofFIG. 2 and a result may be provided to the external process atstep 2 inFIG. 2 . Theevaluator module 210 may evaluate an expression, but if the expression contains sub-expressions (known as procedures in Lisp), theevaluator module 210 may submit the expression to thescheduler module 220 to be run in the future (asynchronously) from a pool of threads. If the expression does not contain sub-expressions, it may be sent out for execution atstep 3 ofFIG. 2 . For example, the expression may be executed according to the systems and methods described in related U.S. patent application Ser. No. 12/829,680. Some expressions may be executed within thesession environment 240 and/or by theevaluator module 210. Theevaluator module 210 and thescheduler module 220 may check their execution with thegovernor module 230, which may prevent any one session from abusing its use of resources. -
FIG. 3 is amapping process 300 according to an embodiment of the invention. In 310, a request is received at theserver 110, for example from aclient computer 140. In 320, the request may be associated with anADL application 200, and in 330 theADL application 200 may be associated to a logical object. TheADL application 200 may perform tasks such as those described with respect toFIG. 4 below to facilitate a response to the request. In 340, theserver 110 may convert the logical object to a physical object. In 350, theserver 110 may map between the physical object and a relational database (e.g., database 130). -
FIG. 4 is anADL process 400 which may be carried out by theADL application 200 according to an embodiment of the invention. Through theprocess 400, theevaluator module 210 may break the request into one or more to-do items and pass these items to thescheduler module 220, which may schedule the items for processing. - In 405, the
evaluator module 210 may receive data to be evaluated (step 1 ofFIG. 2 ). The data may be a request comprising one or more s-expressions. In 410, theevaluator module 210 may schedule an initial s-expression from the data. In 415, theevaluator module 210 may determine whether there are presently any s-expressions scheduled for execution by thescheduler module 220. If not, in 480 theprocess 400 may complete with a final result (step 2 ofFIG. 2 ), and in 485 theprocess 400 may end. - Otherwise, in 420 the
evaluator module 210 may get the next s-expression from the data. In 425, theevaluator module 210 may pass this s-expression to thegovernor module 230. Thegovernor module 230 may check execution to prevent any individual session from abusing resources of theADL application 200 to ensure that security or resource violations do not occur. If thegovernor module 230 detects a violation, for example because execution would exceed specified security or resource constraints, it may notify theevaluator module 210, and in 430 theevaluator module 210 may complete processing of the s-expression with a violation error return and theprocess 400 may exit 485. If there is no error, in 475 theevaluator module 210 may determine whether there are any more s-expressions to evaluate. If so, in 420 theevaluator module 210 may get the next s-expression from thescheduler module 220. If not, in 480 theprocess 400 may complete with a final result (step 2 ofFIG. 2 ), and in 485 theprocess 400 may end. - If the
governor module 230 does not detect a violation, in 435 theevaluator module 210 may analyze the s-expression to determine whether it can be calculated locally by theADL application 200 in thesession environment 240. If it can, in 440 theevaluator module 210 may complete processing of the s-expression with a request for execution by thesession environment 240, which may then process the s-expression. In 475, theevaluator module 210 may determine whether there are any more s-expressions to evaluate. If so, in 420 theevaluator module 210 may get the next s-expression from thescheduler module 220. If not, in 480 theprocess 400 may complete with a final result (step 2 ofFIG. 2 ), and in 485 theprocess 400 may end. - If the s-expression will not be processed in the
session environment 240, in 445 theevaluator module 210 may analyze the s-expression to determine whether it can be calculated externally after a dialog request. If so, in 450 theevaluator module 210 may complete processing of the s-expression with a call to a dialog system (step 3 ofFIG. 2 ). In 475, theevaluator module 210 may determine whether there are any more s-expressions to evaluate. If so, in 420 theevaluator module 210 may get the next s-expression from thescheduler module 220. If not, in 480 theprocess 400 may complete with a final result (step 2 ofFIG. 2 ), and in 485 theprocess 400 may end. - If the s-expression will not be processed by the dialog system, in 455 the
evaluator module 210 may analyze the s-expression to determine whether it is a primitive request that can be executed by theevaluator module 210 itself. If so, in 460 theevaluator module 210 may complete processing of the s-expression and return a primitive result. In 475, theevaluator module 210 may determine whether there are any more s-expressions to evaluate. If so, in 420 theevaluator module 210 may get the next s-expression from thescheduler module 220. If not, in 480 theprocess 400 may complete with a final result (step 2 ofFIG. 2 ), and in 485 theprocess 400 may end. - If the s-expression will not be processed by the
evaluator module 210, in 465 theevaluator module 210 may analyze the s-expression to determine whether it is a complex request that should be executed by external resources. If so, in 470 theevaluator module 210 may pass the contents of the s-expression to thescheduler module 220 for scheduling. In 475, theevaluator module 210 may determine whether there are any more s-expressions to evaluate. If so, in 420 theevaluator module 210 may get the next s-expression from thescheduler module 220. If not, in 480 theprocess 400 may complete with a final result (step 2 ofFIG. 2 ), and in 485 theprocess 400 may end. - The
process 400 may thus allow multiple client requests to be performed using theADL application 200 before a result is returned. The following example script may be executed according to thisprocess 400. - The following example is a simple read of name, phoneNumber, and emailAddress from the entity identified as com.catavolt.mk.test.case002.domain.Customer. The data to be read enters the
ADL application 200 atstep 1 ofFIG. 2 and a result is provided atstep 2 inFIG. 2 . The example illustrates a number of features; the script is conversational and resumes an existing session based on a cryptographic hash of a session key; a procedure is composed (using begin) of three other procedures: createEditorModel, openEditorModel, and readEditorModel; session state is conditionally defined and maintained using the procedures if, not, defined?, and define; a request number field rqsNr is computed each time the script is run; and finally, the script ends with a list literal that contains the request number and the read result. The last expression of a script determines the result, so the list literal of the example is returned to the caller through a continuation every time the script is evaluated. -
(resumeSession ′(sessionHandle “d41d8cd98f00b204e9800998ecf8427e”) ′(callProps nil) (begin (if (not (defined? dh)) (define dh (createEditorModel ′(domainClassName “com.catavolt.mk.test.case002.domain.Customer”) ′(callProps nil))) ) (if (not (defined? oemr)) (define oemr (openEditorModel dh ′(mode read) ′(objectId “129”) ′(projection (“name” “phoneNumber” “emailAddress”)) ′(callProps nil))) ) (if (not (defined? remr)) (define remr (readEditorModel dh ′(callProps nil))) ) (if (not (defined? rqsNr)) (define rqsNr 0)) (set! rqsNr (+ rqsNr 1)) (list rqsNr remr) ) ) - The
ADL application 200 may be implemented as an actor in Scala using the Akka framework. The design may take advantage of the built-in and highly scalable Akka runtime for asynchronous processing. The following code snippet is an example Machine class illustrating method signatures which may be involved in anon-blocking evaluator module 210. -
type Continuation = (Either[Throwable, Any]) => Unit private[mk] class Machine extends Actor with ActorLogging { private eval(pExpr: Any, pEnv: Env, pCont: Continuation): NotUsed private def evalArgs(pArgs: List[Any], pEnv: Env, pCont: Continuation): NotUsed private def evalProc(pList: List[Any], pEnv: Env, pCont: Continuation): NotUsed private def runEval(pExpr: Any, pEnv: Env, pSender: ActorRef): NotUsed }
The runEval( ) Method - The runEval( ) method may be the entry point to the recursive evaluation process. It may receive an expression, environment, and continuation that correspond to the main entry point (
step 1 ofFIG. 2 ). The implementation may set up a continuation object that may be used to complete the process with either a success or a failure. -
private def runEval(pExpr: Any, pEnv: Env, pSender: ActorRef): NotUsed = { val mainCont: Continuation = (result) => { result match { case Left(e) => pSender ! Status.Failure(e) case Right(v) => pSender ! Result(v) } } eval(pExpr, pEnv, mainCont) NotUsed }
The eval( ) Method - The eval( ) method may be the main program loop (i.e., 320-350 of
FIG. 3 ) and may run repeatedly until all expressions and sub-expressions are evaluated, or until an exception halts the process. The eval method may reveal the simplistic power of s-expressions and the ADL language. The entire language may be built upon types of String, Decimal, Boolean, Sym, and List. -
private eval(pExpr: Any, pEnv: Env, pCont: Continuation): NotUsed = { try { pExpr match { case string: String => pCont(Right(string)) case decimal: BigDecimal => pCont(Right(decimal)) case boolean: Boolean => pCont(Right(boolean)) case sym: Sym => pEnv.find(sym) match { case None => pCont(Left(new MachineException(“Not found: ” + sym))) case Some(v) => pCont(Right(v)) } case list: List[_] => list match { case Nil => pCont(Right(Nil)) case _ => self ! CallProc(list, pEnv, pCont) } case other => pCont(Left(new MachineException(“Invalid: ” + pExpr))) } } catch { case exc => pCont(Left(new MachineException(“Unexpected”, exc))) } NotUsed }
The evalProc( ) Method - The evalProc( ) method may be used to invoke procedures, which may be the only higher level expression supported, all other expressions may be atoms. The system of evaluation may be applicative order. The first element of the list may evaluate to a procedure defined by the language. The remaining list elements (the tail) may be evaluated and may all be defined after evaluation. The procedure associated with the first element may then be applied to the arguments from the remaining list elements.
-
private def evalProc(pList: List[Any], pEnv: Env, pCont: Continuation): NotUsed = { def exitPoint: Continuation = (result) => { governor.exitProc(pList) pCont(result) } try { if (pList == Nil) { pCont(Right(Nil)) // An empty list evaluates to an empty list } else { val cont: Continuation = (evalResult) => { evalResult match { case Left(exc) => pCont(Left(exc)) case Right(args) => args match { case (proc: Proc) :: args => overnor.enterProc(pList) proc(args, pEnv, this, exitPoint) case other => pCont(Left(new MachineException(“Invalid: ” + evalResult))) } } } evalArgs(pList, pEnv, cont) } } catch { case exc => pCont(Left(new MachineException(“Unexpected”, exc))) } NotUsed }
The evalArgs( ) Method - The evalArgs( ) method may be used to evaluate arguments before they are applied within the evalProc( ) method described above. Each argument may be evaluated individually and asynchronously if it involves a sub-expression. Finally, when all arguments are known, the continuation may be called to apply the procedure to these arguments.
-
private def evalArgs(pArgs: List[Any], pEnv: Env, pCont: Continuation): NotUsed = { try { if (pArgs == Nil) { pCont(Right(Nil)) } else { val iter = pArgs.iterator var buffer = ListBuffer[Any]( ) // Eval first element eval(iter.next( ), pEnv, cont) // Eval next element on completion of prev element def cont: Continuation = (result) => { result match { case Left(e) => pCont(Left(e)) case Right(v) => buffer.append(v) if (iter.hasNext) { eval(iter.next( ), pEnv, cont) } else { pCont(Right(buffer.toList)) } } } } } catch { case exc => pCont(Left(new MachineException(“Unexpected ”, exc))) } NotUsed } - The
scheduler module 220 in the Machine class described above may be built on the Akka framework. The scheduling details that determine when a procedure will run, and on what thread the procedure will run, may be determined by the Akka runtime. In order to use the Akka scheduling, theADL application 200 may implement the receive method to handle the asynchronous processing. - Expressions may be submitted for scheduling through an actor send method. The eval( ) method shown above may use the self ! CallProc(list, pEnv, pCont) statement to schedule an asynchronous evaluation of a sub-expression.
- The
ADL application 200 may be activated by thescheduler module 220 by invoking its receive method. One embodiment of a basic receive method is shown below. The two messages which may be essential to the operation of theADL application 200 are Eval and CallProc. -
def receive: PartialFunction[Any, Unit] = { case message => try { message match { case CallProc(list, env, cont) => evalProc(list, env, cont) case Eval(x, env) => env match { case None => runEval(x, Env( ), sender) case Some(v) => runEval(x, v, sender) } case Status.Failure(e) => log.error(e, “Machine received unhandled failure”) case u => sender ! Status.Failure(new MachineException(“Unknown: ” + u)) } } catch { case exc => sender ! Status.Failure(new MachineException(“Unexpected”, exc)) } } - The
governor module 230 may contain the necessary protocol to ensure that maximum allowances are not exceeded for at least the following metrics: elapsed running time, call depth, number of calls, number of object references, and size allocations. -
trait Governor { def decRef(pValue: Any) def enterProc(pExpr: List[Any]) def exitProc(pExpr: List[Any]) def incRef(pValue: Any) def println(pLine: String) def printStatus } - Procedure calls may be checked with the
governor module 230 at the entry points and exit points using enterProc( ) and exitProc( ) as shown above in the sample code for evalProc( ). Thegovernor module 230 may use these calls to track the elapsed running time, number of calls, and call depth. The enterProc( ) and exitProc( ) procedures may make calls to incRef( ) and decRef( ) so that object references and size allocations may be tracked as arguments move in and out of scope with expressions. The concur procedure, as defined above, may dispatch work concurrently. In this case, the call depth tracking may suffice for “call width” tracking as well. - The methods incRef( ) and decRef( ) may be called any time an object is held or released (respectively) through a reference. This may allow the
governor module 230 to track the number of object references and size allocations. There may be at least three scenarios where reference counting need to occur: when arguments are passed to a sub-expression, when a cons procedure creates a pair, and when a value is held by the Env object. - The only output available to ADL scripts may be a simple println procedure for system logging and debugging. This procedure may route its output through the
governor module 230 to ensure that the maximum log output for a session is not exceeded. The printStatus method may be an internal method used for debugging and may not be available to ADL scripts during execution. - The simplicity of s-expressions and the recursive nature of evaluating expressions may make it easier to reason about reference counting.
FIG. 5 is a general definition of s-expressions 500 according to an embodiment of the invention. Thisdefinition 500 may indicate that all expressions other than atoms may be evaluated recursively. This one point may be used to reason about governance in terms of expressions. For example, the elements of expressions may be atoms and expressions. The elements of expressions may be immutable. Elements may be referenced in nested expressions, so elements passed to nested expressions may be actively counted and uncounted as they move in and out of scope. The cons operator may create a reference to the tail element that may need to be counted. A head element that is no longer referenced may need to uncount its tail reference. Elements bound to the Env object may have acquired a new reference and may need to be counted. Likewise, an element unbound from the Env object may have lost a reference and may need to be uncounted. An element that is no longer referenced may be eligible to have its memory reclaimed. In the reference implementation and implementations based on the JVM, that may mean the object is left for garbage collection. An expression that is evaluated and not used may leave an element that is not referenced. The element may be eligible to have its memory reclaimed. - According to the reasoning based on the
definition 500, some interesting scenarios may be realized. For example, a variable n may be changed. The previous value stored at n may be unbound from the Env object and may be uncounted. The new value at n may be bound and counted. See element “a” ofFIG. 5 for an example. - In another example, a complex expression may be evaluated. The begin procedure may cause an expression to be bound to the Env object under the factorial symbol. The nested expressions under define may be counted and may remain as active references because they were bound transitively through the Env object. The actual call (factorial 6) may not be used, therefore its result may no longer be referenced and may be eligible to have its memory reclaimed. See element “b” of
FIG. 5 for an example. - In another example, a computation may be made. During computation the operator and integer objects may have been active and referenced. At completion however, the final result and all intermediate results may no longer be referenced and may be eligible to have their memory reclaimed. See element “c” of
FIG. 5 for an example. - The
ADL application 200 may be implemented in process if theapplication server 110 has a structured web services API, or it can be implemented out of process as a services broker. -
FIG. 6A is an in-process ADL application 200implementation 500 according to an embodiment of the invention. In thisimplementation 600, theADL application 200 may be implemented within aJVM environment 610 which may also include TCP/IP 620,web services API 630, andapplication 640 modules. -
FIG. 6B is an out-of-process ADL application 200implementation 650 according to an embodiment of the invention. In thisimplementation 650, theADL application 200 may be implemented within aJVM environment 660 by itself, and aseparate JVM environment 670 may include TCP/IP 620,web services API 630, andapplication 640 modules. - In either
scenario own ADL environment 240 that may preserve state between process-to-process invocations. An invocation may look up thesession environment 240 and then may pass it through on the eval(expr, env, cont) call shown inFIGS. 2-3 . All processing within anADL application 200 may be isolated to its environment; therefore the session may be isolated to itssession environment 240. When the result is ready, the continuation (callback) may be invoked to complete processing. - While various embodiments have been described above, it should be understood that they have been presented by way of example and not limitation. It will be apparent to persons skilled in the relevant art(s) that various changes in form and detail may be made therein without departing from the spirit and scope. In fact, after reading the above description, it will be apparent to one skilled in the relevant art(s) how to implement alternative embodiments. Thus, the present embodiments should not be limited by any of the above-described embodiments.
- In addition, it should be understood that any figures which highlight the functionality and advantages are presented for example purposes only. The disclosed methodology and system are each sufficiently flexible and configurable such that they may be utilized in ways other than that shown.
- Further, the purpose of any Abstract of the Disclosure is to enable the U.S. Patent and Trademark Office and the public generally, and especially the scientists, engineers and practitioners in the art who are not familiar with patent or legal terms or phraseology, to determine quickly from a cursory inspection the nature and essence of the technical disclosure of the application. An Abstract of the Disclosure is not intended to be limiting as to the scope of the present invention in any way.
- Although the term “at least one” may often be used in the specification, claims and drawings, the terms “a”, “an”, “the”, “said”, etc. also signify “at least one” or “the at least one” in the specification, claims and drawings.
- Additionally, the terms “including”, “comprising” or similar terms in the specification, claims and drawings should be interpreted as meaning “including, but not limited to.”
- Finally, it is the applicant's intent that only claims that include the express language “means for” or “step for” be interpreted under 35 U.S.C. 212,
paragraph 6. Claims that do not expressly include the phrase “means for” or “step for” are not to be interpreted under 35 U.S.C. 212,paragraph 6.
Claims (1)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US14/603,069 US10108743B2 (en) | 2009-07-02 | 2015-01-22 | Methods and systems for simplifying object mapping for user interfaces |
Applications Claiming Priority (6)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US22255709P | 2009-07-02 | 2009-07-02 | |
US12/829,680 US8423561B2 (en) | 2009-07-02 | 2010-07-02 | Method and system for simplifying object mapping for a user interface |
US201261736882P | 2012-12-13 | 2012-12-13 | |
US13/830,667 US8943078B2 (en) | 2009-07-02 | 2013-03-14 | Methods and systems for simplifying object mapping |
US14/106,427 US8983984B2 (en) | 2009-07-02 | 2013-12-13 | Methods and systems for simplifying object mapping for external interfaces |
US14/603,069 US10108743B2 (en) | 2009-07-02 | 2015-01-22 | Methods and systems for simplifying object mapping for user interfaces |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US14/106,427 Continuation US8983984B2 (en) | 2009-07-02 | 2013-12-13 | Methods and systems for simplifying object mapping for external interfaces |
Publications (2)
Publication Number | Publication Date |
---|---|
US20150199451A1 true US20150199451A1 (en) | 2015-07-16 |
US10108743B2 US10108743B2 (en) | 2018-10-23 |
Family
ID=50476422
Family Applications (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US14/106,427 Active US8983984B2 (en) | 2009-07-02 | 2013-12-13 | Methods and systems for simplifying object mapping for external interfaces |
US14/603,069 Active US10108743B2 (en) | 2009-07-02 | 2015-01-22 | Methods and systems for simplifying object mapping for user interfaces |
Family Applications Before (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US14/106,427 Active US8983984B2 (en) | 2009-07-02 | 2013-12-13 | Methods and systems for simplifying object mapping for external interfaces |
Country Status (1)
Country | Link |
---|---|
US (2) | US8983984B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8913732B2 (en) | 2002-07-10 | 2014-12-16 | Blake Bookstaff | Method and system for providing directory assistance to erroneous telephone calls via wearable devices |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5974409A (en) * | 1995-08-23 | 1999-10-26 | Microsoft Corporation | System and method for locating information in an on-line network |
US20020032731A1 (en) * | 2000-02-07 | 2002-03-14 | Net2Phone, Inc. | Group-browsing system |
US6360249B1 (en) * | 1998-03-06 | 2002-03-19 | I2 Technologies Us, Inc. | Enterprise interaction hub for managing an enterprise web system |
US20020069113A1 (en) * | 1997-08-08 | 2002-06-06 | Michael Stern | Method and apparatus for distributing audiovisual content |
US20020147652A1 (en) * | 2000-10-18 | 2002-10-10 | Ahmed Gheith | System and method for distruibuted client state management across a plurality of server computers |
US20030028477A1 (en) * | 2001-07-31 | 2003-02-06 | Accredited Bankruptcy Services, Inc. | Automated method and system for consumer financial counseling |
US6826700B1 (en) * | 1999-11-24 | 2004-11-30 | Unisys Corporation | Method and apparatus for a web application server to automatically solicit a new password when an existing password has expired |
US20050015601A1 (en) * | 2003-07-17 | 2005-01-20 | International Business Machines Corporation | Methods, systems, and media to authenticate a user |
US20080016151A1 (en) * | 2006-07-12 | 2008-01-17 | International Business Machines Corporation | Client-side aggregation of context-sensitive request results where results for aggregation are asynchronously produced by multiple servers |
US20090055915A1 (en) * | 2007-06-01 | 2009-02-26 | Piliouras Teresa C | Systems and methods for universal enhanced log-in, identity document verification, and dedicated survey participation |
US20100082646A1 (en) * | 2008-09-26 | 2010-04-01 | Microsoft Corporation | Tracking constraints and dependencies across mapping layers |
Family Cites Families (19)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6061515A (en) * | 1994-07-18 | 2000-05-09 | International Business Machines Corporation | System and method for providing a high level language for mapping and accessing objects in data stores |
US6219693B1 (en) | 1997-11-04 | 2001-04-17 | Adaptec, Inc. | File array storage architecture having file system distributed across a data processing platform |
US6279008B1 (en) | 1998-06-29 | 2001-08-21 | Sun Microsystems, Inc. | Integrated graphical user interface method and apparatus for mapping between objects and databases |
AUPQ877600A0 (en) * | 2000-07-13 | 2000-08-03 | Erg R&D Pty Ltd | A card system |
US6823518B1 (en) * | 2000-10-17 | 2004-11-23 | Microsoft Corporation | Threading and communication architecture for a graphical user interface |
US7698277B2 (en) | 2000-12-14 | 2010-04-13 | Kapow Aps | Query processor, query processor elements and a method of establishing such a query processor and query processor elements and a domain processor |
US7188127B2 (en) | 2003-10-07 | 2007-03-06 | International Business Machines Corporation | Method, system, and program for processing a file request |
US8073879B2 (en) * | 2004-03-25 | 2011-12-06 | Microsoft Corporation | Systems and methods that transform constructs from domain to domain |
US20100162004A1 (en) | 2008-12-23 | 2010-06-24 | David Dodgson | Storage of cryptographically-split data blocks at geographically-separated locations |
US8612468B2 (en) * | 2005-03-02 | 2013-12-17 | Red Hat, Inc. | System and method for retrieving data from a relational database management system |
US7603375B2 (en) * | 2005-03-30 | 2009-10-13 | Siebel Systems, Inc. | System and method for generating a custom application |
US8112354B2 (en) * | 2005-04-08 | 2012-02-07 | Billeo, Inc | Method and system for virtual consolidation of biller direct web sites |
US9176934B2 (en) * | 2005-05-06 | 2015-11-03 | Leo Baschy | User interface for nonuniform access control system and methods |
US20070150934A1 (en) * | 2005-12-22 | 2007-06-28 | Nortel Networks Ltd. | Dynamic Network Identity and Policy management |
US8086998B2 (en) | 2006-04-27 | 2011-12-27 | International Business Machines Corporation | transforming meta object facility specifications into relational data definition language structures and JAVA classes |
US8719256B2 (en) | 2008-05-01 | 2014-05-06 | Chacha Search, Inc | Method and system for improvement of request processing |
US20090319544A1 (en) | 2008-06-20 | 2009-12-24 | Griffin James R | Facilitating integration of different computer data systems |
US9075802B2 (en) | 2008-09-05 | 2015-07-07 | Dell Products L.P. | Dynamic online presentation of solutions based on customer symptoms |
US8869256B2 (en) * | 2008-10-21 | 2014-10-21 | Yahoo! Inc. | Network aggregator |
-
2013
- 2013-12-13 US US14/106,427 patent/US8983984B2/en active Active
-
2015
- 2015-01-22 US US14/603,069 patent/US10108743B2/en active Active
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5974409A (en) * | 1995-08-23 | 1999-10-26 | Microsoft Corporation | System and method for locating information in an on-line network |
US20020069113A1 (en) * | 1997-08-08 | 2002-06-06 | Michael Stern | Method and apparatus for distributing audiovisual content |
US6360249B1 (en) * | 1998-03-06 | 2002-03-19 | I2 Technologies Us, Inc. | Enterprise interaction hub for managing an enterprise web system |
US6826700B1 (en) * | 1999-11-24 | 2004-11-30 | Unisys Corporation | Method and apparatus for a web application server to automatically solicit a new password when an existing password has expired |
US20020032731A1 (en) * | 2000-02-07 | 2002-03-14 | Net2Phone, Inc. | Group-browsing system |
US20020147652A1 (en) * | 2000-10-18 | 2002-10-10 | Ahmed Gheith | System and method for distruibuted client state management across a plurality of server computers |
US20030028477A1 (en) * | 2001-07-31 | 2003-02-06 | Accredited Bankruptcy Services, Inc. | Automated method and system for consumer financial counseling |
US20050015601A1 (en) * | 2003-07-17 | 2005-01-20 | International Business Machines Corporation | Methods, systems, and media to authenticate a user |
US20080016151A1 (en) * | 2006-07-12 | 2008-01-17 | International Business Machines Corporation | Client-side aggregation of context-sensitive request results where results for aggregation are asynchronously produced by multiple servers |
US20090055915A1 (en) * | 2007-06-01 | 2009-02-26 | Piliouras Teresa C | Systems and methods for universal enhanced log-in, identity document verification, and dedicated survey participation |
US20100082646A1 (en) * | 2008-09-26 | 2010-04-01 | Microsoft Corporation | Tracking constraints and dependencies across mapping layers |
Also Published As
Publication number | Publication date |
---|---|
US20140108511A1 (en) | 2014-04-17 |
US10108743B2 (en) | 2018-10-23 |
US8983984B2 (en) | 2015-03-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8762964B2 (en) | Optimizing symbol manipulation language-based executable applications for distributed execution | |
US8108834B2 (en) | Defining and executing processes using declarative programming language constructs | |
Hu et al. | Type-safe eventful sessions in Java | |
Deligiannis et al. | Asynchronous programming, analysis and testing with state machines | |
Farzan et al. | Reductions for safety proofs | |
US11347630B1 (en) | Method and system for an automated testing framework in design pattern and validating messages | |
US20170123958A1 (en) | Service implementation based debugger for service oriented architecture projects | |
US10089084B2 (en) | System and method for reusing JavaScript code available in a SOA middleware environment from a process defined by a process execution language | |
Agha | Actors programming for the mobile cloud | |
US7797669B1 (en) | Analysis of distributed software systems via specification substitution | |
US8495593B2 (en) | Method and system for state machine translation | |
Fortier et al. | Dyninka: a FaaS framework for distributed dataflow applications | |
US20160291941A1 (en) | System and method for supporting javascript as an expression language in a process defined by a process execution language for execution in a soa middleware environment | |
Davydova et al. | Mining hybrid UML models from event logs of SOA systems | |
US10108743B2 (en) | Methods and systems for simplifying object mapping for user interfaces | |
US10268496B2 (en) | System and method for supporting object notation variables in a process defined by a process execution language for execution in a SOA middleware environment | |
Hendriks et al. | A systematic approach for interfacing component-based software with an active automata learning tool | |
US20160110170A1 (en) | Message inlining | |
Ivanović et al. | Transforming service compositions into cloud-friendly actor networks | |
US20220050669A1 (en) | Representing asynchronous state machine in intermediate code | |
Ameloot et al. | Putting logic-based distributed systems on stable grounds | |
Babić et al. | Asynchronously communicating visibly pushdown systems | |
Lapadula et al. | A WSDL-based type system for asynchronous WS-BPEL processes | |
Geeraerts | Coverability and expressiveness properties of well-structured transition systems | |
CN108694046B (en) | Container assembly method and apparatus |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
AS | Assignment |
Owner name: CATAVOLT, INC., GEORGIA Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:OSBORNE, GLENN W.;REEL/FRAME:034793/0215 Effective date: 20131213 |
|
AS | Assignment |
Owner name: WESTERN ALLIANCE BANK, CALIFORNIA Free format text: SECURITY INTEREST;ASSIGNOR:CATAVOLT, INC.;REEL/FRAME:039364/0399 Effective date: 20160630 |
|
STCF | Information on status: patent grant |
Free format text: PATENTED CASE |
|
FEPP | Fee payment procedure |
Free format text: ENTITY STATUS SET TO UNDISCOUNTED (ORIGINAL EVENT CODE: BIG.); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY |
|
MAFP | Maintenance fee payment |
Free format text: PAYMENT OF MAINTENANCE FEE, 4TH YEAR, LARGE ENTITY (ORIGINAL EVENT CODE: M1551); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY Year of fee payment: 4 |
|
AS | Assignment |
Owner name: HEXAGON XALT SOLUTIONS, INC., GEORGIA Free format text: CHANGE OF NAME;ASSIGNOR:CATAVOLT, INC.;REEL/FRAME:061003/0694 Effective date: 20191021 |
|
AS | Assignment |
Owner name: HEXAGON TECHNOLOGY CENTER GMBH, SWITZERLAND Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:HEXAGON XALT SOLUTIONS INC.;REEL/FRAME:062067/0844 Effective date: 20221001 |