Anatomy of a Service

   The next logical chunk of functionality to attack in hms_sys is the Artisan Gateway Service. This service waits for input from either Artisan or Central Office end users, creating or updating object data as needed, and perhaps synchronizing that data with the web store system's database. Both of the end user applications are expected to communicate with the Artisan Gateway Service on a completely random basis; whenever someone wants to make a change to the data, it'll be ready and waiting to process that request.

Before we can really implement this service, however, we need to work out how any service can or should work, written in Python. To that end, we will have to examine and understand the following:

  • The basic implementation of the structure of a service, including the following:
    • Options for managing the configuration of a service instance
    • How a service can read and respond to requests
  • How and when a service is launched in the following environments:
    • A reasonably modern, POSIX-compliant system (Linux, for example)
    • Windows
  • Whether there are other, better designs that will work in any OS that Python is available on

In order to better understand these facets of the implementation and execution of a service, we'll build a basic service structure from the ground up, which can then be used as a foundation for the final Artisan Gateway Service.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.227.46.229