assignment 1 1644 Cloud Computing, Cheat Sheet of Network security

assignment 1 1644 Cloud Computing

Typology: Cheat Sheet

2021/2022

Uploaded on 10/14/2022

nguyen-xuan-nam-fgw-hcm
nguyen-xuan-nam-fgw-hcm 🇻🇳

4.7

(7)

5 documents

1 / 23

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1 | P a g e
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17

Partial preview of the text

Download assignment 1 1644 Cloud Computing and more Cheat Sheet Network security in PDF only on Docsity!

Unit 16: Cloud computing

ASSIGNMENT 1

Learner’s name: Nguyễn Xuân Nam

ID: GCS

Class: GCS0905A

Subject code: 1649

Assessor name: Lê Ngọc Thành

Assignment due: 12/10/

Assignment submitted: 12/10/

Assignment Brief 1 (RQF)

Higher National Certificate/Diploma in Computing

Student Name/ID Number: Nguyễn Xuân Nam/ GCS Unit Number and Title: Unit 19: Data Structures and Algorithms Academic Year: 2021 – 2022 Unit Assessor: Lê Ngọc Thành Assignment Title: Data Structures and Algorithms Issue Date: April 1st, 2021 Submission Date: Internal Verifier Name: Date: Submission Format: Format: The submission is in the form of 1 document You must use font Calibri size 12, set number of the pages and use multiple line spacing at 1.3. Margins must be: left: 1.25 cm; right: 1 cm; top: 1 cm and bottom: 1 cm. The reference follows Harvard referencing system. Submission Students are compulsory to submit the assignment in due date and in a way requested by the Tutors. The form of submission will be a soft copy posted on http://cms.greenwich.edu.vn/ Note: The Assignment must be your own work, and not copied by or from another student or from books etc. If you use ideas, quotes or data (such as diagrams) from books, journals or other sources, you must reference your sources, using the Harvard style. Make sure that you know how to reference properly, and that understand the guidelines on plagiarism. If you do not, you definitely get failed Unit Learning Outcomes: LO1 Demonstrate an understanding of the fundamentals of Cloud Computing and its architectures.

LO2 Evaluate the deployment models, service models and technological drivers of Cloud Computing and validate their use. Assignment Brief and Guidance: Scenario ATN is a Vietnamese company which is selling toys to teenagers in many provinces all over Vietnam. The company has the revenue over 700.000 dollars/year. Currently each shop has its own database to store transactions for that shop only. Each shop has to send the sale data to the board director monthly and the board director need lots of time to summarize the data collected from all the shops. Besides the board can’t see the stock information update in real time. The table of contents in your technical report should be as follows:

  1. As a developer, explain to the board director the fundamentals of cloud computing and how it is popular nowadays(about 2500 words)
  2. Proposed solution (higher level solution description – around 700 words) and explain the appropriateness of the solution for the scenario (about 400 words with images and diagrams)which might include: a. Architectural design (architectural diagram and description). b. Detailed design: i. Deployment model (discussion on why that model was chosen). ii. Service model (discussion on why that model was chosen). iii. Programming language/ webserver/database server chosen.
  3. Summary. General guidelines:  Instead of providing definitions but also provide with examples.  Provide more own arguments instead of definitions  Making use of academic references instead of web tutorials  For a cloud architecture look at the bottom of this document

TABLE OF CONTENTS

  • Introduction.............................................................................................................................................
    1. Data Structure.....................................................................................................................................
  • 1.1 Abstract data type.............................................................................................................................
  • 1.1.1 Definition........................................................................................................................................
  • 1.1.2 Example........................................................................................................................................
  • 1.2 ADT usages......................................................................................................................................
  • 1.2.1 Application of Stack in memory.................................................................................................
  • 1.2.2 Application of an ADT................................................................................................................
  • I. Identify the problem..........................................................................................................................
  • II. Solution.............................................................................................................................................
  • III. Example:.........................................................................................................................................

these data type can operate and be performed on without any idea of how they are implemented. So a user only needs to know what a data type can do, but not how it will be implemented. Think of ADT as a black box which hides the inner structure and design of the data type. Now we’ll define three ADTs namely List ADT, Stack ADT, Queue ADT.

List ADT

 The data is generally stored in key sequence in a list which has a head structure consisting of count, pointers and address of compare function needed to compare the data in the list.  The data node contains the pointer to a data structure and a self-referential pointer which points to the next node in the list.  The List ADT Functions is given below:  get() – Return an element from the list at any given position.  insert() – Insert an element at any position of the list.  remove() – Remove the first occurrence of any element from a non-empty list.  removeAt() – Remove the element at a specified location from a non-empty list.  replace() – Replace an element at any position by another element.  size() – Return the number of elements in the list.  isEmpty() – Return true if the list is empty, otherwise return false.  isFull() – Return true if the list is full, otherwise return false.

Stack ADT

 In Stack ADT Implementation instead of data being stored in each node, the pointer to data is stored.  The program allocates memory for the data and address is passed to the stack ADT.  The head node and the data nodes are encapsulated in the ADT. The calling function can only see the pointer to the stack.  The stack head structure also contains a pointer to top and count of number of entries currently in stack.  push() – Insert an element at one end of the stack called top.  pop() – Remove and return the element at the top of the stack, if it is not empty.  peek() – Return the element at the top of the stack without removing it, if the stack is not empty.  size() – Return the number of elements in the stack.  isEmpty() – Return true if the stack is empty, otherwise return false.  isFull() – Return true if the stack is full, otherwise return false.

Queue ADT

 The queue abstract data type (ADT) follows the basic design of the stack abstract data type.  Each node contains a void pointer to the data and the link pointer to the next element in the queue. The program’s responsibility is to allocate memory for storing the data.  enqueue() – Insert an element at the end of the queue.  dequeue() – Remove and return the first element of the queue, if the queue is not empty.  peek() – Return the element of the queue without removing it, if the queue is not empty.  size() – Return the number of elements in the queue.  isEmpty() – Return true if the queue is empty, otherwise return false.  isFull() – Return true if the queue is full, otherwise return false.

Features of ADT:

 Abstraction: The user does not need to know the implementation of the data structure.  Better Conceptualization: ADT gives us a better conceptualization of the real world.  Robust: The program is robust and has the ability to catch errors.

Implementaion of an Abstract Data Type (ADT):

  • The user is completely ignorant of this.
  • Different languages may implement the same ADT in various ways.
  • Some programming languages have built-in ADTs and/or capabilities for creating ADTs (user- define types). Modular design, which is critical in software development, is supported by ADTs.

System design with ADTs:

It is a temporary storage memory. When the computing task is complete, the memory of the variable will be automatically erased. The stack section mostly contains methods, local variable, and reference variables. The stack's memory is accessed in LIFO (Last In First Out) order. To be more specific, stack storage. When a method is invoked, a stack memory block containing local primitives and object references is created. When the method is completed, the block is deactivated and passed on to the next method. Stack memory is quite little in comparison to Heap memory.

Operations:

The stack is responsible for the following core operations:

  • Push: Adds an item to the stack. When the stack is totally full, an overflow situation arises.
  • Pop: Removes an item from the stack. Items are displayed in the reverse order in which they were pushed. If the stack is empty, it is termed a Flow condition.
  • Peek or Top: Returns the top member of the stack.
  • isEmpty: Returns true if the stack is empty; otherwise, returns false.
  • size: returns the size of stack

Key Features:

Some other features of stack memory include:  It grows and shrinks as new methods are called and returned, respectively.  Variables inside the stack exist only as long as the method that created them is running.  It's automatically allocated and deallocated when the method finishes execution.  If this memory is full, Java throws java.lang.StackOverFlowError.  Access to this memory is fast when compared to heap memory.  This memory is threadsafe, as each thread operates in its own stack.

Explain and example how memory stack is organized:

When a function is called, a block at the top of the stack is assigned to local variables and specific accounting data. The block will not be used when the function returns, but it can be used in a later function call. Stacks are always arranged in LIFO (last in, first out) order, with the most recently reserved block being released first. This simplifies stack tracing as removing a block from the stack is as simple as changing a reference.

Example code:

Program to calculate the sum of a sequence of numbers: If n is equal to the length of the array minus one, the above method will call itself and the value of n will be decremented by one on each call until the base case yields the first unit. Then the return values of each function call are advanced until the original function is reached and the result is provided. The base case ensures that the function does not make any subsequent recursive calls. If no base case is supplied, the function will continue to call itself until memory is exhausted, resulting in a stack overflow. As a result, a recursive function must have a base case in order to function. -The following image illustrates a memory stack implemented function call: +When a function call occurs, prior variables are saved in the stack. +Returning value from base case to caller function:

Initialize Array List in java:

Java collection framework was non-generic before JDK 1.5. Since 1.5, it is generic. Java new generic collection allows you to have only one type of object in a collection. Now it is type-safe, so typecasting is not required at runtime. Let's see the old non-generic example of creating a Java collection. Let's see the new generic example of creating java collection. In a generic collection, we specify the type in angular braces. Now ArrayList is forced to have the only specified type of object in it. If you try to add another type of object, it gives a compile- time error.

Methods of class ArrayList:

size(), isEmpty(), get(), set() – all return O add() — this operation is performed in amortized constant time. Adding n elements takes O(n) time; all other operations, such as add(int index, E element), contains(), indexOf(), remove(int index), and so on, take linear time.

III. Example:

Arraylist example code:

Result:

CONCLUSION: After completing this report, I have learned a lot of previously unknown information and gained a lot of new and important information. With my new understanding of data structures and algorithms, I will be better able to prepare my classes in the future. Most importantly, I would like to thank my teachers for their enthusiastic guidance and help.