r4 - 19 Oct 2007 - 23:29:08 - Main.eturnerYou are here: TWiki >  Main Web > ServerConfiguration > ProtocolConnectors > FileOutputConnector

Object Overview

The File output connector object allows AlchemyPoint Server to save files to a locally mounted filesystem path or network share drive. This allows AlchemyPoint to automatically save file updates to the local system disk, perform asynchronous messaging over the local filesystem, etc.

This object utilizes AlchemyPoint's underlying Connector framework and thus supports a variety of rate limiting and concurrency options.

Example Object Definitions

... directly within the top-level ServerConfiguration object:

Minimal Configuration:

<FileOutputConnector name="FileOut1"
                     writeDirectory="C:\SaveDir"
                     outputFilePattern="savedFile-${DATE}-${COUNT}"/>

Overview:

The above example is a File output connector that accepts 'raw' FileMessages? from a FTPInputConnector and FileInputConnector, or opaque data from OpaqueMessages? and KeyValueMessages? . Received message data is saved to the local filesystem directory 'C:\SaveDir', using the filename pattern 'savedFile-${DATE}-${COUNT}'.


Complex Configuration (all possible attributes shown):

<FileOutputConnector name="FileOut1" tags="connector file output"
                     description="example output for saving files to local filesystem path"
                     writeDirectory="C:\SaveDir"
                     outputFilePattern="savedFile-${DATE}-${COUNT}"
                     outputMode="rewrite"
                     rateLimitDuration="60"
                     rateLimitPipelineMax="1"
                     connectRateLimit="5"
                     messageRateLimit="5"
                     reconnectAttempts="5"
                     reconnectInterval="60"
                     reconnectExpBackoff="true"/>

Overview:

The above example is a File output connector that accepts 'raw' FileMessages? from a FTPInputConnector and FileInputConnector, or opaque data from OpaqueMessages? and KeyValueMessages? . Received message data is saved to the local filesystem directory 'C:\SaveDir', using the filename pattern 'savedFile-${DATE}-${COUNT}'.

This connector is rate limited at 5 file saves every 60 seconds, and will attempt to re-save files up to 5 times. The first save attempt is made after a 60 second delay, with subsequent attempt delays doubling each time (120 seconds, 240, ...).

Supported Attributes

General Attributes:

  • name - (usage: required): Public name of the configuration object. This name must be globally-unique across the entire AlchemyPoint ServerConfiguration definition.

  • description - (usage: optional): Textual description of the configuration object.

  • tags - (usage: optional): Space-delimited list of one or more tags used to describe the configuration object.


Object Attributes:

  • writeDirectory - The filesystem directory that uploaded files should be written to on the locally accessible system drives.

  • outputFileName - The filename that should be utilized when saving files to the local filesystem.

  • outputFilePattern - A filename "pattern" that should be utilized when saving files to the local filesystem. Replacement fields in this pattern are rewritten by the Connector to include context-specific information in filenames. The following replacement fields are supported:
    • ${DATE} - Current system date, in the form 'MM-DD-YYYY_hh-mm-ss' (MM = 2 digit month [01-12], DD = 2 digit day-of-month [01-31], YYYY = 4 digit year [1970-2###], hh = 2 digit hour (00-23), mm = 2 digit minute (00-59), ss = 2 digit second [00-59]).
    • ${SYS_TIME} - Current system time, in the form 'nnnnnnnnn' (# seconds since January 1st, 1970).
    • ${ORIG_NAME} - Original name of the uploaded file (if it was originally retrieved via a FileInputConnector, FTPInputConnector, etc.)
    • ${COUNT} - Unique count value (incremented each time a file is saved by this Connector).
    • ${UUID} - Unique identifier value (unique for every file saved by this Connector).

  • outputMode - (usage: optional, default: "append"): The manner in which files should be saved to the local filesystem. Supported 'outputMode' values are:
    • append - If the file already exists on the local filesystem, file content should be appended to the original file.
    • rewrite - The saved file should overwrite any already-existing file if it exists.


Rate Limit Attributes:

  • rateLimitDuration - (usage: optional, default: "0"): The duration (in seconds) utilized by the 'messageRateLimit' parameter. A value of "0" disables all rate limits for this Connector.

  • messageRateLimit - (usage: optional): The number of files that may be saved by this Connector within the 'rateLimitDuration' period.

  • rateLimitPipelineMax - (usage: optional): The number of files that may be 'pipelined' by this Connector (saved in a single 'bunch' without any messageRateLimit between saves). This setting is useful for specifying the number of files that may be saved in rapid sequence.
    • The 'rateLimitPipelineMax' setting has an upper bound of 'messageRateLimit' messages. The maximum allowable value for this pipeline setting is the Connector's 'messageRateLimit' setting.


Automatic Reconnect Attributes:

  • reconnectAttempts - (usage: optional, default: "0"): The number of times (0-1000) this Connector should attempt to save a file to disk.

  • reconnectInterval - (usage: optional, default: "1"): The interval (1+) in seconds that the Connector should delay between retry attempts for saving files.

  • reconnectExpBackoff - (usage: optional, default: "true"): Boolean setting that indicates whether the Connector should exponentially increase the retry interval upon each file save attempt (60 seconds -> 120 -> 240 -> ...)

Supported Child Configuration Elements

None.

Issues

Unresolved documentation issues: concurrency

Edit | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r4 < r3 < r2 < r1 | More topic actions

tip TWiki Tip of the Day
Server side include
To include the contents of a web page or TWiki topic, use %INCLUDE{"page"}% . Examples: %INCLUDE ... Read on Read more

 
Powered by TWiki
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback