Configuration and db improvements
  - Source address, port is added to configuration
  - Encoding added to configuration
  - Lock operations for query procedure added to database