arch.md 5.3KB

Arch notes

Workflow

[ SugarTrail::Repo ]

   | 1      init(type,args) # init repo:
   |                        # * type can be Filesystem or other,
   |                        # * args can be root, connection string...
   |        load(master)    # obtain Master from repo
   v n

[ SugarTrail::Template::Master ]

   | 1      parse_head()    # parse text and fill out metadata properties
   |        gen_slave(args) # generate a number of Slaves from a Master
   |                        # * args - args specify ranges from where
   |                        #          Slavess are generated; typically
   |                        #          based on a Cartesian product
   |                        #          (think OS x ARCHS x PROTOCOLS)
   v n

[ SugarTrail::Template::Slave ] = ::Master + args

   | 1      gen_task(slave)     # a task (or a number of) can be created
   |                            # from Slave.  In less managed scenarios
   |                            # (e.g. Beta testing) Slave can be served
   |                            # right away, and task ID will be generated
   |                            # off-site, e.g. using embedded JS, at
   |                            # time of report
   v n

[ SugarTrail::Task ] = ::Slave + (taskid)

More graphical, from HTTP POV

  • the main source file is stored in repository, under revision say, 123

    /release/rc.stm

    +------------------[ vcs rev: 123 ]-----+
    | ::Master # Source file                |
    +---------------------------------------+
    | Name: Release Client                  |
    | Component: ~                          |
    | Description: Basic release criterion  |
    | Owner: some.guy@example.com           |
    | Various ISTQB BS: this; that...       |
    |                                       |
    | Here the body sterts...               |
    |                                       |
    | # Main #                              |
    | 1. Check A                            |
    |    > result is a                      |
    | 2. Check IMAPIsm        {proto==imap} |
    | 2. Check POP3ism        {proto==pop3} |
    |    > result is OK                     |
    +---------------------------------------+
    
  • QA operator requests for Slave (i.e. a variation for his specific needs); text/plain version. Notice how revision number is passed down to the Slave

    GET /release/rc.stm?os=7&proto=imap
    Accept: text/plain
    
    +---------------------------------------+
    | ::Slave # Slave template              |
    +---------------------------------------+
    | Master: /release/rc.stm               |
    | Master Revision: 123                  |
    | Params: os=7; proto=imap              |
    |                                       |
    | Here the body starts...               |
    |                                       |
    | # Main #                              |
    | 1. Check A                            |
    |    > result is a                      |
    | 2. Check IMAPIsm                      |
    |    > result is OK                     |
    +---------------------------------------+
    
  • or they may like HTML better (and POP3 rather than IMAP)...

    GET /release/rc.stm?os=7&proto=pop3
    Accept: text/html
    
    +---------------------------------------+
    | HTML # Generated from Slave           |
    +---------------------------------------+
    | # HTML version of above...            |
    | # With POP3 step instead of IMAP step |
    |                                       |
    :                                       :
    '                                       '
    

Flow diagram

Even more graphical from time POV.

 User  :  App  :  Repo : Master : Slave
=======================================
   |       |       |       |       |
   |       o ----> |       |       |
   |       | init  |       |       |
   o ----> |       |       |       |
   | GET   |       |       |       |
   | /rc?a o ----> |       |       |
   | =b    | load  |       |       |
   |       | <---- o       |       |
   |       |  mst  |       |       |
   |       |       |       |       |
   |       o ------------> |       |
   |       |       | gen(a |       |
   |       |       | =b)   |       |
   |       | <------------ o       |
   |       |       | slv   |       |
   |       |       |       |       |
   |       o --------------------> |
   |       |       |       | rndr  |
   |       | <-------------------- o
   |       |       |       | html  |
   |       |       |       |       |
   | <---- o       |       |       |
   |  html |       |       |       |
   |       |       |       |       |
=======================================

Layers

DAL         | BLL           | PL
========================================
Repo        : Master        :
            :               :
            : Slave         :
            :               :
            : Condition     :
            :               :
            :               :