O GoConqr está de visual novo! Conte para nós o que você achou.

Flashcards

Web Applications

Zenos Pavlakou Inglês 115 flashcards

Web Applications

Flashcards do conjunto (115)

  1. 1What is a transaction?A set of operations on objects (or resources) to be performed as an 'invisible unit' by the servers managing those objects
  2. 2What do transactions ensure?They ensure that all objects (or resources) remain in a consistent state when (a) accessed by multiple clients, and (b) in the presence of server crashes.
  3. 3In the context of transactions, what is a recoverable object?One which can be recovered after a server has crashed.
  4. 4What does ACID stand for?Atomicity
    Consistency
    Isolation
    Durability
  5. 5In the context of transactions, what does Atomicity imply?A transaction either completes successfully (the effects of all operations are recorded in the objects) or has no effect at all (aborted or failure).
  6. 6In the context of transactions, what does Consistency imply?A transaction takes the system from one consistent state to another consistent state.
  7. 7In the context of transactions, what does Isolation imply?Each transaction must be performed without interference from other transactions.
  8. 8In the context of transactions, what does Durability imply?After a transaction has completed successfully, all its effects are saved in permanent storage.
  9. 9In the context of transactions, how can atomicity and durability be supported (or maintained)?A) Objects must be recoverable.
    B) By the time a server acknowledges the completion of a client's transaction, all changes must be recorded in permanent storage.
  10. 10In the context of transactions, how can isolation be supported (or maintained)?Operations in transactions must be sufficient synchronized.
  11. 11In the context of transactions, what is the easiest but most sub-optimal approach to enforcing isolation?To perform transactions serially - one at a time, in some arbitrary order. This approach, however, is not optimal for concurrency.
  12. 12In the context of transactions, what is the 'lost update' problem?In the context of transactions, what is the 'lost update' problem?
  13. 13In the context of transactions, what is the 'inconsistent retrievals' problem?In the context of transactions, what is the 'inconsistent retrievals' problem?
  14. 14In the context of transactions, what does serial equivalence solve?'lost update' and 'inconsistent retrievals' problems.
  15. 15In the context of transactions, which combinations of concurrent operations can cause 'inconsistent retrievals' and 'lost update' problems?In the context of transactions, which combinations of concurrent operations can cause 'inconsistent retrievals' and 'lost update' problems?
  16. 16In the context of transactions, how can serial equivalence be enforced?All pairs of conflicting operations of two transactions must be executed in the same order at all of the objects they both access
  17. 17In the context of transactions, what is a dirty read?When a transaction reads the uncommitted state of other transactions.
  18. 18In the context of transactions and premature writes, how can we recover from aborts?In the context of transactions and premature writes, how can we recover from aborts?
  19. 19In the context of transactions, what is a safe way to write?Write operations MUST be delayed until earlier transactions that updated the same objects have either committed or aborted.
  20. 20In the context of transactions, what is meant by strict execution of transactions?If the service delays read and write operations on an object until all transactions that previously wrote that object have committed or aborted.
  21. 21In the context of transactions, how can strict execution of transactions be enforced?With locks
  22. 22In the context of transactions, what are the phases in 'two-phase locking'?first phase: growing phase
    second phase: shrinking phase
  23. 23In the context of transactions, what is an exclusive lock?When a transaction gains exclusive access to objects.
  24. 24This is a transaction which uses exclusive locks.This is a transaction which uses exclusive locks.
  25. 25What is the difference between "two-phase locking" and "strict two-phase locking"strict two-phase locking solves the recoverability from abort issues by ensuring that transactions commit or abort prior to releasing locks
  26. 26In the context of transactions, what is a deadlock and how can they be overcome.A deadlock occurs when two-phase locking is implemented in a system and two or more transactions are waiting for the locks which the others currently have leading to a lock. To overcome it, one transaction will have to be cancelled to break the link.
  27. 27In the context of transactions, what are deadlock timeouts?In the context of transactions, what are deadlock timeouts?
  28. 28What is optimistic concurrency control?When locks are not used which may be useful for applications from which read and write operations do not occur on the same object simultaneously very often. This reduces the overhead of locking and unlocking locks. In the case that two or more transactions are working on the same objects, the transaction will simply abort and try again.
  29. 29This is a slide on optimistic concurrencyThis is a slide on optimistic concurrency
  30. 30In the context of transactions, is a dirty read possible with optimistic concurrency?No, because with optimistic concurrency transactions use tentative objects (i.e., objects in memory).
  31. 31What does CDI stand for?Context Independence Injection
  32. 32What is the CDI scope "@RequestScoped" used for?A user's interaction with a web application in a single HTTP request.
  33. 33What is the CDI scope "@SessionScoped" used for?A user's interaction with a web application across multiple HTTP requests.
  34. 34What is the CDI scope "@ApplicationScoped" used for?Shared state across all users interactions with a web application
  35. 35What is the CDI scope "@Dependent" used for?An object exists to serve exactly one client (bean) and has exactly the same lifecycle as that client (bean)
  36. 36In the context of CDI, what does "@Retention" indicate?How long annotations with the annotated type are to be retained.
  37. 37What is a CDI qualifier used for?A means of uniquely identifying one of multiple implementations of a bean type to be injected.
  38. 38What illusion does RPC provide?It gives the illusion that a user is calling a method locally with the same exact interface and the same exact signatures, but in reality, they are invoking some functionality on some server remotely.
  39. 39What is RMI?Same as RPC but stands for Remote Method Invocation.
  40. 40What type of system is the Google Protocol Buffer?RPC
  41. 41What type of system is Apache Thrift?RPC
  42. 42What type of system is Apache Avro?RPC
  43. 43Name 3 RPC systemsGoogle Protocol Buffers,
    Apache Thrift,
    Apache Avro
  44. 44In the context of RPC, how does a stub function work?In the context of RPC, how does a stub function work?
  45. 45In the context of RPC, what is a dispatcher?A dispatcher receives client requests and identifies an appropriate function to call.
  46. 46In the context of server-side RPC, what is a skeleton?A skeleton unmarshals parameters and calls the local function, then marshals the response and sends it back to the dispatcher
  47. 47What is an IDL?Interface Definition Language
  48. 48What is an IDL used for?The creation of remote procedure interfaces for RPC systems
  49. 49In Java RMI what is a proxy object?A proxy object in Java RMI is the equivalent to a stub method in RPC
  50. 50In Java RMI, what is the remote reference module?The reference module is used both by the
    client and server to know which object is being used.
  51. 51What does Java RMI allow?Allows you to get a reference to an object on a remote host and use it as if it were in the local JVM
  52. 52In Java RMI, how are objects and classes transported from client to server and vice versa?With object serialization, dynamic class loading and a security manager.
  53. 53In the context of RMI and RPC, what is a binder?A binder
  54. 54What is the main difference between RPC and RMI?The difference is that RMI works on an object level.
  55. 55Why does Java RMI not need an IDL?Because the Java RMI works on the JVM which supports the Java language. Additionally, because, the JVM is platform independent.
  56. 56Does RPC use pass-by-value or pass-by-reference?pass-by-value
  57. 57Does RMI use pass-by-value or pass-by-reference?It can use both
  58. 58Describe the RMI process of invoking a method on a remote JVM.Describe the RMI process of invoking a method on a remote JVM.
  59. 59What does the RMIRegistry facilitate?Bootstrapping. In other words, it allows classes to get an initial remote reference.
  60. 60How does the RMI registry keep track of all objects? Also, how are objects queried?Remote objects register themselves with a textual name. Objects can then resolve the name remotely by querying the registry.
  61. 61When querying the RMIRegistry, what will be returned?A remote reference, and hidden from the programmer, the location of the relevant server class files (i.e, the interface and stub files).
  62. 62Java RMI at a glance (this is a slide)Java RMI at a glance (this is a slide)
  63. 63In the context of web services, what does SOAP stand for?Simple Object Access Protocol
  64. 64What does WSDL stand for?Web Services Definition Language
  65. 65What is the difference between web services and RPC?1) Has a different communication protocol.
    2) Different IDL
  66. 66Which transfer protocol do web services use?HTTP
  67. 67In what format are SOAP messages represented?XML
  68. 68Why does WSDL not use IDL?Because WSDL is an IDL (XML)
  69. 69What does a specific web service have?A web service has a URI
  70. 70What kind of scheme does SOAP define?A scheme for using XML to represent the contents of request and reply messages and for communicating documents.
  71. 71How are request messages formatted and represented using SOAP?XML
  72. 72How are responses to request messages formatted and represented with SOAP services?XML
  73. 73With SOAP, other than request and response messages, what else can be communicated?documents
  74. 74In terms of XML, what are the things which SOAP specifies?1) How XML is to be used to represent the contents of individual messages.
    2) Rules as to how recipients of messages should process the XML elements.
  75. 75In what construct is a SOAP message carried over the network? Also, what does this construct contain?In what construct is a SOAP message carried over the network? Also, what does this construct contain?
  76. 76What is the most common HTTP method which SOAP uses?POST
  77. 77In regard to WSDL, what are bindings?Bindings are used for specifying the concrete details of how to interface with a particular web service at a specified resource's URI endpoint with a particular communication protocol (i.e., TCP, HTTP, SMTP, etc)
  78. 78In regard to J2EE, what is the @WebMethod annotation used for?Used for exporting methods into a WSDL interface.
  79. 79In J2EE, how is a web service defined?With the @WebService annotation on the top of the class, and all methods to be exported in the WSDL interface must have the @WebMethod(name = "func_name") annotation.
  80. 80diagram of WSDL bindingsdiagram of WSDL bindings
  81. 81What does REST stand for?REpresentational State Transfer
  82. 82What does CRUD stand for?Create, Read, Update and Delete
  83. 83How do REST services use HTTP?By mapping CRUD actions to HTTP methods
  84. 84What is the main drawback of WSDL web services?There are complexities in terms of XML which results in performance penalties.
  85. 85What is the fundamental difference between SOAP and RESTful services?With SOAP is its own protocol which uses WSDL and uses HTTP as a transfer protocol, however, RESTful services use the methods of the HTTP protocol.
  86. 86In HTTP, what does the POST method do?Passes a resource to be created under a new URI
  87. 87In HTTP, what does the GET method do?Passes a representation of the resource in the request format
  88. 88In HTTP, what does the PUT method do?Creates or updates the state of the resource
  89. 89In HTTP, what does the DELETE method do?Removes the given resource
  90. 90In HTTP, what is the difference between the PUT and the POST request?PUT creates or updates the state of a resource, whereas POST can only be used to pass a resource under a new URI
  91. 91In HTTP, what does the POST method do which PUT does not?The POST method will create a new resource with an automatically generated ID under a specified URI.
  92. 92In HTTP, what do the GET, PUT and DELETE methods have in common?They are all idempotent
  93. 93Why is GET idempotent?Because no matter how many times one requests a resource, the state of the database should not change as a result
  94. 94Why is PUT idempotent?Because with PUT one could either create a new resource just once or update an existing one many times, each time leaving the state of the database the same no matter how many times the method is invoked.
  95. 95Why is POST not idempotent?Because the POST method will ALWAYS create a new resource every time the method is invoked.
  96. 96When should caching be used with REST services?Caching should be used on resources which do not change often
  97. 97In REST, what are POJOs?POJO stands for "plain old java objects" and are the root resource classes which are annotated with the @Path annotation
  98. 98When implementing a RESTful service in Java, how can one use the standard HTTP methods?With the @GET, @PUT, @POST and @DELETE annotations.
  99. 99In REST, what is the difference between @PathParam and @QueryParam?In REST, what is the difference between @PathParam and @QueryParam?
  100. 100In REST, what is the @Consumes annotation used for?It is used for PUT and POST methods and the annotation must have the MIME type specified.
  101. 101Why is the tracking of time important in distributed systems?Because some distributed algorithms depend on having a correct ordering of events.
  102. 102What is a clock skew?The difference between the readings of any two clocks.
  103. 103What is a clock drift?The difference in readings between the clock and a perfect reference clock per unit of time.
  104. 104In a distributed system, what is meant by external synchronisation?When all clocks in the system are synchronising with some external clock, like an atomic one.
  105. 105What is the main property which needs to be satisfied when a distributed system's clocks synchronise with an external clock?The property which must be satisfied is that there is an upper bound threshold on the difference (or skew) between the system's clocks and the external clock.
  106. 106In a distributed system, what is meant by internal synchronisation?It means that the clocks within a system are synchronised with one another.
  107. 107What is a clock's crash failure?When it stops ticking, any other failure is an arbitrary failure
  108. 108What is a synchronous distributed system?A system in which the bounds are known for the drift rate of clocks, the maximum message transmission delay, and the time required to execute each step of a process. In an asynchronous system, none of the above hold.
  109. 109When one process sends the time T on its local clock to another in a message, what can and can't be estimated in regard to the transmission time?Tmin can be estimated, but Tmax cannot. In synchronised systems, there is an upper bound for Tmax though.
  110. 110How do we compute the uncertainty in message transmission time?Tmax - Tmin
  111. 111How can we set the maximum clock skew in a synchronous distributed system?t + (Tmin + Tmax)/2
  112. 112In regard to time, what is the difference between synchronous and asynchronous distributed systems?Asynchronous systems do not have upper bounds on transmission delays
  113. 113What is Cristian's method for external synchronisation?A probabilistic algorithm which uses the RTT between client and server given that the RTT is sufficiently short. This is the formula: t + RTT / 2. For this, the path must be symmetric.
  114. 114What is the Berkley algorithm?What is the Berkley algorithm?
  115. 115What is a logical clock?One which does not require synchronisation with a physical clock.

Informações

Descrição
FlashCards sobre Web Applications, criado por Zenos Pavlakou em 17-05-2019.
Criado por
Zenos Pavlakou
Visualizações
1
Avaliação

Fale Conosco

Sobre o que é sua mensagem?

O que você acha do novo visual?

Você gostou?