CSE 445 Midterm 1

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

What is distributed computing? (general)

- "any form of computing that involves multiple computers/systems in a computing problem" - Distributed computing involves computation executed on more than one logical or physical processor or computer.

Discuss differences between extend thread class and implement runnable interface.

- By extending Thread, each of your threads has a unique object associated with it, whereas implementing Runnable, many threads can share the same object instance. - A class that implements Runnable is not a thread and just a class.For a Runnable to become a Thread, You need to create an instance of Thread and passing itself in as the target.

Describe the 4 critical aspects of web services.

- Functionality description of the services in standard taxonomy; - Contract of parameter types and return type of the function (service) calls; - Binding information about the transport protocol to be used, usually, SOAP; - Address information for locating the specified service.

Describe SOAP.

- Simple Object Access Protocol - used to transport messages between Web services/apps - message is an XML document - Like any communication protocol, a SOAP message consists of wrapper information and payload; - message is often wrapped in an HTTP (Hypertext Transfer Protocol ) message and sent as an HTTP packet over the internet;

What is WSDL?

- Web Service Description Language - used to describe web services

Define Web Service

- services accessible over the web - a web service is an interface that converts the service call represented in the standard service description language (e.g., WSDL) into the function call represented in the programming language , in which the service software is written

What is XML?

- stands for extensible markup language - a meta language used for defining other languages

What is component based development?

- system is developed in components; to develop the code of the components first, and then to use the components to build the applications

Which of the following statement(s) are CORRECT about web services? Select all that apply

-REST web services expose functionality as URL accessible endpoints called APIs -SOAP web services expose functionality using WSDL file

Which of the following statements are TRUE about SOAP web services? Select all that apply

-SOAP web services can be more secure than REST -SOAP web services can implement stateful transactions

what are the xml documentation basic rules

1 : Name tags are case sensitive 2 : Every opening tag must have a closing tag 3 : Every document must have a root 4: Welformed XML document has an xml tag

List 3 facts about a process

1. An executing instance of a program is called a process. 2. must use inter-process communication to communicate with sibling processes. 3. is controlled by the operating system. 4.processes run in separate memory spaces

What are the two ways to implement threads in Java?

1. Extend Thread class 2. Implement Runnable Interface

List 3 facts about multi-core architecture

1. Inter process/ thread communication happens within the same hardware/ memory unit 2. platform/ language dependent 3. uses memory restricted data structures and messaging for data communication

What are 2 composition methods?

1. Orchestration2. Chroreography

List 7 facts about SOAP

1. XML -based message protocol 2. Uses WSDL for communication between consumer and provider 3. Invokes services by calling RPC method 4. Does not return human readable result 5. Transfer is over HTTP, but also uses other protocols 6. Hard to call from JavaScript 7. Worse performance compared to REST

List 3 facts about a thread

1. a subset of the process. 2. can directly communicate with other threads of its process. 3. can exercise considerable control over threads of the same process. 4.threads within the same process run in a shared memory space

List 7 facts about RESTFUL

1. architectural style protocol 2. uses XML or JSON to send and receive data 3. simply calls services via URL path 4. result is readable which is just plain XML or JSON 5. Transfer is over HTTP only 6. Easy to call from JavaScript 7. Performance is much better compared to SOAP- less CPU intensive

List 3 facts about service oriented architecture

1. service communications happen based on HTTP/ SOAP protocols 2. services can be deployed on different platforms and can be developed using different languages 3. uses XML/ JSON for data representation

Different Ways to Create Threads in C#

Method 1: Thread thread1 = new Thread(MethodNameHere); thread1.Start(); thread1.Join(); Method 2: Thread thread2 = new Thread(new ThreadStart(MethodNameHere)); Method 3 (Lambda Expression): Thread thread3 = new Thread( () => MethodNameHere(para1, para2,...)); thread3.start();

most internet API technologies use...?

REST

Which of the following is true about multi-threading and multi-processing?

Threads share runtime memory space while processes have their own memory space

Class level locking

prevents multiple threads to enter in synchronized block in any of all available instances on runtime. This should always be done to make static data thread safe.

Which method must be defined by a class extending the java Thread class?

public void run()

What is a deadlock?

situation where two or more competing operations are waiting for the other to finish, and thus neither ever does.

Define service.

the interface between the service provider and the consumer.

Define choreography.

there is no central coordinator. Each service involved can communicate with any partners

What is composition?

uses available services to compose a composite service or an application

What is a livelock?

condition that occurs when two or more threads continually change their state in response to the changes of other threads.

Define wait

A thread that is waiting indefinitely for another thread to perform a particular action is in this state

Why is a web service interoperable?

A web service can be invoked by any client application implemented in a different programming language.

what is starvation?

A thread is theoretically able to gain access to the shared resource (lock), but practically unable to gain regular access and is unable to make progress. This is more likely to occur, when the threads are given priorities, and there are too many threads with high priority. The threads with low priority may starve. One of the solutions is to change the priority of threads dynamically. The longer a thread waits, the higher the priority of the thread will become.

How is a service invoked?

A service provides an API so that it can be invoked by an application or another service.

Define application.

A service with a user interface

Define blocked

A thread that is blocked waiting for a monitor lock is in this state.

What is distributed computing? (for this class)

A. Computing that involves more than one computer that are geographically distributed B. Computing that involves one physical computer, but multiple cores . C. Computing that involves one computer not necessarily equipped with multiple-cores.

What are critical operations?

Accesses to shared resources

Which of the following is NOT a part of the WSDL document

Indicate if the return type is XML or JSON

Basic principles of service oriented computing

SOC, includes concepts, principles, and methods that represent computing in three parallel processes: service development, serbice publication, and application composition using services that have been developed.

What computing paradigm will this course focus on?

Service-Oriented Computing

What protocol is normally used for transferring data between Non-REST Web services?

Simple Object Access Protocal

What is multithreading?

The ability to perform parts of a program simultaneously

True about blocked and waiting state of a thread

Thread can get out of the waiting state after recieving notify() message

Define proxy

a "virtual" object that creates a channel to a (remote) service. A client accesses the operations of the services by calling the methods of the proxy. The "virtual" means here: It does not contain the implementation (code) of the methods.

Define orchestration.

a central process, which can be a service itself, takes control over the involved services and coordinates the execution of different operations. The involved services communicate with the central process only.

Define endpoint

an operation interface exposed to outside, so that a client can access the operation. It must include address, binding, name, parameters, return type, etc.

Web Service Description Language (WSDL) is used for

defining the interface of services

Complete the thread life cycle diagram

do re mi

What is the unique feature of service-oriented computing paradigm that does not exist in other computing paradigms?

loosely coupled, platform and language -independent

Object level locking

mechanism when you want to synchronize a non-static method or non-static code block such that only one thread will be able to execute the code block on given instance of the class.

Synchronized instance methods acquire lock on?

object level


Set pelajaran terkait

Chapter 22 - Prioritization, Delegation, and Assignment

View Set

Prep U's - Therapeutic Communication - Chapter 8

View Set