[ Home | Documentation | Hardware | Use Cases | Download | License | Screenshots | Mailing List ]

MasterControl Server


The MasterControl server is responsible for providing various forms of data to the factories. Instead of each factory having its own config file, all configuration infomation is stored in a database. At startup (or reload) the factory calls the mastercontol server to get its configuration info.

The MasterControl server also acts as a namingservice for the factories. When one factory needs to know the host and port another factory is listening on, the factory can lookup that information from master control.

Finally MasterControl provides the factories with a form of Persistent Shared Memory (PSM). This allows Factories to share data between each other, and to save it across reloads.

MasterControl uses a MySQL database to store information. It is implemented in C++. Perl, Java and C++ classes have been written to allow other factories to interact with it(see Libraries).

Command Line Options:
The following command line flags are required:

  • -f Config file
  • -P Mysql Password
  • -U Mysql User
  • -H Mysql Host (defaults to 127.0.0.1)
  • -B Mysql database (defaults to "HomeAuto")

    Listen Port: 4000

    Commands:
    EXIT
    QUIT
    Disconnect cleanlly
    AUTH [password] Authenticate w/ a shared secret
    REG [obj_name] [host] [port] Register a new object
    UNREG [obj_name] remove an object from the regestry
    LOOKUP [obj_name] get an object from the regestry
    LIST MODULES List all modules in the registry
    BURY [key] [value] Save a value to the PSM
    DISINTER [key] Get and remove a value to the PSM
    PING Verify the server is still alive
    RELOAD Not implemented - will flush registry and re-read config file
    SHUTDOWN Cleanly stop server
    SETTINGS [type] Fetch all settings info for TYPE

    Notes:
    The type in the settings command is the driver field in the DB. Probably should rename this or move to a better naming scheme.

    Bury/Disenter haven't been implemented yet. I'm thinking the PSM will be a mysql table.


  • Questions or comments should be sent to: Chris Farris chris at room17 dot com
    Copyright 2000-2003, Room17 Enterprises, all rights reserved.