Skip to content

Commit dabcd71

Browse files
authored
Merge pull request #25 from lresende/enterprise_gateway
Jupyter Enterprise gateway
2 parents c803857 + 53b2644 commit dabcd71

4 files changed

+142
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
# Jupyter Enterprise Gateway Incorporation Proposal
2+
3+
## Problem
4+
5+
Founded in academia, the Jupyter projects provide a rich and highly popular set of applications for
6+
interacting with and iterating on large and complex applications. It has been truly ground-breaking.
7+
However, when we first attempted to build a Notebook service that could enable a large number of data
8+
scientists to run frequent and large workloads against a large Apache Spark cluster, we identified
9+
several requirements that were not currently available in the Jupyter open source ecosystem. We tried
10+
to use the Jupyter Kernel Gateway project, but we quickly realized that the JKG server became the
11+
bottleneck because the co-located Spark driver application for these kinds of workloads (in this case,
12+
the kernel process running on behalf of notebook cells) were extremely resource intensive. In organizations
13+
with multiple data scientists, you can quickly saturate the compute resources of the Kernel Gateway server.
14+
15+
Jupyter Enterprise Gateway enables Jupyter Notebook to launch and manage remote kernels in a distributed cluster,
16+
including Apache Spark managed by YARN, IBM Spectrum Conductor or Kubernetes. New platforms can be added via an
17+
extensibility layer that would handle specific capabilities of the underlying cluster manager.
18+
19+
## Proposed Enhancement
20+
21+
The incubating [Jupyter Enterprise Gateway project](https://github.com/jupyter-incubator/enterprise_gateway) has
22+
matured to the point where it addresses the issues noted above, and others. It should be considered for incorporation
23+
into the main Jupyter organization as an official Subproject.
24+
25+
## Detailed Explanation
26+
27+
Please see below detailed project information.
28+
29+
### Current and Potential Use Cases
30+
31+
* Provision and manage kernels in a remote cluster.
32+
* Support kernels to be launched as a given user enabling multi-tenancy.
33+
34+
### Current Features
35+
36+
Jupyter Enterprise Gateway is a web server that provides headless access to Jupyter kernels within
37+
an enterprise. Built directly upon Jupyter Kernel Gateway, Jupyter Enterprise Gateway leverages all
38+
of the Kernel Gateway functionality in addition to the following:
39+
40+
* Adds support for remote kernels hosted throughout the enterprise where kernels can be launched in
41+
the following ways:
42+
* Local to the Enterprise Gateway server (today's Kernel Gateway behavior)
43+
* On specific nodes of the cluster utilizing a round-robin algorithm
44+
* On nodes identified by an associated resource manager
45+
* Provides support Apache Spark managed by YARN, IBM Spectrum Conductor or Kubernetes out of the box.
46+
Others can be configured via Enterprise Gateway's extensible framework.
47+
* Secure communication from the client, through the Enterprise Gateway server, to the kernels
48+
* Multi-tenant capabilities
49+
* Ability to associate profiles consisting of configuration settings to a kernel for a given user
50+
* Persistent kernel sessions
51+
52+
Below are some more details on the supported cluster platforms and specific capabilities:
53+
54+
#### Distributed Kernels in Apache Spark
55+
56+
Jupyter Enterprise Gateway enables Jupyter Notebook to launch and manage remote kernels in a distributed cluster. It
57+
leverages different resource managers to enable distributed kernels in Apache Spark clusters. One example shown below
58+
describes kernels being launched in YARN cluster mode across all nodes of a cluster.
59+
60+
61+
![Jupyter Enterprise Gateway leverages Apache Spark resource managers to distribute kernels](jupyter_enterprise_gateway.gif)
62+
63+
Note that, Jupyter Enterprise Gateway also provides some other value added capabilities such as : enhanced security and multiuser support with user impersonation.
64+
65+
![Jupyter Enterprise Gateway provides Enhanced Security and Multiuser support with user Impersonation](jupyter_enterprise_gateway_on_yarn.png)
66+
67+
#### Distributed Kernels in Kubernetes
68+
69+
Jupyter Enterprise Gateway support for Kubernetes enables decoupling the Jupyter Notebook Server and its kernels into multiple pods. This enables running Notebook server pods with minimally necessary resources based on the workload being processed.
70+
71+
![Jupyter Enterprise Gateway enable remote kernels on Kubernetes cluster](jupyter_enterprise_gateway_on_kubernetes.png)
72+
73+
74+
## Criteria for Incorporation
75+
76+
### Have an active developer community that offers a sustainable model for future development.
77+
78+
The enterprise gateway reuses and extends classes from the Jupyter `kernel_gateway` and `notebook` Python package. By virtue of this implementation, it is largely sustained by development of the `jupyter/notebook` project. Minimal maintenance is required to ensure the enterprise gateway codebase continues to interoperate with future releases of the `notebook` package.
79+
80+
### Have an active user community.
81+
82+
Enterprise gateway is a fundamental component in multiple IBM Cloud offerings, and has also been adopted in a few large companies that are providing Analytical and/or AI platform for it's internal/external customers.
83+
84+
Other then that, below are some stats that have been collected from the Jupyter Enterprise Gateway GitHub repository from October 14th 2017 - current:
85+
86+
- 7 releases
87+
- 10 contributors
88+
- 5 different organizations (based on current employment)
89+
- 205 commits (16,551 additions, 9,616 removals)
90+
- 60 Stars
91+
- 26 Forks
92+
- 10K+ pulls of primary docker image
93+
94+
### Use solid software engineering with documentation and tests hosted with appropriate technologies.
95+
96+
The Enterprise Gateway has a suite of unit and integration tests that are run automatically on Travis on every PR and any commits to master.
97+
98+
The Jupyter Enterprise Gateway community provides multiple resources that both users and contributors can use:
99+
100+
- Source Code available at GitHub: https://github.com/jupyter-incubator/enterprise_gateway
101+
- Documentation available at ReadTheDocs: http://jupyter-enterprise-gateway.readthedocs.io/en/latest/
102+
- Automated builds available at Travis.CI: https://travis-ci.org/jupyter-incubator/enterprise_gateway
103+
- Releases available at PyPi.org: https://pypi.org/project/jupyter_enterprise_gateway/
104+
- Releases available at Conda Forge: https://github.com/conda-forge/jupyter_enterprise_gateway-feedstock
105+
- Related Docker Images available at Elyra organization at DockerHub: https://hub.docker.com/u/elyra/dashboard/
106+
107+
108+
### Demonstrate continued growth and development.
109+
110+
Since entering incubation, the Jupyter Enterprise Gateway have added several new code contributors, performed 7 releases, and added support for two new resource managers - including support for Kubernetes. The community has also seen a recent increase on issues/questions submitted to the project, which implies more users are interested in, and deploying, Enterprise Gateway.
111+
112+
In addition, we believe that by building upon the existing Jupyter stack, a majority of the necessary changes on Enterprise Gateway will be in the area of adding/maintaining support for resource managers (i.e., process proxy implementations). As a result Enterprise Gateway should continue to maintain compatibility/interoperability with new versions of Notebook components with little or no effort.
113+
114+
### Integrate well with other official subprojects.
115+
116+
The Enterprise Gateway is a `jupyter/jupyter_core#Application` that uses programmatic APIs from `jupyter/notebook`, `jupyter/jupyter_client` and `jupyter/kernel_gateway` to enable communication with Jupyter kernels like `ipython/ipykernel`. By definition, it integrates with other official Subprojects.
117+
118+
We are also looking for investigating deep integration with `JupyterHub` to decouple the kernel instances into specific pods in a kubernetes environment.
119+
120+
### Be developed according to the Jupyter governance and contribution model.
121+
122+
The Enterprise Gateway is in the Jupyter Incubator, and under the Jupyter governance and contribution model since its inception.
123+
124+
### Have a well-defined scope.
125+
126+
Jupyter Enterprise Gateway enables Jupyter Notebook to launch remote kernels in a distributed cluster, including Apache Spark managed by YARN, IBM Spectrum Conductor or Kubernetes.
127+
128+
### Be packaged using appropriate technologies such as pip, conda, npm, bower, docker, etc.
129+
130+
The Enterprise Gateway is packaged using setup tools, released in both source and wheel format on PyPI, and installable using `pip`. It is also available in conda forge.
131+
132+
## Pros and Cons
133+
134+
Pro: Extend Jupyter Stack to support distributed/remote Kernels
135+
136+
Pro: The runtime can easily be extensible to support new cluster resource managers
137+
138+
Con: Still requires couple extensions (e.g. NB2KG) to connect to the gateway
139+
140+
## Interested Contributors
141+
142+
@parente, @rgbkrk
Loading
Loading
Loading

0 commit comments

Comments
 (0)