Feature #1744

Feature #44: Implement basic introspection support

Implement introspection event receiver and client API

Added by J. Moringen over 7 years ago. Updated almost 7 years ago.

Status:ResolvedStart date:03/24/2014
Priority:NormalDue date:03/24/2014
Assignee:J. Moringen% Done:

100%

Category:Common Lisp
Target version:rsb-0.11

Related issues

Blocks Robotics Service Bus - Feature #1751: Create introspection tool Resolved 03/24/2014 03/24/2014

Associated revisions

Revision dd56e082
Added by J. Moringen almost 7 years ago

Initial introspection infrastructure in src/introspection/*.lisp

refs #1740, refs #1744

  • src/introspection/conditions.lisp: new file; contains conditions used
    by the introspection module
  • src/introspection/protocol.lisp: new file; contains protocol functions
    of the introspection module
  • src/introspection/variables.lisp: new file; contains functions for
    constructing introspection-related scopes and parameters holding
    default scopes
  • src/introspection/package.lisp: new file; package definition for
    introspection module
  • test/introspection/package.lisp: new file; package definition for unit
    tests of introspection module
  • rsb-introspection.asd: new file; system description for
    rsb-introspection system
  • lift-introspection.config: new file; lift configuration for testing
    the rsb-introspection system
  • CMakeLists.txt (test): new function; configure execution of unit tests
    of one (sub-)system; use to test cl-rsb and rsb-introspection as two
    separate systems

Revision ac827101
Added by J. Moringen almost 7 years ago

Added introspection model in src/introspection/model.lisp

refs #1740, refs #1744, refs #1830

Introspection model classes
  • for platform information: participants, processes and hosts.
  • for messages: hello and bye
  • src/introspection/types.lisp: new file; contains types used in the
    introspection module
  • src/introspection/protocol.lisp (info-most-recent-activity): new
    generic function; return timestamp of most recent activity on the
    instances
    (info-clock-offset): new generic function; return estimated clock
    offset
    (info-latency): new generic function; return estimated communication
    latency
    (participant-info-kind): new generic function; return kind of
    participant
    (participant-info-id): new generic function; return id of participant
    (participant-info-parent-id): new generic function; return id of the
    parent of the participant
    (participant-info-scope): new generic function; return scope of
    participant
    (participant-info-type): new generic function; return type of
    participant
    (participant-info-transports): new generic function; return list of
    transports of the participant
    (process-info-process-id): new generic function; return id of the
    process
    (process-info-program-name): new generic function; return program name
    of the process
    (process-info-commandline-arguments): new generic function; return
    commandline options of the process
    (process-info-start-time): new generic function; return start time of
    the process
    (process-info-state): new generic function; return state of the
    process
    (process-info-transports): new generic function; return list of
    transports via which the process has been contacted
    (host-info-id): new generic function; return id of host
    (host-info-hostname): new generic function; return hostname of host
    (host-info-state): new generic function; return state of host
    (hello-participant): new generic function; return participant-info of
    the message
    (hello-process): new generic function; return process-info of the
    message
    (hello-host): new generic function; return host-info of the message
    (bye-id): new generic function; return participant id of the message
  • src/introspection/model.lisp: new file; contains model classes for
    local and remote objects used by both local and remote introspection
  • src/introspection/package.lisp (package rsb.introspection): added
    exported symbols info-most-recent-activity, info-clock-offset,
    info-latency, participant-info, remote-participant-info,
    participant-info-kind, participant-info-id,
    participant-info-parent-id, participant-info-scope,
    participant-info-type, participant-info-transports, process-info,
    remote-process-info, process-info-process-id, process-info-state,
    process-info-program-name, process-info-transports,
    process-info-commandline-arguments, process-info-start-time,
    current-process-info, host-info, remote-host-info, host-info-id,
    host-info-state, host-info-hostname, current-host-info, hello,
    hello-participant, hello-process, hello-host, bye, and bye-id
  • test/introspection/model.lisp: new file; contains unit tests for the
    introspection model
  • rsb-introspection.asd (system rsb-introspection): added
    defsystem-dependency on cl-protobuf; added module "protocol" with
    files files rsb/protocol/introspection/{Hello,Bye}.proto; added files
    src/introspection/types.lisp and src/introspection/model.lisp
    (system rsb-introspection-test): added file
    test/introspection/model.lisp

Revision 8c1455bd
Added by J. Moringen almost 7 years ago

Added converters for introspection messages in src/introspection/conversion.lisp

refs #1740, refs #1744

  • src/introspection/conversion.lisp: new file; contains converters
    between rsb.protocol.introspection.{Hello,Bye} protocol buffer
    messages and rsb.introspection:{hello,bye} classes
  • rsb-introspection.asd (system rsb-introspection): added file
    src/introspection/conversion.lisp

Revision 29ab7684
Added by J. Moringen almost 7 years ago

Added introspection mixins in src/introspection/mixins.lisp

refs #1740, refs #1744

  • src/conditions (no-such-participant-error): new condition; signaled
    when a participant cannot be found in a container
  • src/introspection/protocol.lisp (introspection-participants): new
    generic function; return participants of a container
    (setf introspection-participants): new generic function; set
    participants of a container
    (introspection-participants/roots): new generic function; return root
    participants of a hierarchical container
    (call-with-database-lock): new generic function; call a thunk holding
    a database lock
  • src/introspection/mixins.lisp: new file; contains mixin classes used
    in the introspection module
  • src/introspection/package.lisp (package rsb.introspection): added
    exported symbols no-such-participant-error,
    no-such-participant-error-container, no-such-participant-error-id,
    introspection-participants, introspection-participants/roots,
    find-participant, call-with-database-lock and with-database-lock
  • rsb-introspection.asd (system rsb-introspection): added file
    src/introspection/mixins.lisp

Revision 0a411c62
Added by J. Moringen almost 7 years ago

Added timing-tracker in src/introspection/timing-tracking.lisp

fixes #2037, refs #1744

The `timing-tracker' class applies the basic NTP algorithm to estimate
clock offsets of remote hosts as well as communication latencies of
remote hosts and processes.

  • src/introspection/protocol.lisp (timing-tracker-clock-offset): new
    generic function; return estimated clock offset
    (timing-tracker-latency): new generic function; return estimated
    communication latency
    (timing-tracker-to-local-clock): new generic function; transform
    timestamp from remote clock to local clock
  • src/introspection/timing-tracking.lisp: new file; contains
    `tracked-quantity' and `timing-tracker' classes
  • test/introspection/timing-tracking.lisp: new file; contains unit tests
    for the `timing-tracker' class
  • rsb-introspection.asd (system rsb-introspection): added file
    src/introspection/timing-tracking.lisp
    (system rsb-introspection-test): added file
    test/introspection/timing-tracking.lisp

Revision 708c28e2
Added by J. Moringen almost 7 years ago

Added remote introspection in src/introspection/remote-introspection.lisp

fixes #1744, fixes #1830, fixes #1833

The remote introspection implementation consists of three layers:
  • `introspection-receiver' handles the event protocol and dispatches
    broadcasts and replies
  • database object classes `{participant,process,host}-entry' are stored
    and maintained in a `remote-introspection-database'
  • `remote-introspection' is a participant class that ties everything
    together by instantiating and configuring `introspection-receiver'
    instances and a database and performing timed updates.
  • src/introspection/protocol.lisp (database-change-hook): new generic
    function; return the change hook of an introspection database object
    (introspection-survey): new generic function; survey remote objects
    (introspection-ping): new generic function; ping a remote object
    (entry-info): new generic function; return info instance associated to
    entry object
    (entry-parent): new generic function; return parent entry of an entry
    (entry-children): new generic function; return child entries of an
    entry
  • src/introspection/mixins.lisp (change-hook-mixin): new class; can be
    mixed into database classes to provide a change hook
    (database-change-hook): new method; return database change hook
  • src/introspection/remote-introspection.lisp: new file; contains remote
    introspection implementation with `introspection-receiver',
    `{participant,process,host}-entry', `remote-introspection-database'
    and `remote-introspection' classes
  • src/introspection/package.lisp (package rsb.introspection): added
    imported-from rsb.patterns.request-reply symbols remote-call-error,
    future-done? future-result, server-method and call; added exported
    symbols database-change-hook, introspection-survey,
    introspection-ping, entry-info, participant-entry, entry-parent,
    entry-children, process-entry and host-entry
  • test/introspection/remote-introspection.lisp: new file; unit tests for
    remote introspection functionality
  • test/introspection/package.lisp (package rsb.introspection.test):
    added imported-from rsb.introspection symbol
    remote-introspection-database
  • rsb-introspection.asd (system rsb-introspection): added file
    src/introspection/remote-introspection.lisp
    (system rsb-introspection-test): added file
    test/introspection/remote-introspection.lisp

History

#1 Updated by J. Moringen over 7 years ago

  • % Done changed from 60 to 70

#2 Updated by J. Moringen about 7 years ago

  • Category changed from Common Lisp to Introspection

#3 Updated by J. Moringen about 7 years ago

  • Category changed from Introspection to Common Lisp

#4 Updated by J. Moringen almost 7 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 70 to 100

Also available in: Atom PDF