LogicBlox 4.5


Table of Contents

LogicBlox 4.5.0

LogicBlox 4.5.0

Release Date: August 1, 2018

What's New

LogicBlox 4.5.0 introduces the following enhancements:

  • VERSION NUMBERING

    • Previous LogicBlox releases used a version number scheme that looked like MAJOR.MINOR.SUB-MINOR.PATCH, for example 4.4.16.1. With this and future releases, this scheme is being simplified to a three number MAJOR.MINOR.PATCH scheme, for example 4.5.1. Significant changes to the architecture or functionality in the LogicBlox platform will cause an increment to the MAJOR number. Releases for the regularly schedule release cycle will increment the MINOR number. On-demand bug fix releases will increment the PATCH number.

  • MODELER

    • Modeler's tile-based view layout now supports drag and drop. This enhancement allows the user to reorganize panes (e.g. sheets and buttons panels) within a canvas by dragging them to the preferred position within the view.

      Example 1. 

      To drag a sheet, point your mouse to the title bar of the sheet to expose a drag and drop handle next to the title. While dragging, Modeler will indicate where the sheet can be dropped based on the current position of the mouse pointer.


      Example 2. 

      Button and shortcut panels can be dragged in the exact same way as sheets. The drag and drop handle is always visible on these types of panes.


      Panes can be removed from a view by dragging them out of the canvas. Removed panes can be restored by resetting the canvas layout.

      Example 3. 

      Remove a sheet from the view by dragging it outside of the canvas. Modeler will ask the user for confirmation before actually removing the view to make sure the removal is intentional.


    • Modeler now supports manual (user) locking for percent parent measures. This was not previously supported and provides the user with a method of maintaining a specific percentage of an upper level (or of ALL) for these types of measures while editing percent parent or parent base values at other levels.

      The user may lock these measures via the right-click context menu for any percent parent measure. When a percent parent cell is locked, dependent values are also locked and will be displayed in the Locks dialog as children of the manually-locked percent parent cell. The manually locked cell displays a blue lock icon while dependent locked cells display a grey lock icon.

      Example 4. 

      For instance, lock the percent parent measure at the Subclass level to maintain its percentage against ALL when editing the base value of a Sku in that Subclass.


    • Users can now easily control which measures are displayed on a view without having to drag measures on and off the view. Right click on a visible measure in the measures axis, and select 'Hide Field' to hide the measure. Hidden measures are reflected in the count badge on the icon of the filters panel. This panel can also be used to manage measure visibility for all visible measures at once.

      Example 5. 


    • Modeler now supports application-wide displayable measures and dimensions configurations. This can be accomplished by creating the file settings.json in the src/config/views/<application> directory for the target application with a properly formatted displayable measures and/or dimensions configuration JSON.

      Example 6. 

      For example, the JSON below will restrict all views in the app to only the measures Sales and Returns and will not show the Class hierarchy level in the Product dimension.

      {
            "displayableMeasures": {
                "include": true,
                "measures": [ "Sales", "Returns"]
            },
            "dimensionsConfig": [
                {
                    "dimension": "Product",
                    "include": false,
                    "levels": ["Class"]
                }
            ]
        }


      Note that these settings can be overridden at the sheet or canvas level. Sheet settings take priority over canvas settings which take priority over application-wide settings. Any user views as well as the Data Import view will also have these settings applied but cannot be overwritten.

    • The ModelerTestUtil library now contains new functions that allow recording Modeler's HTTP requests. Two functions startRecordingRequests and stopRecordingRequests were added to the ModelerTestUtil and writeJson was added to the logicbloxtestutils package.

      Example 7. 

      See the example below for more details:

      const logicbloxtestutils = require("logicbloxtestutils");
      const ModelerTestUtil = logicbloxtestutils.ModelerTestUtil;
      const writeJson = logicbloxtestutils.writeJson;
      
      describe("MyTest", function() {
          let modelerTestUtil;
      
          beforeEach(function() {
              modelerTestUtil = new ModelerTestUtil(testUtils.createTestModelerConfig());
      
              return modelerTestUtil.initialize();
          });
      
          afterEach(function() {
              modelerTestUtil.destroy();
              modelerTestUtil = null;
          });
      
          it("should be able to record http requests", function() {
              modelerTestUtil.startRecordingRequests();
      
              return modelerTestUtil.querySheetCount(sheetConfig)
                  .then(() => modelerTestUtil.$queryForSheet(sheetConfig))
                  .then(() => {
                      const requests = modelerTestUtil.stopRecordingRequests();
      
                      expect(requests.length).toEqual(2);
      
                      requests.forEach(req => {
                          console.log("url is", req.url);
                          console.log("method is", req.method);
                          console.log("data is", JSON.stringify(req.data));
                      });
      
                      // writing json to disk
                      return writeJson("requests.json", requests);
                  });
          });
      });


  • TOOLS AND SERVICES

    • The pragma lang:block:predicateLifetime has been removed. Replace this with explicit pulse declarations like lang:pulse(`some_predicate).

    • Several new pedantic warnings have been introduced as part of a push to streamline aspects of LogiQL as an intermediate step forward to a new LogiQL compiler. As they are pedantic warnings, they need to be explicitly enabled to be reported. In an upcoming release they will be promoted to normal warnings.

      • REFMODE_DEPRECATED: In LogiQL refmodes have been long subsumed by the functionality offered by constructors. Indeed, in 4.x there are no refmodes internally and they are instead rewritten as constructors. Having both refmodes and constructors can introduce confusion when learning and writing LogiQL, and adds considerable implementation complexity to support both in our platform.

      • NO_INFERRED_DERTYPE: Since 3.x we have supported the ability to leave the derivation type of a predicate unspecified at creation time and have it later be resolved to an EDB or IDB. Because our platform consists of several different independent components, this can lead to cache coherency issues (among other problems) if the derivation type is resolved before a component refreshes its view of the predicate. And again, supporting this behavior leads to considerable implementation complexity and strange corner cases.

      • IMPLICIT_PULSE, EXPLICIT_PULSE: In 4.x there is actually no such thing as a transaction lifetime pulse predicate. We have continued to maintain the illusion that they do exist by some hackery. But in 4.x it is actually more efficient to use IDB logic rather than delta logic over EDBs in transaction lifetime logic. However, historically the compiler has always marked any predicates local to transaction lifetime logic as pulse, forcing them to be EDB. The IMPLICIT_PULSE warning is reported when a predicate is implicitly declared to be pulse due to this mechanism. The EXPLICIT_PULSE warning is reported when a predicate in a transaction lifetime block is explicitly declared to be pulse. To avoid IMPLICIT_PULSE, the pragma lang:compiler:txnLifetimePulse[]=false. should be used to prevent the compiler from implicitly declaring predicates to be pulse.

      • IMPLICIT_APP_DELTA, IMPLICIT_ATOM_DELTA: There are a complicated set of rules that exist that will cause the compiler to add assertion deltas to atoms and application expressions for pulse predicates. The rules are quite complex for users to learn, and it can lead to considerable confusion when reading code as it becomes impossible to distinguish between an IDB rule and a delta rule. So moving forward if you really mean for there to be a delta, write it explicitly.

    • Extensions to the prefix-join implementation will result in faster rule execution for both full evaluation and incrementation evaluation of rules with functionally determined lookups (also known as PJ++ rules). PJ++ rules are extensions of prefix-join rules that allow predicates whose keys are functionally determined by a subset of the rule's keys to be in the body.

    • The cloud-store utility has some backward incompatible changes introduced to the programmatic API. The main motivation behind these changes was to clean up the API, making commands and options consistent in the interface, simplifying and making the implementation more consistent, and generally cleaning up the code. If you are programming against the cloud-store API and need advice on how to adapt to the updated API, contact LogicBlox support.

      Some of the backward incompatible changes to both the CLI and API interfaces were to make path semantics consistent across all cloud-store CRUD commands (i.e. upload, download, copy, delete, and rename), treating keys passed to the commands in the same way. Previously, each command had slightly different semantics and expectations. In addition, some commands exposed different semantics at the API and CLI layers.

      cloud-store now makes a clear distinction between the non-recursive and recursive variants of each command. For the CLI, non-recursive variants don't include the --recursive flag (e.g. cloud-store copy) and recursive variants explicitly include the --recursive flag (e.g. cloud-store copy --recursive). For the programmatic API, non-recursive variants don't end with 'Recursively' (e.g. CloudStoreClient.copy()) while recursive variants always end with 'Recursively' (e.g. CloudStoreClient.copyRecursively()).

      As an example, the download command now expects either a fully qualified key or a prefix key along with the --recursive flag.

      • For a fully qualified key:

        • Downloads the object matching the specific key.
        • Issues an error if the key ends with a ‘/’.
        • A directory-like key (i.e. ending with ‘/’) is considered a prefix and, hence, the --recursive option will be required for such keys.
        • Issues an error if the key matches no object.

      • For a prefix key combined with the --recursive option:

        • Downloads all objects matching the specified prefix.
        • Issues a warning if no objects are matched.

    • Support for the old lb-web client API has been removed. The old API has been deprecated since the 4.4.2 release and is no longer supported. Please contact LogicBlox support if you need guidance in porting the old API to the new API.

    • In release 4.5, lb-web has migrated its underlying networking infrastructure from an outdated and unsupported jetty implementation to a new infrastructure based on netty. This migration includes a small API change for lb-web handlers that will require a few adjustments for applications that use custom handlers:

      • Update HTTP request and response interface. Note the new interfaces below deprecate the majority of the methods defined in the old classes. Migrating from the deprecated methods to the new API is also recommended.
        • Replace any reference to javax.servlet.http.HttpServletRequest with com.logicblox.web.server.http.HttpRequest.
        • Replace any reference to javax.servlet.http.HttpServletResponse with com.logicblox.web.server.http.HttpResponse.
      • Update uses of helper classes.
        • Replace org.eclipse.jetty.http.HttpException with com.logicblox.web.common.http.HttpException.
        • Replace org.eclipse.jetty.http.HttpStatus with com.logicblox.web.common.http.HttpStatus.
        • Replace com.logicblox.web.HttpMethod with com.logicblox.web.common.http.HttpMethod.
        • Replace com.logicblox.web.ContentType with com.logicblox.web.common.http.ContentType.

    • Experimental tracing functionality has been available in the user-interface and service layers of the LogicBlox stack for a couple of past releases. This release extends the tracing support into the database layer. The goal of the tracing infrastructure is to provide detailed execution traces throughout the LogicBlox stack to support diagnosis of performance or correctness issues with minimal impact on application performance. Contact LogicBlox support if you are interested in experimenting with this in your application.

  • MEASURE SERVICE

    • Support for anonymous metrics via the field in the MetricExpr message has been removed. This feature has been deprecated for a considerable length of time and the field was only needed for internal reasons up until now.

    • Predicate bindings are now allowed for parameterized CubiQL metrics.

    • Added commands to the REPL for binding, listing, and clearing per request variable bindings.

      • Binding an expression variable can be done with :bind-var (X=...)
      • Binding an intersection variable can be done with :bind-var [I=...]
      • Listing bound variables can be done with :print-var, and a specific variable can be printed with :print-var X
      • A specific variable can unbound with :clear-var X

Corrected Issues

The issues listed below have been corrected since the 4.4.16 release:

  • MODELER

    • Fixed: The dragable cursor for tile layout resize extended too far into the slider for the adjacent pane.

    • Fixed: Corrected text in info and success messages for Excel and CSV export.

    • Fixed: Corrected some performance regressions introduced over the past few releases.

    • Fixed: Fixed drag and drop for tile layout.

    • Fixed: Sync and Cancel buttons were not always visible in the slice sync window.

  • TOOLS AND SERVICES

    • Performance and correctness improvements were made to inside-out rule rewrites.

    • Fixed a bug in the prefix-join implementation that could cause a SensitivityIndicesLookup internal error.

  • MEASURE SERVICE

    • Fixed an issue where split operations could be incorrectly floated through demote operations.

    • Fixed an issue where a CubiQL let expression could cause a CubiQL metric to be considered to be parameterized.

    • Fixed an issue where annotations on CubiQL let expressions would be lost.

Upgrade Information

  • MODELER

    • LogicBlox no longer integrates with FullStory. FullStory support has been removed from Modeler.
    • The library containing the Modeler migration tool is included in the distribution under lib/npm/modeler-migrations-<version>.tgz and contains a command line tool for doing various transformations/migrations of modeler configurations.

      To use the npm module, you first need to install it by running npm install path/to/modeler-migrations-<version>.tgz. You will then be able to use the command line tool. The module contains a README.md file that lists all available transformations as well as detailed instructions for use.

      To automatically upgrade a Modeler application from one version to another, run the upgrade script to upgrade between versions:

      ./node_modules/.bin/migrate-modeler --fromVersion <prevVer> --toVersion <toVer> /path/to/my/modelerapp

      where the version numbers refer to LogicBlox releases.

      NOTE: If you installed the npm module globally, you won't need the ./node_modules/.bin prefix on the command.

Installation Information

Installation Instructions

Install LogicBlox 4.5.0 by 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.5.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.

Release Information

Server requirements
Operating System: 64 bit Linux; macOS 10.10+ is supported for local development.
Java Runtime Environment 8
Python 2.7 or higher
Client requirements
Applications using LogicBlox Modeler: Modeler supports major browsers not older than 1 year. Google Chrome provides the best performance.
Requirements for applications using non-LogicBlox Modeler components may vary per application.