CN102609257A - Cloud program design method - Google Patents

Cloud program design method Download PDF

Info

Publication number
CN102609257A
CN102609257A CN2012100232669A CN201210023266A CN102609257A CN 102609257 A CN102609257 A CN 102609257A CN 2012100232669 A CN2012100232669 A CN 2012100232669A CN 201210023266 A CN201210023266 A CN 201210023266A CN 102609257 A CN102609257 A CN 102609257A
Authority
CN
China
Prior art keywords
cloud
function
functions
programming methodology
methodology according
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
Application number
CN2012100232669A
Other languages
Chinese (zh)
Other versions
CN102609257B (en
Inventor
张桂刚
李超
张勇
邢春晓
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tsinghua University
Original Assignee
Tsinghua University
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Tsinghua University filed Critical Tsinghua University
Priority to CN201210023266.9A priority Critical patent/CN102609257B/en
Publication of CN102609257A publication Critical patent/CN102609257A/en
Application granted granted Critical
Publication of CN102609257B publication Critical patent/CN102609257B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Telephonic Communication Services (AREA)
  • Stored Programmes (AREA)

Abstract

The invention relates to a cloud program design method, wherein a user compiles a cloud program on a programming interface, the compiled cloud program is sent to a cloud program compiler to be encoded, corresponding functions in a function library are called in the compiling process, the called functions send data requirement requests to a data base, the function library comprises atom functions, the cloud program calls the functions in sequence, and the call function can be the atom functions or a combined function formed by the atom functions through the combinational algorithm. Compared with the prior art, according to the cloud program design method, most people including non-professional programmers can compile programs under a cloud environment and can acquire various services and resources required under the cloud environment through the programs, so as to better serve for human requirements.

Description

A kind of cloud Programming Methodology
Technical field
The invention belongs to the program design field under the cloud environment, particularly a kind of cloud Programming Methodology.
Background technology
Along with the development of IT technology, digital society is all producing new mass data all the time, and some variations have taken place production model, and more and more enterprises is to drive with mass data with its business, and therefrom benefits.The data volume of plurality of applications has all reached TB rank even PB rank, like: Google at global deployment more than 100 ten thousand station servers be used for handling its huge data volume; The photo that FaceBook uploads every day has all surpassed more than 100,000,000, and every day, the pageview of photo surpassed more than 15,000,000,000, and along with the paces of the nearest entering Chinese market of FaceBook are accelerated, its data volume will be faced with the rising of a straight line more.The uploading pictures quantity that the shared website Flickr of in September, 2010 picture is included has surpassed 5,000,000,000.Twitter is that volumes of searches reached 19,000,000,000 times in every month in the statistical conditions on ground on April 14th, 2010; On July 6th, 2010 the geo-statistic situation be that volumes of searches reached 24,000,000,000 times in every month; Statistical conditions on October 6th, 2010 are that volumes of searches reached 31,000,000,000 times in every month.So far, the volumes of searches of Twitter every day reaches 1,000,000,000 times, average per second 1.2 ten thousand times.By in by the end of December, 2010, every month volumes of searches of Google reaches 88,000,000,000 times, and every month volumes of searches of Yahoo is 9,400,000,000 times, must every month volumes of searches be 4,100,000,000 times.These all data storage are in different data centers, cluster and server, and this is a very complicated isomerous environment.How coding is handled and is analyzed the data that these are stored in the magnanimity cloud environment under, will face a huge difficulty and challenges.
Summary of the invention
In order to overcome the deficiency of above-mentioned prior art; The object of the present invention is to provide a kind of cloud Programming Methodology; Can realize letting the most people that comprise amateur programmer can both be at coding under the cloud environment; And obtain various services and resource under the own needed cloud environment, thereby serve human's demand better through program.
To achieve these goals, the technical scheme of the present invention's employing is:
A kind of cloud Programming Methodology; The user writes the cloud program on DLL, and the cloud program of being write is sent to the cloud compiler compiles, and in compilation process the respective function in call function storehouse; Invoked function sends the demand data request to database
In said function library, comprised atom function f [a], f [b], f [c] ..., f [k], f [m], f [n];
The function of cloud routine call is F [1], F [2] ..., F [Q] is Q function altogether, and according to F [1], F [2] ..., the sequencing of F [Q] calls;
Wherein, F [1], F [2] ..., F [Q] is former subfunction or composite function.
Comprise Map function, Reduce function and User-Defined Functions UDF in the said function library, said cloud compiler can call above-mentioned three kinds of functions.
After said cloud compiler compiles, the result is turned back to DLL.
Said DLL is PC or mobile phone or other any terminal.
Said cloud program is a kind of programming language based on natural language.
Said database is cloud file system or cloud database.
Said cloud file system comprises the existing distributed file system, like the GFS file system of Google and the HDFS file system of Hadoop.
Said cloud database comprises the BigTable database of Google and the Hbase database of Hadoop.
Said composite function is to realize that through combinational algorithm said combinational algorithm is the Web service combinational algorithm of existing BPEL by more than one said former subfunction.
Compared with prior art; The present invention provides a kind of cloud program technic; Can realize letting the most people that comprise amateur programmer can both be at coding under the cloud environment; And obtain various services and resource under the own needed cloud environment, thereby serve human's demand better through program.
Description of drawings
Fig. 1 is a kind of cloud Programming Methodology of the present invention architectural framework block diagram.
Fig. 2 is a cloud compiler workflow exemplary plot according to the invention.
Embodiment
Below in conjunction with accompanying drawing and embodiment the present invention is explained further details.
As shown in Figure 1; Be a kind of cloud Programming Methodology of the present invention architectural framework block diagram; Present embodiment can be can both be at coding under the cloud environment by the most people that comprise amateur programmer under the cloud environment for all; And obtain various services and a kind of cloud Programming Methodology of resource under the own needed cloud environment through program, comprise following 9 steps altogether:
(1) user uses various DLLs.The user here is meant and comprises the peasant interior various amateur programmer that the DLL here is meant ordinary PC, mobile phone and other any terminals.
(2) user writes the cloud program on various DLLs.
(3) various cloud programs being sent to the cloud compiler compiles.The workflow of cloud compiler is seen Fig. 2.
(4) the cloud compiler need send the call function instruction to function library in compilation process, and this appointment is used for various Map functions, Reduce function or User-Defined Functions UDF required in the call function storehouse.
(5) after the cloud compiler finds required various Map functions, Reduce function or User-Defined Functions UDF function according to different application, function is returned to cloud compiler compiler.
(6) required Map function, Reduce function or the User-Defined Functions UDF of various application will send the demand data request to cloud file system or cloud database.
(7) cloud file system or cloud database are submitted to Map function, Reduce function or User-Defined Functions UDF with the various data of storage and are handled according to the demand of various Map functions, Reduce function or User-Defined Functions UDF.
(8) after required various functions of application program and various data had all possessed, the cloud compiler carried out process of compilation, and the result is turned back to DLL.
(9) user can see the result of the application of oneself from DLL.
Fig. 2 has provided the workflow of cloud compiler:
In Map function/Reduce function/UDF User-Defined Functions storehouse, comprised f [a], f [b], f [c] ..., f [k], f [m], the various former subfunctions of f [n] or the like.
The quantity of the function that certain cloud program is required is F [1], F [2] ..., F [Q] is Q function altogether.And according to F [1], F [2] ..., the priority of F [Q] is called.
Some is former subfunction in these functions that call, and is exactly an atom function f [c] like F [2]; Some is by the synthetic complicated function of atom group of functions, is that F [Q] is by f [k] by f [a] complicated function synthetic with two atom group of functions of f [b] like F [1], the complicated function that f [m] is synthetic with three atom group of functions of f [n].
The combination of former subfunction is accomplished by a combinational algorithm, and this combinational algorithm directly adopts the combinational algorithm of the Web service of existing BPEL.
Below use an embodiment of the inventive method for unprofessional user:
Certain vegetable grower has 10000 jin of potatos and 2000 jin of tomatoes ripe; Be badly in need of selling away; Owing to do not know market information; This vegetable grower is very anxious, for the agricultural product pin of oneself is sold best price, finds out best total sales through a kind of cloud Programming Methodology program of can writing of the present invention.(because factors such as logistics, this vegetable grower only considers the market sale in Beijing, thereby ignores the logistics price)
Below two tabulations be market, two Beijing marketing data collection Set [1] and marketing data collection Set [2].
This vegetable grower can open any edit tool loading routine that comprises notepad at any PC on mobile phone or the other-end, and this program called after expansion is called the program program App.cloud. of .cloud
Specific procedure is following:
[1]{
[2] Start//program begins
[3] Loop (i=0, i<Set.Length; I++) // the data set circulation
[4]{
[5] Quantity [j]=10000; // give initial value
[6] Quantity [2]=2000; // give initial value
[7] Map (set [i], in January, 2012, potato); // be equivalent to F [1] function in the function flow.Call the 18th line function
[8] Map (set [i], in January, 2012, tomato); // be equivalent to F [2] function in the function flow.Call the 22nd line function
[9]}
[10] Reduce (in January, 2012, potato); // be equivalent to F [3] function in the function flow.Call the 26th line function
[1]] Reduce (in January, 2012, tomato); // be equivalent to F [4] function in the function flow.Call the 30th line function
[12] C [1]=UDF_1 (Reduce (in January, 2012, potato) .MaxPrice, Quantity [1]); // be equivalent to F [5] function in the function flow.Call the 34th line function
[13] C [2]=UDF_2 (Reduce (in January, 2012, tomato) .MaxPrice, Quantity [2]); // be equivalent to F [6] function in the function flow.Call the 38th line function
[14] C [3]=UDF_3 (C [1], C [2]); // be equivalent to F [7] function in the function flow.Call the 42nd line function
[15] CALL C [3]; // calculate procedure result
[16] END//EOP (end of program)
[17]}
All be corresponding various functions (Map function, the various functions in Reduce function and the User-Defined Functions storehouse thereof) relevant in the function library below with this program.Need not write, directly call following function by user's written program and get final product by the user.
[18] Map (set [i], in January, 2012, potato) // former subfunction
[19]{
[20] // the Map function that calculates framework MapReduce by existing internet finds out all market informations of the potato in January, 2012 among the data set set [i].
[21]}
[22] Map (set [i], in January, 2012, tomato) // former subfunction
[23]{
[24] // the Map function that calculates framework MapReduce by existing internet finds out all market informations of the tomato in January, 2012 among the data set set [i].
[25]}
[26] Reduce (in January, 2012, potato) // former subfunction
[27]{
[28] // the Reduce function that calculates framework MapReduce by existing internet finds out all market informations of the potato in all data centralizations in January, 2012.
[29]}
[30] Reduce (in January, 2012, tomato) // former subfunction
[31]{
[32] // the Reduce function that calculates framework MapReduce by existing internet finds out all market informations of the tomato in all data centralizations in January, 2012.
[33]}
[34] C [1]=UDF_1 (Reduce (in January, 2012, potato) .MaxPrice, Quantity [1]) // function of functions
[35]{
[36] this function of functions existing atom function R educe (in January, 2012 by wherein; Potato) .MaxPrice calculates the potato ceiling price; Quantity Quantity [1] with this ceiling price and potato is a parameter then, calculates the result of function of functions UDF_1, and saves as c [1].
[37]}
[38] C [2]=UDF_2 (Reduce (in January, 2012, tomato) .MaxPrice, Quantity [2]) // function of functions
[39]{
[40] this function of functions existing atom function R educe (in January, 2012 by wherein; Potato) .MaxPrice calculates the tomato ceiling price; Quantity Quantity [1] with this ceiling price and tomato is a parameter then, calculates the result of function of functions UDF_1, and saves as c [2].
[41]}
[42] C [3]=UDF_3 (C [1], C [2]) // former subfunction
[43]{
[44] this SQL UDF_3 is that calculation of parameter goes out c [3] as a result with c [1] with c [2].
}
Wherein former subfunction has following 7:
[1] Map (set [i], in January, 2012, potato) corresponding atom function f [a].
[2] Map (set [i], in January, 2012, tomato); Corresponding atom function f [b].
[3] Reduce (in January, 2012, potato); Corresponding atom function f [c].
[4] Reduce (in January, 2012, tomato); Corresponding atom function f [d].
[5] UDF_3 (C [1], C [2]); Corresponding atom function f [e].
[6] the corresponding atom function f [f] of Reduce (in January, 2012, potato) .MaxPrice.
[7] the corresponding atom function f [g] of Reduce (in January, 2012, tomato) .MaxPrice.
Below for to call corresponding examples of functions according to written program.
The function of Map (set [i], in January, 2012, potato) for using in user's written program.This function directly goes function library to find and its function name, and the function that parameter name and number of parameters thereof are consistent with content of parameter is corresponding one by one to get final product.Following function promptly can be called by the user.
Map (set [i], in January, 2012, potato) // former subfunction
{
// Map the function that calculates framework MapReduce by existing internet is found out all market informations of the potato in January, 2012 among the data set set [i].
}
Wherein combination of function mode, rule and method are: former subfunction is as a parameter of composite function.
An example that below makes up for composite function.
(1) composite function by a former subfunction and parameter be composited // function of functions in the present case is combined as this kind situation
Figure BDA0000133677700000081
UDF_1 (Reduce (in January, 2012; Potato) .MaxPrice; Quantity [1]) is a function of functions F [5]; It is to be combined by atom function f [f] and another one parameter Quantity [1]; Be that F [5] is UDF_1 (f [f], Quantity [1]).
Figure BDA0000133677700000082
UDF_1 (Reduce (in January, 2012; Tomato) .MaxPrice; Quantity [2]) is a function of functions F [6]; It is to be combined by atom function f [g] and another one parameter Quantity [2]; Be that F [6] is UDF_2 (f [g], Quantity [2]).
(2) composite functions by a former subfunction and one or more former subfunction be composited // function of functions combination in the present case do not relate to this kind situation
Figure BDA0000133677700000091
supposes that certain function of functions F [x] is by three former subfunctions (f [a]; F [b]; F [c] forms; F [x]=UDF (f [a], f [b], f [c]) then;
According to above step, improve the process of whole compiling and result output:
Whole compilation process is the process that order is carried out.
◆ Map (set [i], in January, 2012, potato); // find out respectively among two data set Set [1] and the Set [2] in January, 2012 relevant potato all information
◆ Map (set [i], in January, 2012, tomato); // find out respectively among two data set Set [1] and the Set [2] in January, 2012 relevant tomato all information
◆ Reduce (in January, 2012, potato); // two data are concentrated in January, 2012 relevant potato all information be merged into last data set.
◆ Reduce (in January, 2012, tomato); // two data are concentrated in January, 2012 relevant tomato all information be merged into last data set.
◆ UDF_1 (Reduce (in January, 2012, potato) .MaxPrice, Quantity [i]); // the ceiling price of finding out potato in all information that satisfy relevant potato of in January, 2012 is: 3.5 yuan/jin of g company.Obtaining the desire sales volume is 10000 jin.Calculate the highest consumption sum will for: 35000 yuan.
◆ UDF_2 (Reduce (in January, 2012, tomato) .MaxPrice, Quantity [i]); // the ceiling price of finding out potato in all information that satisfy relevant tomato of in January, 2012 is: 3.3 yuan/jin of B company.Obtaining the desire sales volume is 2000 jin.Calculate the highest consumption sum will for: 6600 yuan.
◆ UDF_3 (C [1], C [2]); // calculate two kinds of agricultural product total sale Maximum Amount will for: 41600 yuan.
◆ CALL C [3] gives the vegetable grower with return results 41600.

Claims (10)

1. cloud Programming Methodology; The user writes the cloud program on DLL, and the cloud program of being write is sent to the cloud compiler compiles, and in compilation process the respective function in call function storehouse; Invoked function sends the demand data request to database
It is characterized in that,
In said function library, comprised atom function f [a], f [b], f [c] ..., f [k], f [m], f [n];
The function of cloud routine call is F [1], F [2] ..., F [Q] is Q function altogether, and according to F [1], F [2] ..., the sequencing of F [Q] calls;
Wherein, F [1], F [2] ..., F [Q] is former subfunction or composite function.
2. cloud Programming Methodology according to claim 1 is characterized in that, comprises Map function, Reduce function and User-Defined Functions UDF in the said function library, and said cloud compiler can call above-mentioned three kinds of functions.
3. cloud Programming Methodology according to claim 1 is characterized in that, after said cloud compiler compiles, the result is turned back to DLL.
4. cloud Programming Methodology according to claim 1 is characterized in that, said DLL is PC or mobile phone.
5. cloud Programming Methodology according to claim 1 is characterized in that, said cloud program is a kind of programming language based on natural language.
6. cloud Programming Methodology according to claim 1 is characterized in that, said database is cloud file system or cloud database.
7. cloud Programming Methodology according to claim 6 is characterized in that, said cloud file system comprises the existing distributed file system.
8. cloud Programming Methodology according to claim 6 is characterized in that, said cloud file system comprises the GFS file system of Google and the HDFS file system of Hadoop.
9. cloud Programming Methodology according to claim 6 is characterized in that, said cloud database comprises the BigTable database of Google and the Hbase database of Hadoop.
10. cloud Programming Methodology according to claim 1 is characterized in that, said composite function is to realize that through combinational algorithm said combinational algorithm is the Web service combinational algorithm of existing BPEL by more than one said former subfunction.
CN201210023266.9A 2012-02-02 2012-02-02 Cloud program design method Active CN102609257B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210023266.9A CN102609257B (en) 2012-02-02 2012-02-02 Cloud program design method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210023266.9A CN102609257B (en) 2012-02-02 2012-02-02 Cloud program design method

Publications (2)

Publication Number Publication Date
CN102609257A true CN102609257A (en) 2012-07-25
CN102609257B CN102609257B (en) 2015-02-18

Family

ID=46526656

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210023266.9A Active CN102609257B (en) 2012-02-02 2012-02-02 Cloud program design method

Country Status (1)

Country Link
CN (1) CN102609257B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108108171A (en) * 2018-01-18 2018-06-01 西南大学 A kind of mobile phone remote single chip compilation runtime

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101826009A (en) * 2009-08-25 2010-09-08 张艳红 Internetware for collecting mass Web multi-media information

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101826009A (en) * 2009-08-25 2010-09-08 张艳红 Internetware for collecting mass Web multi-media information

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
SUN MENG等: "Web Services Choreography and Orchestration in Reo and Constraint Automata", 《SAC’07》 *
张桂刚: "一种类自然语言驱动的语义服务搜索方法", 《计算机科学》 *
黄蓓蓓等: "基于RDF4S的一种轻量语义Web服务组合", 《计算机科学》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108108171A (en) * 2018-01-18 2018-06-01 西南大学 A kind of mobile phone remote single chip compilation runtime
CN108108171B (en) * 2018-01-18 2019-02-26 西南大学 A kind of mobile phone remote single chip compilation operating system

Also Published As

Publication number Publication date
CN102609257B (en) 2015-02-18

Similar Documents

Publication Publication Date Title
US20200285788A1 (en) Systems and methods for providing digital twin-enabled applications
US11922564B2 (en) Generative content system that supports location-based services and methods therefor
US9026941B1 (en) Suggesting activities
US9058563B1 (en) Suggesting activities
WO2019143412A1 (en) Configurable server kit
US20130124478A1 (en) Data analytics reporting system and methods
JP2017050012A (en) Index constitution for retrievable data in network
US20200285912A1 (en) Hub-and-spoke classification system and methods
CN104156392A (en) Personalized recommendation method and system for friends and applications
CN105045607A (en) Method for achieving uniform interface of multiple big data calculation frames
CN105593841A (en) Automatically determining a size for a content item for a web page
US20150006135A1 (en) Layout algorithm for entity relation model diagram
US11176191B2 (en) Search result image selection techniques
US9754015B2 (en) Feature rich view of an entity subgraph
CN109993627A (en) Recommended method, the training method of recommended models, device and storage medium
CN105677763A (en) Image quality evaluating system based on Hadoop
CN103064670A (en) Method and system for innovation platform data management based on place net
US20170374001A1 (en) Providing communication ranking scheme based on relationship graph
CN109146551A (en) A kind of advertisement recommended method, server and computer-readable medium
Kimball The evolving role of the enterprise data warehouse in the era of big data analytics
US20190286746A1 (en) Search Engine Quality Evaluation Via Replaying Search Queries
Goundar Cloud computing: Opportunities and issues for developing countries
CN110348669B (en) Intelligent rule generation method, intelligent rule generation device, computer equipment and storage medium
CN102609257B (en) Cloud program design method
US10140518B1 (en) Content information auditing service

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant