ipc size between kdb+ servers - Kdb+ / qStudio

Home Forums Kdb+ / qStudio ipc size between kdb+ servers

Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #432

    bigdata-dan
    Guest

    Hi,

    How large is the messaging overheard in kdb+?
    Is there a specification of messaging format?
    Can I tell what size sending a table requires?

    Thanks.

    #500

    The messaging overhead in kdb+ is minimal. Few bytes for a header describing type/format is usually all and messages can be compressed.

    The protocol is specified here:
    http://code.kx.com/wiki/Reference/ipcprotocol

    Serialization examples

    serializing an integer of value 1

    `
    q)-8!1
    0x010000000d000000fa01000000
    `
    We can break this down as

    0x01 – architecture used for encoding the message, big endian (0) or little endian (1)
    00 – message type (0 – async, 1 – sync, 2 – response)
    0000
    0d000000 – msg length (13)
    fa – type of element following (-6, meaning a 4 byte integer follows)
    01000000 – the 4 byte int value (1)

    IPC of int vector

    `q)-8!enlist 1
    0x010000001200000006000100000001000000
    `
    0x01 – little endian
    000000
    12000000 – message length
    06 – type (int vector)
    00 – attributes (00 – none, 01 – s, 02 – u, 03 – p, 04 – g)
    01000000 – vector length (1)
    01000000 – the element, a 4 byte integer (1)

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.