Chapter 10. Remote services and the cloud

 

This chapter covers

  • Importing and exporting a remote OSGi service
  • Understanding distribution providers and their properties
  • Selecting a specific service endpoint and negotiating endpoint policies
  • Learning the semantics of dealing with remote entities
  • Understanding cloud computing and how it relates to OSGi

In today’s world, it’s almost guaranteed that your machine is networked and the services you use are provided through the internet. Remote communication is essential, and OSGi supports it by means of the OSGi Remote Service specification, which is the subject of this chapter.

We’ll start by examining how to export a service for remote access and conversely how to import a remote service for local consumption. Next, we’ll investigate how the actual transport is realized through the use of distribution providers, highlighting the fact that OSGi doesn’t implement its own transport but rather allows existing transports to be plugged in. Finally, we’ll look into how to negotiate common policies between the exporter and the importer of the remote services, for instance, to make sure that both sides agree on a common set of requirements, such as encryption.

10.1. Remote invocation

10.2. Distribution providers

10.3. Dealing with the semantics of distributed systems

10.4. Elasticity at the cloud

10.5. Summary