Unit 10 - Building blocks and enterprise architectures Flashcards
Whats is CBD?
Component-based development
What are the two types of interface for components?
A provided interface, which specifies what the component makes available to other components.
A required interface, which specifies what the component expects from other components.
Think of another concept that uses principles similar to software components?
A component closely resembles the concept of
an object in an object-oriented language.
Think of some possible advantages and disadvantages of building software by plugging together off-the-shelf components.
Advantages
. Reusing a standard component should be cheaper than developing software from scratch.
. Using off-the-shelf components will allow applications to be developed more quickly.
. Standard components will have been used in many other projects, so their behaviour will be well understood and any bugs are likely to be known.
. Components are pluggable, so it is often possible to replace one component with another providing it has the same interface and behaves in the same way.
Disadvantages
. Using standard components may restrict what we can do since we have to work with the capability of the components.
. Some additional software is likely to be needed as ‘plumbing’.
. If the interfaces of components are incompatible, adapters will have to be written.
. Creating a system by plugging together off-the-shelf components may not be as simple as it sounds.
An application built using components is likely to be structured using which architectural style?
A call-return architectural style
How do components interact
Through their interfaces (required and provided)
Suppose a component is implemented as an instance of a Java class. What corresponds to:
. the provided interface of the component
. the required interface of the component?
The provided interface consists of all the public methods in the class.
The required interface consists of all the methods from other classes that the component’s methods make use of.
In the context of software components, describe a concept that is similar to substitutability.
Components are replaceable: a component can be replaced by another that does the same job.
What is SOA?
Service-oriented architecture
What do components help achieve?
Components keep coupling low by hiding their implementation and communicating only via their interface.
Give a definition of a service
A service is an abstract description of some unit of business functionality, usually described in terms that are meaningful from both a business and a technical perspective.
In order to be used, a service must be implemented by?
A service provider, and accessed over a network by a
client, also known as a service consumer or a service requester.
You can think of a service as being what a component provides, but the component itself has been abstracted away, leaving the service as something the requester simply accesses by connecting to an end-point, without any knowledge of where or how the service is provided. This is a more loosely coupled model than component-based development.
What are the similarities and differences between components and services?
Similarities
. have well defined interfaces which specify how other software can interact with them
. aim to be loosely coupled, by not exposing details of their implementation, thus allowing it to be changed without disturbing other parts of the system
. can be composed – services can be combined to build up more complex functionality
. aim to be reusable, so that the same service can be used as part of many different applications.
Differences
. Communication with components tends to depend on proprietary technologies, which restricts interoperability. Services use standard communication protocols, which allows them to interoperate in a
platform- and language-independent way.
. Services are discoverable. Clients can access a repository to find details of available services.
. Components run on computers controlled by the organisation using them and if many organisations use a component it executes in multiple locations. A service in contrast resides on a provider server, typically
owned by a different organisation, and executes at a single end-point that all clients communicate with.
. Services should be autonomous and as far as possible independent of other services. So, for example, they do not have a ‘requires’ interface. This is so that they can be more reusable and also more insulated from
changes in their operating environment. Not all dependencies can be avoided of course, for example a service may rely on a particular database.
In addition, services have two properties which may sometimes apply to components as well:
Statelessness. A service or component is stateless if it responds to each request as a ‘one-off’, without retaining any memory of previous requests.
This reduces complexity, because each request can be dealt with in the same way. It also allows increased demand to be dealt with by simply deploying more copies of the service or component, since it will not matter which copy is allocated to which request.
Location transparency. Clients can use a service without needing to know its physical location – that is, what computer it is actually running on. It is also possible for components to be location transparent and be invoked using a logical name rather than a physical address. The advantage of location transparency is that the service or component can be moved to a different
computer without clients being affected.
What are the elements involved in the find, bind and invoke cycle?
. The consumer.
. The service. Each service has a service description that specifies how the client can interact with it. The service description will define the signature of the service and may describe other aspects of the contract, although this is not always the case and some information about the service typically needs to be provided outside the service description.
. The provider, which is the platform on which the service is implemented. It accepts and executes requests from clients.
. The registry (or locator) which allows clients to find services.
What are the three kinds of service?
. utility services, which provide some generic functionality useful in a wide range of applications
. business services, which implement a specific business function
. coordination services, which coordinate workflows composed of a number of individual services.
What is service orchestration?
When we build an application within an SOA we must choose suitable services and then compose them into a workflow, so that the services are invoked in the proper sequence. This overall coordination is referred to as service orchestration, and successful orchestration is obviously essential to whether or not the application will work.
What are the stages for developing an application by composing services within an SOA?
. Design a workflow and specify what services will be needed.
. Use the registry to discover candidate services.
. From the candidates select a suitable set of services.
. Orchestrate the chosen services according to the workflow. This may be done using a special-purpose orchestration language, or we may write an
orchestrating program in a standard language such as Java.
. Test the application and correct any faults found.