Green Computing using Perl and Python

§ Sri Venkateswara University Sri Venkateswara University

Send Message

To: Author

Green Computing using Perl and Python

Article Fingerprint

ReserarchID

CSTSDEB7DYR

Green Computing using Perl and Python Banner

Key Research Insights

Synthesized scholarly intelligence & interactive research assistant
  • English
  • Afrikaans
  • Albanian
  • Amharic
  • Arabic
  • Armenian
  • Azerbaijani
  • Basque
  • Belarusian
  • Bengali
  • Bosnian
  • Bulgarian
  • Catalan
  • Cebuano
  • Chichewa
  • Chinese (Simplified)
  • Chinese (Traditional)
  • Corsican
  • Croatian
  • Czech
  • Danish
  • Dutch
  • Esperanto
  • Estonian
  • Filipino
  • Finnish
  • French
  • Frisian
  • Galician
  • Georgian
  • German
  • Greek
  • Gujarati
  • Haitian Creole
  • Hausa
  • Hawaiian
  • Hebrew
  • Hindi
  • Hmong
  • Hungarian
  • Icelandic
  • Igbo
  • Indonesian
  • Irish
  • Italian
  • Japanese
  • Javanese
  • Kannada
  • Kazakh
  • Khmer
  • Korean
  • Kurdish (Kurmanji)
  • Kyrgyz
  • Lao
  • Latin
  • Latvian
  • Lithuanian
  • Luxembourgish
  • Macedonian
  • Malagasy
  • Malay
  • Malayalam
  • Maltese
  • Maori
  • Marathi
  • Mongolian
  • Myanmar (Burmese)
  • Nepali
  • Norwegian
  • Pashto
  • Persian
  • Polish
  • Portuguese
  • Punjabi
  • Romanian
  • Russian
  • Samoan
  • Scots Gaelic
  • Serbian
  • Sesotho
  • Shona
  • Sindhi
  • Sinhala
  • Slovak
  • Slovenian
  • Somali
  • Spanish
  • Sundanese
  • Swahili
  • Swedish
  • Tajik
  • Tamil
  • Telugu
  • Thai
  • Turkish
  • Ukrainian
  • Urdu
  • Uzbek
  • Vietnamese
  • Welsh
  • Xhosa
  • Yiddish
  • Yoruba
  • Zulu
Reading Preferences
Font Size
Line Spacing
Background
This converted HTML version may contain rendering inconsistencies. Please refer to the PDF for the authoritative version, or click here to provide feedback.

Abstract

Green computing or clean computing is necessary for Software Engineering. Perl and Python are important programming languages for green computing. Perl is regular language. Perl is mainly used for server-side programming because it is a regular language. It a portable and green programming language. It can be used as object-oriented (OO) or non objectoriented (Non-O-O) programming language. Python is preprocessor. It is a portable language for software engineering. It has an import feature for Green computing.

I. INTRODUCTION

Green Computing or Clean Computing is necessary to solve different types of problem solving. The Programming is needed portability of the code, and less computation time. There are different techniques methods are used for Green Computing like recursion, parallelism, regular expression and Object-Oriented. The recursion is the calling function itself. Parallelism is computing the number of tasks at a time. The regular expression is simplifies the code. The Object-Oriented shall make program is independent.

II. GREEN COMPUTING METHODS

Programming is the main component for problem solution. The Green programming has some of the main features.

Portability

Less computing time

Reusability

Green Computing may be studied with three methods.

a) Analysis

There are different analysis methods. Mainly

Time Complexity

Space Complexity

b) Design

There are different design method are used f

Divide and Conquer

Object-Oriented

Component based

c) Coding

The Programming Languages fall under different paradigms Imperative, Functional, Logical, and Object-Oriented and regular it is difficult to learn all the programming languages. It easy to learn programming languages through common principles like iteration, recursion, control statements, functions, functions, subroutines, Object-oriented, etc. All principles and techniques are not available in single programming language. The selected Programming Languages are discussed for Green Computing.

Programming languages are designed based on Automata. Context-Free Language is the recursively representation of Finite Automata.

For green computing, Recursive Algorithms and Parallel algorithms are used until recently. Programming languages are playing a main role.

We consider Perl and Python for green computing. Perl is the regular language. It simplifies the programming, and it reduces time.

Python is the preprocessing language. It simplifies the with the import feature, it simplifies the code.

III. COMPONENT TECHNOLOGY

All components are specialized, independently deployed and extendable for the product. These components are also extendable to multi versions of the components. The following are the characteristics of the components.

The components have an externally accessible view.

The semantics such as business rules and regulations are defined for the composition of components.

As Component software extended, the components are extendable.

The component must be relocate and replace a component for other implantations or the development of new software system.

The components are substituted and integrated into the other systems. Sometimes this may be referred to as off-the-components.

The composition of components is tightly coupled.

The semantic primitives must be extendable to new components.

a) Component Architecture

The component architecture mainly consists of Conceptual component model, infrastructure technologies and structured domain concepts. The component architecture comes across distributed, heterogeneous and new infrastructure technology. Integrated component architecture is the mechanism universal Component architecture and it may be referred to integration of independent component architectures. The integration may be loosely coupled and tightly coupled. It Describes implementation of Component infrastructure, Structured conceptual model, and domain concepts.

Figure 1: Component Architecture
Figure 1: Component Architecture

b) Component Implementation

The component model is translated into component ware with tools for automation and management of components and interfaces. Interface to understand system architecture with the interface specifications that implement, reuse, and replacement of components. They are two types of component ware implementation for products.

Self-development in which component were developed from the scratch.

Off-the-self components in which component ware developed by black box assembling commercially available components and such components are documented, assembled and adapted.

The following are the characteristics of the implementation enterprise model. The components of the product may represent entire system

Generosity: It is stepwise instantiation and controlled processes that use specifications, inheritance, relationships and contexts.

Domain system: It represents a particular area of components.

Domain object: It represents a particular process of components.

Semantic primitives: These are rules and kinds of relationships between objects.

These domain concepts are used to compose domain components of individual components.

IV. Perl Programming

The Programming Languages fall under different paradigms Imperative, Functional, Logical, and Object-Oriented and Regular. It is difficult to learn all the programming languages. It made easy to learn programming languages through common principles like iteration, recursion, control statements, functions, functions, subroutines, Object-oriented etc. All principles and techniques are not available in single programming language. The selected Programming Languages are discussed for Green Computing.

The Programming Languages are constructed mainly based on Finite Automata (FA) and Regular (RE).

The Formal Languages (FL) are simple representation of Context-Free Language) CFL). The CFL is recursion of FA.

F A M = { Σ , Q , δ , q 0 , F }

For instance,

Σ = a z ( a z , 0 9 ) Id = { num , num1 , x 1 , }

Regular

M = { Σ , Q , δ , q 0 , F } Σ = { a - z , 0 - 9 } I d = a - z (A - Z , 0  - 9 ) I d = { x , x 1 1 , n u m , s u m , s u m 1 2 , }

The CFL is defined as

M =< V , T , P , S > E = E + E / E E / E E / i d

The grammar

G = { A a w } ,  where  a V , w { N U Σ }

The regular grammar

G = { A a w } , where a V , w { N Σ }

For instance,

Σ = a z ( a z , 0 9 ) Id = num, id = x1 etc. Σ = { a z , 0 9 } Id = a - z(A - Z, 0 - 9) Id = {x,x11,num,sum,sum12,…}

Perl is a powerful language that supports both non-object-oriented and object-oriented programming paradigms. Perl is portable, similar to other algorithmic languages. Perl is often referred to as a green programming language due to its efficiency and resource management capabilities. The main concepts of Perl include recursion, regular expressions, parallelism, and client/server architecture.

a) Recursion

Recursion is calling function by itself.

For instance,

$ n =<  STDIN  > ;

f a c t o r i a l = f a c t ( n ) ;

print "$factorial\n";

{"code_caption":[],"code_content":[{"type":"text","content":"sub fact(num)\n{\n if (num==1) {return 1;}\n else { return n u m f a c t ( num-1);}\n}\n\nb) Regular\n A regular expression is simply Expression of Finite Automate.\nConsider the Regular Expression\nId =digit*. digit )+\nRegular expressions are used to match the pattern, sting with\n "m//", "s//", "qr//" and "split" operators\nSimple string matching\n\nc) Object-Oriented\n Object are often called instance data or object attributes, and data fields\n sub teacher ::pvsr{\n print "teaching dbms\n";\n }\n sub student::syam{\n print "tacking dbms course \n";\n }\n sub room::cse201{\n print "course in a201\n"\n }\n teacher::pvsr;\n student::dbms;\n room:cse201;\n "Class->method" invokes subroutine "method" in package "Class "\n teacher->dbms;\n student>dbms;\n room->cse201;\n\nd) Threads\nThe "use thread" creates one or more threads.\n use threads;\n thr1 = threads->new(\\&ascending);\nthr2 = threads->new(\&decending);\nmy num;\n sub ascending {\n mynum;\n while ( 10)\n print "num++\\n\";\n}\nsub descending {\n mynum=10;\n while ( 0)\n print "num--\\n\";\n}\nthr1-> join;\nthr2-> join;"}],"code_language":"perl"} {"code_caption":[],"code_content":[{"type":"text","content":"e) Client/Server\n Perl is powerful server side programming language because Perl is the only regular language.\nFor instance,\nComputing two numbers at sever side\nClient programming\nuse IO::Socket;\nsocket = new IO::Socket::INET (\n PeerAddr => '127.0.0.1',\n PeerPort => 7008,\n Proto => 'tcp',\n)\nor die "Couldn't connect to Server\n";\n s o c k e t > r e c v ( recv_data,1024);\nif(recv_data){\n print \"Sum is isrecv_data\n";\n}\nelse\n{print("Server is not working:Restart the sever and recompile the server program\n");\nsleep(20);\nServer Programming\nuse IO::Socket;\n| = 1;\nsocket = new IO::Socket::INET (\n LocalHost => '127.0.0.1',\n LocalPort => '7008',\n Proto => 'tcp',\n Listen => 5,\n Reuse => 1\n);\ndie "Coudn't open socket" unless socket;\nprint \"\\nTCPServer Waiting for client on port 7008\";\nwhile(1)\n{\n my(new_sock,buf);\nbuf=sum2();\n client_socket = \"\";\nclient_socket = socket->accept();\npeer_address = client_socket->peerhost();\npeer_port = client_socket->peerport();\n print \"\\n I got a connection from (\npeer_address, peer_port)\";\nclient_socket->send(buf);\n closeclient_socket;\nsub sum2() {return 7+3;}\n}\n\nV. PYTHON PROGRAMMING\nPython is preprocessor and portable language.\nPython has import and other features for green computing\na) Recursion\n# factorial\ndef fact(n):\n if (n <= 1):"}],"code_language":"perl"} {"code_caption":[],"code_content":[{"type":"text","content":"return 1\nelse:\n return n * fact(n - 1)\n\nb) Regular\n#Searching text\ntxt = "Artificial Intelligence"\nx = re.search("Intel", txt)\nprint(x)\n\nc) Object-Oriented\nprint(fact(6))class table():\n # init method or constructor\n def init(self, customer, barrar, table):\n self.cust = customer\n self.barrar = barrar\n self.table = table\n def show(self):\n print("customer is", self.cust)\n print("supplier is", self.barrar)\n print("table is", self.table)\n # both objects have different self which\n # contain their attributes\n table1 = table("rama", "barrar1", "table1")\n table2 = table("krishna", "barrar2", "table2")\n table1.show()\n table2.show()\n\nThe output is given by\ncustomer is rama\nsupplier is barrar1\ntable is table1\ncustomer is krishna\nsupplier is barrar2\ntable is table2\n\nPython is portable using import.\nimport string\ntext = input('text: ')\nsymptoms = text.split()\nsymptom1='appreciating-colors'\nsymptom2='glaring'\nsymptom3='recognizing-faces'\nIf symptom1 in symptoms and symptom2 in symptoms and symptom3 in symptoms:\nPrint ('patient diagnosed cateract')\n\nd) Client and Server\nPython is portable to use for client/server programming.\nFor instace,\n\nServer\n\nimport socket\nserv = socket. Socket (socket.AF_INET, socket.SOCK_STREAM)\nserv.bind(('0.0.0.0', 8080))\nserv.listen(5)\nwhile True:"}],"code_language":"python"}

conn, addr = serv.accept() from_client = " while True: data = conn.recv(4096) if not data: break from_client += data print from_client conn.send("I am SERVER
") conn.close() print 'client disconnected'

Client import socket client=socket.socket(socket.AF_INET, socket.SOCK_STREAM) client.connect(('0.0.0.0', 8080)) client.send("I am CLIENT
") from_server = client.recv(4096) client.close() print from_server

VI. GREEN COMPUTING TECHNOLOGY

Green computing technology mainly has two criterions fundamentals of computer science and nature of computer science.

a) Fundamentals of Computer Science Fundamentals of computer science may be defined as Finite Automata Regular Expression Context-Free Grammar Turing Machine Digital Logic b) Nature of Computer Science Some of Nature of computer science may be defined as Nature of Clouds Nature of Neurons Nature of Genetics Nature of Trees and Forest Nature of Proteins

VII. CONCLUSION

Perl and Python are best for Green Computing or clean computing. Perl is regular language and powerful at sever side programming. Python is preprocessor and it is portable with import feature. We try to discuss m Perl and Python programming languages for green computing.

References

12 Cites in Article
  1. Wojtek Kozaczynski,Grady Booch (1998). Component-Based Software Engineering.
  2. Alan Brown,Kurt Wallnau (1998). The current state of CBSE.
  3. Elaine Weyuker (1998). Testing component-based software: a cautionary tale.
  4. Tom Digre (1998). Business Object Component Architecture.
  5. Pamela Zave,Michael Jackson (1988). A component-based approach to telecommunication software.
  6. Israel Ben-Shaul,James Gish,William Robinson (1998). An Integrated Network Component Architecture.
  7. Clemens Szyperski (1998). Session details: Component-based software development.
  8. B Cox (1987). Object Oriented Programming: An Evolutionary Approach.
  9. J Rumbaugh,M Blaha,W Premerlani,F Eddy,W Lorensen (1991). Object-Oriented Modeling and Design.
  10. G Booch (1994). Object-Oriented Analysis and Design with Applications.
  11. G Booch,J Roumbaugh,I Jacobson (1999). The Unified Modeling Language-Use Guide.
  12. P Venkata Subba,Reddy (2010). Object-Oriented Software Design.

Funding

No external funding was declared for this work.

Conflict of Interest

The authors declare no conflict of interest.

Ethical Approval

No ethics committee approval was required for this article type.

Data Availability

Not applicable for this article.

How to Cite This Article

Poli Venkata Subba Reddy, Srivibha Vadravu. 2021. "Green Computing using Perl and Python". Global Journal of Computer Science and Technology - C: Software & Data Engineering GJCST-C Volume 21 (GJCST Volume 21 Issue C1).

Download Citation

Green computing using Perl and Python in research.
Journal Specifications

Crossref Journal DOI 10.17406/gjcst

Print ISSN 0975-4350

e-ISSN 0975-4172

Keywords
Classification
GJCST-C Classification K.7
Version of record

v1.2

Issue date
August 18, 2021

Language
English
Experiance in AR

Explore published articles in an immersive Augmented Reality environment. Our platform converts research papers into interactive 3D books, allowing readers to view and interact with content using AR and VR compatible devices.

Read in 3D

Your published article is automatically converted into a realistic 3D book. Flip through pages and read research papers in a more engaging and interactive format.

Article Matrices
Total Views: 1.1K
Total Downloads: 50
All Trends

Request Access

Please fill out the form below to request access to this research paper. Your request will be reviewed by the editorial or author team.
X

This is the heading

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

High-quality academic research articles on global topics and journals.

Green Computing using Perl and Python

Poli Reddy
Poli Reddy <p>Sri Venkateswara University</p>
Srivibha Vadravu
Srivibha Vadravu