Filter.so

Filter.so provides direct access to BloomFilter structure of BrandMeister Core. In this case the library allows to check probable presence of connection context at BrandMeister Core without making an IPC call. Filter makes IPC call at connection time only. The library can be used with any software via C API or Lua API (requires at least Lua 5.1 or LuaJIT 2.1).

C API

void* CreateContextFilter(int network, int interval);
void ReleaseContextFilter(void* filter);
int CheckContextFilter(void* filter, int type, int number);

Lua API

  • filter = require('Filter').create(network, interval) - create instance of Filter
  • filter:connected() - connection status
  • filter(type, number) - check connection context

Parameters

  • network - master ID
  • interval - connection timeout in milliseconds
  • type - context type, same as in onther APIs (LINK_TYPE_*)
  • number - context ID

Router.so

Router.so provides functionality to pass routes list directly via shared memory. Router.so is a pure Lua module (requires at least Lua 5.1) and can be used with any software.

Lua API

  • router = require('Router').create(network, timeout, interval) - create instance of Router
  • router:connected() - connection status
  • router:submit() - submit routes to BrandMeister Core
  • router(identifier, type, number, slot, tag) - same set of parameters like in embedded Lua or Registry Lua APIs

Parameters

  • network - master ID
  • timeout - connection timeout in milliseconds
  • interval - auto-submit interval in milliseconds (default value is 0 = disabled)
  • identifier - banner of call session to add route
  • type - context type, same as in onther APIs (LINK_TYPE_*)
  • number - context ID / repeater ID / ...
  • slot - slot to route (0 = DMO)
  • tag - route tag

Access.so

Access.so if a provider module to make direct access via shared memory to the data required by getStoredValue / setStoredValue. Access.so is a pure Tarantool module (requires at least Tarantool 1.10).

Lua API

  • quick = require('Access').create(network, timeout) - create instance of Access
  • quick:connected() - connection status
  • quick:update() - update a list of provided objects and submit it to BrandMeister Core

Supported objects

  • spaces - should have a name started with Stored*, format { uint32 key1, uint32 key2, uint32 value, double expires } and composite key Key with format { uint32 key1, uint32 key2 }
  • functions - the list of functions should be placed in lua's table _G.StoredFunction = { <place> = { set = function (place, key1, key2, value, interval), get = function (place, key1, key2) }, .. }