2.3.1 Service Proxy Layer
The service proxy layer is responsible for service
access control. In A2SF, tenants are only allowed to
access their own service instances. As shown in
Figure 3, the service proxy layer is the single
entrance of the migrated SaaS application, and all
clients or end users’ service requests are sent to it,
instead of their original local servers.
When the service proxy layer starts up, it loads
all the tenants' proxy rules. After receiving a client
request, the service proxy layer first acquires the
token of the request and identifies the request’s
source by invoking the tenant identification service.
Once the request is identified, the service proxy
layer handles the request based on the tenant's proxy
rules and forwards the request to the proper service
instance. If the request cannot be identified, the
service proxy layer will deny the service request.
As the original client-server application will be
migrated to the cloud as a whole package without
modification, the original communication protocols
as well as the business logic processes between
clients and server do not need to be changed in the
migrated SaaS application as well as the client-side
application.
2.3.2 Tenant Manager
The tenant manager provides the following services:
tenant information management, tenant
identification service, and tenant status service.
Through the tenant manager interface, on one
hand, tenant administrators can manage tenants’
information, customize tenants’ subscribed services,
and review tenants’ usage reports. On the other hand,
the service provider, namely the vendor of the
migrated SaaS application, can manage the tenants’
subscriptions, set the customization rules for the
tenants, and setup the configuration of A2SF
runtime.
The tenant identification service is responsible to
verify the tenant’s token, identify the tenant, and
return the tenant information including the tenant
rules.
The tenant status service is used to obtain the
tenants' current statuses. The tenant manager keeps
all the tenants’ statuses and updates them regularly,
based on the tenants’ service requests. In A2SF, the
tenant status information includes the tenant service
instance status, tenant connection number, tenant
live time, and so on. Based on these statuses, the
tenant manager sends the service instance
management request to the service instance manager,
such as service instance generation request and
service instance recycling request.
2.3.3 Service Instance Manager
The service instance manager is the module to
manage the running service instances in the cloud,
including service instance generation and recycling.
With this module, A2SF implements the allocation
and recycling of the cloud resources.
The service instance is a server side application,
which is composed of a running virtual machine
instance and the customized application image
deployed on the instance. In A2SF, each online or
live tenant who has clients or end-users to access the
migrated SaaS application is assigned a customized
service instance. Whether or not to generate a
service instance is controlled by the tenant manager.
As discussed in the previous section, the tenant
manager keeps the tenants’ statuses and updates
them regularly. When a tenant status matches its rule
of generating or recycling the service instance, the
tenant manager will invoke the services provided by
the service instance manager, to generate or
terminate the service instance for the tenant.
A. Service Instance Generation Steps
When the service instance receives a service
instance generation request for a returning tenant,
firstly, the service instance manager obtains an
available virtual machine from the cloud. Secondly,
the service instance manager deploys the original
application on the virtual machine. Thirdly, the
service instance manager customizes the original
application by loading the tenant’s private data to
the virtual machine from the data centre and initiates
the application. Finally, the service instance
manager sends the result and service instance
information to the tenant manager to update the
tenant’s statuses.
B. Service Instance Recycling Steps
When the service instance manager receives a
service instance recycling request for an off-line
tenant, firstly, the service instance manager stops the
application. Secondly, the service instance manager
collects the tenant’s local private data on the virtual
machine instance and saves it to the data centre.
Finally, the service instance manager clears the
tenant’s local private data, terminates the virtual
machine instance, and sends the result to the tenant
manager to updates the tenant’s status.
ICSOFT-EA2014-9thInternationalConferenceonSoftwareEngineeringandApplications
104