LogicBlox 4.3.0

Release Date: July 9th 2015

What's New

Database
  • Pager Embedding: There is no longer a separate BloxPagerDaemon process. The pager is now embedded in the lb-server process. One immediate advantage for users is that we no longer require /run/shm (or /dev/shm) to be larger than the default configuration on most Linux distributions. The lb-server does still use a bit of shared memory, but only for communicating statistics efficiently to client tools.
  • Port Changes: We have changed the default TCP ports used by the lb-server and lb-compiler. This change became necessary when we found out that sporadic failures to start these services were caused by an unfortunate choice of ports. The previous default ports were in the ephemeral port range, which the kernel arbitrarily uses for the source port of a tcp socket. When starting services frequently enough, eventually this will always fail, and we decided it would be wiser to change the default ports. This change should not impact applications, except if there exists external code for establishing connections to the lb-server.

    Note

    Note that the port change might require revision of monitoring tools.

  • The memory usage for workspaces having large numbers of predicates and installed rules has been reduced.
  • The semantics of subtyping has been tightened up and it is no longer possible to insert a supertype into a subtype entity predicate, or from sibling subtypes into each other. This is a temporary measure that will be revisited in the future.

    Example 56. 

    Use cases for this feature can usually be rewritten to use unary predicates instead of entity predicates for attributes of interest. For instance, instead of writing:

    person(_) -> .
    person_by_name[x]=y -> string(x), person(y).
    lang:constructor(`person_by_name).
    
    male(x) -> person(x).
    female(x) -> person(x).
    parent(x) -> person(x).
    lang:entity(`male).
    lang:entity(`female).
    lang:entity(`parent).
    
    // Bob has no kids
    +person(x), +person_by_name["Bob"]=x, +male(x).
    
    // Alice does
    +person(x), +person_by_name["Alice"]=x, +female(x), +parent(x).

    One would now write:

    person(_) -> .
    person_by_name[x]=y -> string(x), person(y).
    lang:constructor(`person_by_name).
    
    // Not entity declarations, just unary predicates
    male(x) -> person(x).
    female(x) -> person(x).
    parent(x) -> person(x).
    
    // Bob has no kids
    +person(x), +person_by_name["Bob"]=x, +male(x).
    
    // Alice does
    +person(x), +person_by_name["Alice"]=x, +female(x), +parent(x).

Services Framework
  • lb web-client support for stateless authentication: lb web-client now supports stateless authentication via the RSA-SHA protocol already supported by lb web-server. In order to make an authenticated call, users must pass username and keyname, and optionally select the keydir to locate the private key (defaults to the directory configured in lb-web-client.config).
Measure Service

  • Significant revision to the implementation for updates:
    • Introduces a distinction between locks on metrics that can be converted to edits and those that should not (these would tend to be used to implement what were called historical locks).
    • New support for dimension locking, that allows locking by a member of some dimension level. For example, it is now possible to lock edits to not change values relating to a particular sku, across all metrics.
    • Metrics can now have inverses defined in CubiQL. The measure service can also now automatically generate inverses for metrics defined via CubiQL.
  • spread-by-metric is now supported as a built in spreading method.
  • Metrics defined by measure language recalcs now inherit the default value of their base intersection at aggregated intersections.
  • Literal expressions:
    • A literal can now be written in CubiQL by enumerating its tuples and specifying their types, using the new signature construct.

      Example 57. 

      A measure with 2 tuples, defined at the intersection {String, Int} and having decimal values:

      { ("a", 1, 10d), ("b", 2, 20d) } : {String, Int} => decimal  

      Example 58. 

      A position-only measure at the intersection {String, Int}:

      { ("a", 1), ("b", 2) } : {String, Int}   

      Example 59. 

      A measure that allows multiple values per key tuple:

      { ("a", 1, 10d), ("a", 1, 20d) } : {String, Int} => Set(decimal) 

      Example 60. 

      With a label and predefined dimensions in keys, and an entity type in the value:

      {("Colgate 20oz", "Atlanta, GA", "1150118")} : {merchandise:sku, Location.store} => `pdx:cal:week` 

    • In protocol buffers syntax, the relevant new messages are LiteralExpr, BaseSignature, and ValueType. The data within a LiteralExpr is maintained in columns, in the same manner as in LiteralTypedRelation message. In the future, the contexts in the protocol syntax that currently make use of LiteralTypedRelation will be generalized to use the more general MeasureExpr. Since LiteralExpr is a kind of MeasureExpr, it will take place of the current usages of LiteralTypedRelation.
    • Measure signatures, whose introduction was prompted by the needs of literal expressions, are expected to see more use in CubiQL, as the types of measure expressions. They will also replace several uses of Intersection + Type field pairs in protocol buffers that currently serve this purpose.

Developer Tools

  • The lb query command now defaults to read-only, to avoid unintended write transactions.
  • Usability improvements to the lb popcount command:
    • lb popcount now raises a concise error if the predicate in question does not exist
    • Improved option parsing for lb popcount to match lb print and lb predinfo commands
    • lb popcount now only shows the non-default facts in the predicate.

Corrected Issues

The issues listed below have been corrected since the 4.2.1 release.

  • Durability bug fixes: Extensive testing has revealed several durability bugs that have been fixed with this release. Durability problems would manifest as strange errors or crashes upon reopening a workspace.

    Important

    Durability bugs are severe problems and we strongly advise users of a previous LB4 release to update.

  • Out-of-memory bug fixes: Out-of-memory errors could occur when exporting large csv files, or when performing large aggregations which produced a small number of result records (e.g., aggregating into a scalar result predicate). These bugs would usually appear as an lb-server process using ever-increasing amounts of memory, becoming sluggish, and eventually being killed by the Linux kernel (OOM killer).

Installation and Upgrade information

Installation Instructions

Installing LogicBlox 4.3.0 is as simple as following the steps outlined below:

  1. Download the installation package.
  2. Extract the tarball in <YourPreferredInstallDirectory>
  3. Run the following command:
    source <YourPreferredInstallDirectory>/logicblox-4.3.0/etc/profile.d/logicblox.sh
    
    NOTE: this script will set all the necessary environment variables. You might want to add this command to your .bashrc.

Upgrade Information

  • Using refmode conversion in LogiQL is now treated as an error. The error may still be disabled, but in 4.3.2 the support for refmode conversion will be completely eliminated.
  • Using deprecated numeric precisions in LogiQL is now treated as an error. The error may still be disabled, but in 4.3.2 the support for numeric precisions will be completely eliminated.

Release Information

Server requirements
Operating System: 64 bit Linux; OSX 10.10+ is supported for local development.
Java Runtime Environment 7, update 11 or higher
Python 2.7 or higher
Client requirements
Applications using modeler-js User Interface Components: Google Chrome
Requirements for applications using non-modeler-js components may vary per application.