Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
devel:xavp [2009/05/27 22:35]
miconda
devel:xavp [2009/07/28 13:09] (current)
82.113.121.84
Line 3: Line 3:
 <code> <code>
 Proposal and prototype implementation by: Proposal and prototype implementation by:
-   Daniel-Constantin Mierla <miconda [at] gmail (dot) com+   Daniel-Constantin Mierla <miconda [at] gmail (dot) com
 + 
 +CODE IN GIT REPOSITORY BRANCH: daniel/xavp 
 </code> </code>
  
 ===== Purpose ===== ===== Purpose =====
  
 +It is not a replacement for current AVP implementation, but a new feature (a new data structure available in code and config, similar to pseudo-variable like: sahred variable $shv(...), hash table variable $sht(...), private variable $var(...)). Developers and script writers can decide which one to use: AVP or XAVP.
 +
 +Primary goals:
   * ability to store more value types, not only integer and string   * ability to store more value types, not only integer and string
   * simplify addressing by using only string name for attributes   * simplify addressing by using only string name for attributes
   * possibility to optimise the search by creating lists of xavp lists   * possibility to optimise the search by creating lists of xavp lists
   * availability in config file for xavp with string or integer value (expression interpreter supports only these values) via PV module   * availability in config file for xavp with string or integer value (expression interpreter supports only these values) via PV module
 +  * availability in stateful processing, during the lifetime of transaction
  
 ===== Internal design ===== ===== Internal design =====
Line 117: Line 124:
  
 NOTE: this avp printed to xlog will return a string: <<data:value of the pointer to data>> (e.g., <<data:0x973937393>>), good for debug purposes. NOTE: this avp printed to xlog will return a string: <<data:value of the pointer to data>> (e.g., <<data:0x973937393>>), good for debug purposes.
 +
 +This type of value is intended for internal usage, one of the modules that needs it immediately being **dialog**.
  
 === XAVP data value === === XAVP data value ===
Line 206: Line 215:
   * **less exposure the name conflicts by grouping**   * **less exposure the name conflicts by grouping**
     * modules can group their internal AVPs under a xavp, so other xavps with same name in global list won't affect the module functionality. Say dispatcher groups its avps under "dispatcher". Inside that list it can have xavp with names: dst, grp, cnt. In the global list or other sublists can be other avps with name 'dst', without any interference.     * modules can group their internal AVPs under a xavp, so other xavps with same name in global list won't affect the module functionality. Say dispatcher groups its avps under "dispatcher". Inside that list it can have xavp with names: dst, grp, cnt. In the global list or other sublists can be other avps with name 'dst', without any interference.
 +
 +  * **reduce number of parameters for some modules**
 +    * a module can reserve now only one name for xavp in default list. Inner xavp can have predefined names, without the risk for overlapping with other modules or config
 +    * **dispatcher** module can reserve xavp name "dispatcher" via modparam, while the names for AVPs dst, cnt, grp can be predefined and documented in readme.
  
 ===== Use cases ===== ===== Use cases =====
Line 212: Line 225:
  
   * **acc** module for multi-leg accounting - grouping will improve speed and remove the wrong behaviour when a value is not set in one leg - null is set for the right leg, not for the last one.   * **acc** module for multi-leg accounting - grouping will improve speed and remove the wrong behaviour when a value is not set in one leg - null is set for the right leg, not for the last one.
-  * **dispatcher** module - grouping +  * **dispatcher** module - grouping 
 +  * **dialog** module - store using generic data structure the dailog context pointer (get rid of current hack that adds a fake callback structure)
   * serial forking functions   * serial forking functions
 +  * possible in **lcr** or **carrierroute**
 +  * possible in **utils**, to store each line of http response in a grouped xavp list.
 +
 +===== Observations =====
  
 +  * it is not a replacement to existing AVPs, but an addition, a new class of pseudo-variables

Navigation

Wiki

Other

QR Code
QR Code devel:xavp (generated for current page)