Techniques and architectures for providing an isolated runtime context in a shared environment

Information

  • Patent Grant
  • 11775418
  • Patent Number
    11,775,418
  • Date Filed
    Thursday, September 1, 2022
    2 years ago
  • Date Issued
    Tuesday, October 3, 2023
    a year ago
Abstract
Mechanisms and techniques for providing an isolated runtime environment are disclosed. Scoped properties are generated utilizing a namespace identifier. The namespace identifier is an identifier used to define a scope of at least an isolated application runtime context. Scoped objects are generated corresponding to one or more dependent services utilizing the one or more scoped properties and the namespace identifier. A target application is deployed to a container corresponding to the isolated application runtime context. The target application interacts with at least some of the dependent services utilizing the namespace identifier. At least one integration test is run on the target application in the container. The integration tests refer to the isolated application runtime context utilizing the namespace identifier.
Description
TECHNICAL FIELD

Embodiments relate to techniques for providing an isolated runtime context, for example, in a shared Databrick-type environment. More particularly, embodiments relate to techniques for providing an isolated runtime context, for example, in a shared Databrick-type environment supporting integrations with multiple external services.


BACKGROUND

A “data lake” is a collection data from multiple sources and is not stored in a standardized format. Because of this, collection of the data in the data lake is not as systematic and predictable as more structured collections of data. Thus, many of the tools that are utilized to ingest data into a data lake (or other data collection structures) do not (or cannot) provide atomic writes to the final data source.





BRIEF DESCRIPTION OF THE DRAWINGS

Embodiments of the invention are illustrated by way of example, and not by way of limitation, in the figures of the accompanying drawings in which like reference numerals refer to similar elements.



FIG. 1 is a conceptual diagram of one embodiment of an environment that can provide one or more isolated runtime environments.



FIG. 2 provides a conceptual illustration of an isolated runtime context.



FIG. 3 is a block diagram of one embodiment of an environment utilizing namespaces to provide application context.



FIG. 4 is a flow diagram of one embodiment of a technique to deploy and test an application in an isolated runtime context.



FIG. 5 is a block diagram of one embodiment of a processing resource and a machine readable medium encoded with example instructions to provide a technique to deploy and test an application in an isolated runtime context.





DETAILED DESCRIPTION

In the following description, numerous specific details are set forth. However, embodiments of the invention may be practiced without these specific details. In other instances, well-known structures and techniques have not been shown in detail in order not to obscure the understanding of this description.


Some embodiments described herein can be based on a Databricks-based architecture, which is a cloud platform for running data lake applications. Databricks is available from Databricks, Inc. of San Francisco, CA, USA. Databricks can provide a unified analytics platform that can host and run any number of apps. These embodiments are sample embodiments and other configurations with other architectures and mechanisms to support data lake applications can be provided. For example, Azure Databricks available from Microsoft could be utilized.


Some data lake implementations are based on Apache Hadoop, which provides various software utilities that provide distributed processing of large data sets across multiple computing devices. Other data lake implementations can be based on Apache Spark, which provides a framework for real time data analytics using distributed computing resources. Other platforms and mechanisms can be utilized to manage data lakes (or other large collections of data). Both Hadoop and Spark are available from The Apache Software Foundation of Wakefield, MA, USA.


Delta Lake Spark applications in association with a Databrick environment can provide a richly integrated operating environment with external services that include, for example, Apache Kafka for streaming processing, Delta Lake Tables for structured query language (SQL) operations, Amazon Web Services (AWS) for reading and writing data, Apache Zookeeper for coordination, Splunk or Sumo Logic for external logging services, and Datadog for monitoring services.


Delta Lake Spark applications and their dependent services can utilize a runtime application context in a shared Databricks environment where activities such as, for example, deployment, testing, production running, can occur. In a Delta Lake Spark Applications embodiment, a runtime context refers to the Delta Lake Spark Applications and the artifacts created in the corresponding dependent services. Without some level of isolation in this environment there will be conflicts. For example, the testing of a new feature that introduces a table schema change could interfere with other applications that refer to the same table. Further, it is currently not possible to incorporate integration testing automation into a continuous integration/continuous deployment (CI/CD) pipeline without an isolated runtime environment for builds.


The description that follows provides embodiments that provide isolated application runtime contexts that can be used in, for example, a shared Databricks environment, that can be deployed from a local deployment environment and/or integrated into a CI/CD pipeline. As used herein, an isolated runtime context is a group of artifacts created in the dependent services and decorated with the same namespace and privately accessible by the applications (e.g., Delta Lake Spark Applications) that know of the namespace.


Within the application, an isolated runtime context can be a data structure of key/value pairs. In one embodiment, the key can be the artifact type and the value can be a namespace-decorated reference to the artifact in a dependent service. While the examples that follow are primarily based around a shared Databricks environment, other environments can be utilized to provide comparable functionality utilizing the concepts and techniques described herein.



FIG. 1 is a conceptual diagram of one embodiment of an environment that can provide one or more isolated runtime contexts. In the example of FIG. 1, application 110 utilizes several external applications that provide specific services. These external applications can provide services to many client applications, each of which can have an isolated runtime context. In various embodiments, a namespace creation/utilization mechanism can be utilized to support the isolated runtime context.


In the example of FIG. 1, application 110 can utilize structured streaming services from stream processing platform 120. In one embodiment, steam processing platform 120 can be based on Kafka, or a similar platform. Application 110 can utilize checkpointing services from sync/naming platform 130. In one embodiment, sync/naming platform 130 can be based on Apache Zookeeper, or a similar platform.


Application 110 can utilize read and write services from object storage platform 140. In one embodiment, object storage platform 140 can be based on AWS S3, or a similar platform. Further, application 110 can utilize search (e.g., SQL) and table services from database platform 150. In one embodiment, database platform 150 can be based on Delta Lake, or a similar platform.


In the example of FIG. 1, application 110 can utilize logging services from log management platform 160. In one embodiment, log management platform 160 can be based on SumoLogic, or a similar platform. Application 110 can utilize metric services from data analytics platform 170. In one embodiment, data analytics platform 170 can be based on DataDog, or a similar platform. In alternate embodiments, additional and/or different remote applications/services can be supported.



FIG. 2 provides a conceptual illustration of an isolated runtime context. In general, a namespace is a string used to define the scope of an application runtime context. Application context is an abstraction of an application runtime as a component to build an isolated runtime context. In one embodiment, it can be a Scala class. In the example of FIG. 2, a namespace and application properties are utilized as input to generate scoped properties with which dependent services can create scoped objects.


As described above, namespace 200 and properties 210 can be utilized to create application context 220. In one example embodiment, application context 220 can use the following rules to generate scoped properties 230.

















Property Key
Value
Scoped Value









Kafka.topics
Topic1,Topic2
{namespace}-topic1,





{namespace}-topic2



Database.name
sas
{namespace}_sas



S3.bucket
Bucket
Bucket/namespace



Application_name
appName
{namespace}_appName











The first column (“Property Key”) is the set of property keys to be consumed by dependency services, second column (“Value”) contains sample values for those property keys, and the third column (“Scoped Value”) indicates examples of resulting scoped values. Scoped properties 230 can then be utilized to create one or more dependent services (e.g., 240, 242, 244), each of which can have corresponding scoped objects (e.g., 250, 252, 254).


In one embodiment, application context 220 takes a namespace value from a program argument or environment variable (and the program argument, in one embodiment, takes priority over the environment variable). An example of an environment variable:

    • Export SAS_APP_NAMESPACE=test_namespace


      and an example of a program argument:
    • sas_app_namespace=test_namespace_3


In some embodiments, a Docker image can be built to encapsulate all complexities to provide platform-agnostic functionalities. In alternate embodiments, other container-type technologies can also be supported. The following command is the kind of command that can be used to deploy an isolated runtime context on Databricks with a namespace. The following example command structure can function to set a namespace string (e.g., “test_namespace” below) as an environment variable to be passed to a container (lines 7 and 15).















 1
export BUILD_TYPE=dev


 2
export DEPLOY_ENV=dev


 3
export AWS_INSTANCE_PROFILE_ARN=some_role


 4
export DATABRICKS_HOST=some_host


 5
export DATABRICKS_TOKEN=some_token


 6
export CLUSTER_ID=some_cluster_id


 7
export SAS_APP_NAMESPACE=test_namespace


 8
docker run -it \


 9
-v $(pwd) /core/target/scala-2.11:/app \


10
-v $(pwd) /databricks-jobs/test/:/root/jobs \


11
-e BUILD_TYPE -e DEPLOY_ENV \


12
-e DATABRICKS_HOST \


13
-e DATABRICKS_TOKEN \


14
-e CLUSTER_ID \


15
-e SAS_APP_NAMESPACE \


16
Docker.amz.relateiq.com/relateiq/engagement-store-deployment-







namespace-support:0.0.









In the example code above, the container first reads the application deployment specifications (line 10) and passes the namespace to each application deployment as a program argument to deploy the applications to the Databricks environment. The following is an example of a deployment specification:

















{



  “name”: “$JOB_NAME”,



  “existing_cluster_id”: “$CLUSTER_ID”,



  “spark_jar_task”: {



  “parameters”: [



   “$DEPLOY_ENV”,



   “EngagementIngestion”,



   “sas_app_namespace=$SAS_APP_NAMESPACE”



  ],



  “main_class_name”:



  “com.salesforceiq.sas.engagement.spark.sasApp”,



  “run_as_repl”: true



},



“libraries”: [



  {



   “jar”: “$DBFS_JAR_PATH”



  }



 ]



}











After deployment, the applications names will be prefixed with the designated namespace identifier (e.g., test_namespace-CreateEngagement . . . ) and the database will be scoped with the namespace identifier (e.g., test_namespace_sas). Delta tables can then be created in the scoped database.


In embodiments utilizing AWS, the Delta Table AWS S3 location is scoped with the namespace identifier. In embodiments utilizing Kafka, topics are scoped with the namespace identifier. Metrics can also be scoped with the namespace identifier. In embodiments utilizing Zookeeper, partition offsets within Zookeeper can be scoped with the namespace identifier.



FIG. 3 is a block diagram of one embodiment of an environment utilizing namespaces to provide application context. In various embodiments, tests create application context object 320 with the same namespace in order to refer to the correct isolated application runtime context, 350, running any number of applications, 360. In the example of FIG. 3, deployment scripts (e.g., 310) and/or integration tests (e.g., 340) can be run in the same container environment (e.g., 300) and share the same application context object (e.g., 320).


The techniques and architectures described herein can provide separation of concerns in terms of deployment and integration testing for Delta Lake Spark (and other types of) application in a shared environment (e.g., Databricks). In some embodiments, with the design of a scenario, applications and tests can be organized, and test cases can be developed within a scenario. In some embodiments, utilizing scenario specifications, scenario-based deployment and integration testing can be achieved. In some embodiments, utilizing namespaces and application context, an isolated application runtime context can be built for each integration testing execution in a shared (e.g., Databricks) environment.



FIG. 4 is a flow diagram of one embodiment of a technique to deploy and test an application in an isolated runtime context. The technique of FIG. 4 can be provided in any environment that supports use of containers and the desired supporting services/applications.


A namespace to be utilized is retrieved/received/generated, 400. As discussed above, the namespace is a string or other identifier that can be used to generate the scoped objects/services within the isolated runtime context. In one embodiment, the namespace is a text string.


Scoped properties are generated for one or more resource applications, 410. As illustrated in FIG. 1, various resource applications (e.g., stream processing platform 120, sync/naming platform 130, object storage platform 140, database platform 150, log management platform 160, data analytics platform 170) can be utilized to provide services to an application (e.g., application 110). In one embodiment, the scoped properties are based on the namespace and one or more application properties.


One or more scoped objects corresponding to the resource applications are generated, 420. In various embodiments, the scoped objects are generated for each resource service based on the generated scoped properties. Conceptually, one embodiment of this technique this is illustrated in FIG. 2.


A container to encapsulate the scoped objects and associated data/metadata (e.g., complexities) is generated, 430. The application can be deployed to the generated container, 440. Integration testing can be performed utilizing the namespace scoped values and objects, for example, as illustrated in FIG. 3.



FIG. 5 is a block diagram of one embodiment of a processing resource and a machine readable medium encoded with example instructions to provide a technique to deploy and test an application in an isolated runtime context. Machine readable medium 510 is non-transitory and is alternatively referred to as a non-transitory machine readable medium 510. In some examples, the machine readable medium 510 may be accessed by processor device(s) 500. Processor device(s) 500 and machine readable medium 510 may be included in computing nodes within a larger computing architecture.


Machine readable medium 510 may be encoded with example instructions 520, 530, 540, 550, 560 and 570. Instructions 520, 530, 540, 550, 560 and 570, when executed by the processor device(s) 500, may implement various aspects of the techniques for providing isolated runtime contexts as described herein.


In some embodiments, instructions 520 cause processor device(s) 500 to receive a namespace identifier, for example, through a user interface or other mechanism. In other embodiments, instructions 520 cause processor device(s) 500 to generate the namespace identifier. The namespace identifier can be stored, for example, on data storage device 590 or on another storage or memory device.


In some embodiments, instructions 530 cause processor device(s) 500 to generate one or more scoped properties. As discussed above, the scoped properties can be generated utilizing the namespace identifier. In some embodiments, data and/or metadata associated with the scoped properties can be stored, for example, on data storage device 590 or on another storage or memory device.


In some embodiments, instructions 540 cause processor device(s) 500 to generate one or more scoped objects for dependent services. As discussed above, the scoped objects can be generated utilizing the namespace identifier. In some embodiments, data and/or metadata associated with the scoped objects can be stored, for example, on data storage device 590 or on another storage or memory device.


In some embodiments, instructions 550 cause processor device(s) 500 to generate a container to host an isolated runtime context for an application. As discussed above, the container can be generated utilizing the namespace identifier. In some embodiments, data and/or metadata associated with the container can be stored, for example, on data storage device 590 or on another storage or memory device.


In some embodiments, instructions 560 cause processor device(s) 500 to generate deploy the application to the container. In some embodiments, instructions 570 cause processor device(s) 500 to perform integration testing on the application utilizing the namespace as described above.


Reference in the specification to “one embodiment” or “an embodiment” means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the invention. The appearances of the phrase “in one embodiment” in various places in the specification are not necessarily all referring to the same embodiment.


While the invention has been described in terms of several embodiments, those skilled in the art will recognize that the invention is not limited to the embodiments described, but can be practiced with modification and alteration within the spirit and scope of the appended claims. The description is thus to be regarded as illustrative instead of limiting.

Claims
  • 1. A non-transitory computer-readable medium having stored thereon instructions that, when executed by one or more processors, are configurable to cause the one or more processors to: provide one or more scoped properties utilizing a namespace identifier, wherein the namespace identifier is used to define a scope of at least an isolated application runtime context;provide one or more scoped objects corresponding to one or more dependent services utilizing the one or more scoped properties and the namespace identifier;run at least one integration test on a target application in a container corresponding to the isolated application runtime context, the integration tests referring to the isolated application runtime context utilizing the namespace identifier.
  • 2. The non-transitory computer-readable medium of claim 1 wherein the isolated runtime context comprises a group of artifacts created in the one or more dependent services having the same namespace identifier that are privately accessible by the target application.
  • 3. The non-transitory computer-readable medium of claim 2 wherein the isolated runtime context comprises at least a data structure of key/value pairs, the key of each pair to indicate an artifact type and the value of each pair to indicate a namespace-decorated reference to the artifact in one of the one or more dependent services.
  • 4. The non-transitory computer-readable medium of claim 1 wherein the namespace identifier is provided as either a program argument or an environment variable.
  • 5. The non-transitory computer-readable medium of claim 1 wherein the one or more dependent services comprises at least one data logging platform.
  • 6. The non-transitory computer-readable medium of claim 1 wherein the one or more dependent services comprises at least one data analytics platform.
  • 7. The non-transitory computer-readable medium of claim 1 wherein an application context takes the namespace identifier from a program argument or from an environment variable.
  • 8. A method comprising: providing one or more scoped properties utilizing a namespace identifier, wherein the namespace identifier is used to define a scope of at least an isolated application runtime context;providing one or more scoped objects corresponding to one or more dependent services utilizing the one or more scoped properties and the namespace identifier;running at least one integration test on a target application in a container corresponding to the isolated application runtime context, the integration tests referring to the isolated application runtime context utilizing the namespace identifier.
  • 9. The method of claim 8 wherein the isolated runtime context comprises a group of artifacts created in the one or more dependent services having the same namespace identifier that are privately accessible by the target application.
  • 10. The method of claim 9 wherein the isolated runtime context comprises at least a data structure of key/value pairs, the key of each pair to indicate an artifact type and the value of each pair to indicate a namespace-decorated reference to the artifact in one of the one or more dependent services.
  • 11. The method of claim 8 wherein the namespace identifier is provided as either a program argument or an environment variable.
  • 12. The method of claim 8 wherein the one or more dependent services comprises at least one data logging platform.
  • 13. The method of claim 8 wherein the one or more dependent services comprises at least one data analytics platform.
  • 14. The method of claim 8 wherein an application context takes the namespace identifier from a program argument or from an environment variable.
  • 15. A database system implemented via a server system, the database system configurable to cause: providing one or more scoped properties utilizing a namespace identifier, wherein the namespace identifier is used to define a scope of at least an isolated application runtime context;providing one or more scoped objects corresponding to one or more dependent services utilizing the one or more scoped properties and the namespace identifier;running at least one integration test on a target application in a container corresponding to the isolated application runtime context, the integration tests referring to the isolated application runtime context utilizing the namespace identifier.
  • 16. The database system of claim 15 wherein the isolated runtime context comprises a group of artifacts created in the one or more dependent services having the same namespace identifier that are privately accessible by the target application.
  • 17. The database system of claim 16 wherein the isolated runtime context comprises at least a data structure of key/value pairs, the key of each pair to indicate an artifact type and the value of each pair to indicate a namespace-decorated reference to the artifact in one of the one or more dependent services.
  • 18. The database system of claim 15 wherein the namespace identifier is provided as either a program argument or an environment variable.
  • 19. The database system of claim 15 wherein the one or more dependent services comprises at least one data analytics platform.
  • 20. The database system of claim 15 wherein an application context takes the namespace identifier from a program argument or from an environment variable.
Parent Case Info

This patent application is a continuation of and claims priority to U.S. patent application Ser. No. 17/108,875 by Zhang et al., titled “Techniques and Architectures for Providing an Isolated Runtime Context in a Shared Environment,” filed Dec. 1, 2020. U.S. patent application Ser. No. 17/108,875 is hereby incorporated by reference in its entirety for all purposes.

US Referenced Citations (125)
Number Name Date Kind
5577188 Zhu Nov 1996 A
5608872 Schwartz Mar 1997 A
5649104 Carleton Jul 1997 A
5715450 Ambrose Feb 1998 A
5761419 Schwartz Jun 1998 A
5819038 Carleton Oct 1998 A
5821937 Tonelli Oct 1998 A
5831610 Tonelli Nov 1998 A
5873096 Lim Feb 1999 A
5918159 Fomukong Jun 1999 A
5963953 Cram Oct 1999 A
6092083 Brodersen Jul 2000 A
6169534 Raffel Jan 2001 B1
6178425 Brodersen Jan 2001 B1
6189011 Lim Feb 2001 B1
6216135 Brodersen Apr 2001 B1
6233617 Rothwein May 2001 B1
6266669 Brodersen Jul 2001 B1
6295530 Ritchie Sep 2001 B1
6324568 Diec Nov 2001 B1
6324693 Brodersen Nov 2001 B1
6336137 Lee Jan 2002 B1
D454139 Feldcamp Mar 2002 S
6367077 Brodersen Apr 2002 B1
6393605 Loomans May 2002 B1
6405220 Brodersen Jun 2002 B1
6434550 Warner Aug 2002 B1
6446089 Brodersen Sep 2002 B1
6535909 Rust Mar 2003 B1
6549908 Loomans Apr 2003 B1
6553563 Ambrose Apr 2003 B2
6560461 Fomukong May 2003 B1
6574635 Stauber Jun 2003 B2
6577726 Huang Jun 2003 B1
6601087 Zhu Jul 2003 B1
6604117 Lim et al. Aug 2003 B2
6604128 Diec Aug 2003 B2
6609150 King-Hwa Aug 2003 B2
6621834 Scherpbier Sep 2003 B1
6654032 Zhu Nov 2003 B1
6665648 Brodersen Dec 2003 B2
6665655 Warner Dec 2003 B1
6684438 Brodersen Feb 2004 B2
6711565 Subramaniam Mar 2004 B1
6724399 Katchour Apr 2004 B1
6728702 Subramaniam Apr 2004 B1
6728960 Loomans Apr 2004 B1
6732095 Warshavsky May 2004 B1
6732100 Brodersen May 2004 B1
6732111 Brodersen May 2004 B2
6754681 Brodersen Jun 2004 B2
6763351 Subramaniam Jul 2004 B1
6763501 Zhu Jul 2004 B1
6768904 Kim Jul 2004 B2
6782383 Subramaniam Aug 2004 B2
6804330 Jones Oct 2004 B1
6826565 Ritchie Nov 2004 B2
6826582 Chatterjee Nov 2004 B1
6826745 Coker Nov 2004 B2
6829655 Huang Dec 2004 B1
6842748 Warner Jan 2005 B1
6850895 Brodersen Feb 2005 B2
6850949 Warner Feb 2005 B2
7289976 Kihneman Oct 2007 B2
7340411 Cook Mar 2008 B2
7620655 Larsson Nov 2009 B2
20010044791 Richter Nov 2001 A1
20020022986 Coker Feb 2002 A1
20020029161 Brodersen Mar 2002 A1
20020029376 Ambrose Mar 2002 A1
20020035577 Brodersen Mar 2002 A1
20020042264 Kim Apr 2002 A1
20020042843 Diec Apr 2002 A1
20020072951 Lee Jun 2002 A1
20020082892 Raffel Jun 2002 A1
20020129352 Brodersen Sep 2002 A1
20020140731 Subramaniam Oct 2002 A1
20020143997 Huang Oct 2002 A1
20020152102 Brodersen Oct 2002 A1
20020161734 Stauber Oct 2002 A1
20020162090 Parnell Oct 2002 A1
20020165742 Robins Nov 2002 A1
20030004971 Gong Jan 2003 A1
20030018705 Chen Jan 2003 A1
20030018830 Chen Jan 2003 A1
20030066031 Laane Apr 2003 A1
20030066032 Ramachandran Apr 2003 A1
20030069936 Warner Apr 2003 A1
20030070000 Coker Apr 2003 A1
20030070004 Mukundan Apr 2003 A1
20030070005 Mukundan Apr 2003 A1
20030074418 Coker Apr 2003 A1
20030088545 Subramaniam May 2003 A1
20030120675 Stauber Jun 2003 A1
20030151633 George Aug 2003 A1
20030159136 Huang Aug 2003 A1
20030187921 Diec Oct 2003 A1
20030189600 Gune Oct 2003 A1
20030191743 Brodersen Oct 2003 A1
20030204427 Gune Oct 2003 A1
20030206192 Chen Nov 2003 A1
20030225730 Warner Dec 2003 A1
20040001092 Rothwein Jan 2004 A1
20040010489 Rio Jan 2004 A1
20040015981 Coker Jan 2004 A1
20040027388 Berg Feb 2004 A1
20040128001 Levin Jul 2004 A1
20040186860 Lee Sep 2004 A1
20040193510 Catahan Sep 2004 A1
20040199489 Barnes-Leon Oct 2004 A1
20040199536 Barnes Leon Oct 2004 A1
20040199543 Braud Oct 2004 A1
20040249854 Barnes-Leon Dec 2004 A1
20040260534 Pak Dec 2004 A1
20040260659 Chan Dec 2004 A1
20040268299 Lei Dec 2004 A1
20050050555 Exley Mar 2005 A1
20050091098 Brodersen Apr 2005 A1
20090177744 Marlow Jul 2009 A1
20090327221 Noll Dec 2009 A1
20150261560 Sliwa Sep 2015 A1
20160055188 Goel Feb 2016 A1
20180253377 Liang Sep 2018 A1
20180309583 Bate Oct 2018 A1
20190392136 Ganchev Dec 2019 A1
Non-Patent Literature Citations (1)
Entry
Office Action (Notice of Allowance and Fees Due (PTOL-85)) dated Jun. 2, 2022 for U.S. Appl. No. 17/108,875 (pp. 1-8).
Related Publications (1)
Number Date Country
20220413999 A1 Dec 2022 US
Continuations (1)
Number Date Country
Parent 17108875 Dec 2020 US
Child 17929277 US