Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Implementation method and system for sharing and using Spark cluster by multiple users in Python-Web environment

A multi-user, cluster technology, applied in the application technology implementation field of Spark cluster

Active Publication Date: 2019-11-19
COMP NETWORK INFORMATION CENT CHINESE ACADEMY OF SCI
View PDF6 Cites 5 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] The present invention proposes a technical architecture aimed at explaining how to use Spark's native "inter-application scheduling" feature and Python's implementation of asynchronous, coroutine, multi-process, etc. to solve the problem of multiple Web users sharing Spark clusters in a Python development environment question

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Implementation method and system for sharing and using Spark cluster by multiple users in Python-Web environment
  • Implementation method and system for sharing and using Spark cluster by multiple users in Python-Web environment

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0051] In order to make the above objects, features and advantages of the present invention more comprehensible, the present invention will be further described in detail below through specific embodiments and accompanying drawings.

[0052] The specific embodiment of the present invention is as figure 1 As shown, it includes user, UI (web site pages and corresponding functions, implemented by Django web framework), web server (Web Server) and Spark cluster (Spark Cluster). The WebSocket protocol is used for communication between the client and the Web server. figure 1 ZMQ is ZeroMQ, which is a multi-threaded network library based on message queues, which is used to realize asynchronous network communication.

[0053] The following describes the implementation involved in the present invention in detail by taking processing a task calculation request from a user as an example.

[0054] After the initial startup of the system, the asynchronous task queue (Task Queue) is empty...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention relates to an implementation method and system for sharing and using a Spark cluster by multiple users in a Python-Web environment. Multiple processes are introduced to support multipleSpark contexts, and the limited number of Spark contexts can be used for serving and supporting task calculation requests of multiple users. Coroutines instead of threads are used for guarding sub-processes, and the coroutines are autonomously scheduled. A task calculation result or state can be returned asynchronously so as to respond to a request of a user in real time, and the requirement of Web real-time interactive use is met. The characteristic of scheduling among Spark tasks is utilized. For some tasks with long time consumption, whether the tasks are terminated or not is given to the user, and the Web user can terminate the running Spark tasks. The problem that multiple Web users share the Spark cluster in the Python development environment can be solved.

Description

technical field [0001] The invention belongs to the technical field of software design and application, and relates to an application technology implementation method, in particular to an application technology implementation method and system for multi-user interactive use of Spark clusters through the Web in a Python development environment. Background technique [0002] Apache Spark, as the most popular open source big data computing framework, is widely used in data processing and analysis applications. There are generally two ways to use it: one is to submit the user logic code packaged into a jar package through the spark-submit script; the other is to interactively process data with Spark through the spark-shell. Although these two methods are flexible enough, they are not applicable in some practical applications, such as when web users want to interact with the Spark cluster through web requests. This situation will face the problem of multiple web users sharing th...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/54G06F16/25G06F16/28
CPCG06F9/546G06F16/25G06F16/284G06F2209/548
Inventor 易秀娟孟珍王学志周园春
Owner COMP NETWORK INFORMATION CENT CHINESE ACADEMY OF SCI
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products