Prajna


Prajna

Prajna.Api.CSharp Namespace

TypeDescription
DKVMemberExtensionsToDSet

Extension member functions for DSet>

DSet<'U>

Generic distributed dataset. If storing the content of DSet to a persisted store, it is highly advisable that 'U used is either of .Net system type, or using a customized serializer/deserializer to serialize ('U)[]. Otherwise, the stored data may not be retrievable as the BinaryFormatter may fail to deserialize a class if the associated code has changed.

Prajna.Api.CSharp.Linq Namespace

TypeDescription
DSetLinqExtensions

Prajna.Api.FSharp Namespace

TypeDescription
DKV<'K, 'V>

Functions for DSet<'U> when 'U represents a key-value pair with type 'K*'V

DKVExtensionsToDSet

Extension member functions for DSet<'K*'V>

DSet<'U>

Generic distributed dataset. If storing the content of DSet to a persisted store, it is highly advisable that 'U used is either of .Net system type, or using a customized serializer/deserializer to serialize ('U)[]. Otherwise, the stored data may not be retrievable as the BinaryFormatter may fail to deserialize a class if the associated code has changed.

Prajna.Core Namespace

TypeDescription
BlobMetadata

BlobMetadata used in Job Execution. The class gets exposed because of use in abstract function.

CacheKind

PrajnaCacheTye only kicks in for StorageType.RAM It is only used for in job DSet

ClientInfo

ClientInfo contains information of a Prajna remote node and its daemon. Information below is exposed as F# is not capable of suppress comment on internal/private structure member.

Cluster

Cluster represents a set of remote nodes in either a private cloud or a public cloud. It is the class that govern which remote nodes that services, contracts and data analytical jobs are running upon.

ConnectionStatus
ControllerCommand

Verb-Noun pair that forms one Prajna message. Only advance programmer that need to write additional Prajna service should use this data structure

ControllerNoun

Noun to be used for message passing between Prajna nodes Only advance programmer that need to write additional Prajna service should use this data structure

ControllerVerb

Verb to be used for message passing between Prajna nodes Only advance programmer that need to write additional Prajna service should use this data structure

DParam

DParam, setting parameters for DSet mapping Base of PrajnaDistributed Object

DSet

DSet is a distributed data set. It is one of the central entity in Prajna. Please use the generic version of this class.

DStream

DStream is a distributed byte[] stream, a central entity in DSet.

DebugMode

Control the launch of container in Debug or Release mode.

DeploymentSettings

A set of default parameter that controls Prajna execution behavior

DistributedObject

Base of DStream/DSet, all exposed functions in this class is internal function to be executed during a data analytical jobs. They shoould not be used by programmer.

Environment

Represent Prajna Environment for running Prajna program

JobDependencies

Remote execution roster, which contains a list of file (dlls, data, environment variables) that is required for the job

JobListener
JobTaskKind

Enumeration class that controls how a remote container for the job/service is executed.

LoadBalanceAlgorithm

Enumeration class of constant of type of Load balancing algorithm supported

LocalClusterConfig

The configuration for a local cluster

NetworkCommand
NetworkCommandQueue

An extension to GenericConn to process NetworkCommand GenericConn is an internal object which contains Send/Recv Components to process SocketAsyncEventArgs objects NetworkCommandQueue contains Send/Recv Components to process NetworkCommand objects The general pipeline looks like following For Recv: Network -> GenericConn (ProcessRecvGenericConn) -> NetworkCommandQueue (function from AddRecvProc) -> Application RecvAsync->queue CompRecv of GenericConn CompRecv of NetworkCommandQueue SocketAsyncEventArgs->NetworkCommand NetworkCommand->application To Queue of NetworkCommandQueue For Send: Network <- (SendAsync) GenericConn <- (ProcessSendGenericConn) NetworkCommandQueue <- Application CompSend of GenericConn CompSend of NetworkCommandQueue network<-SocketAsyncEventArgs SocketAsyncEventArgs<-NetworkCommand Application writes to NetworkCommand queue using ToSend

NetworkCommandQueuePeer

A Prajna CommandQueue that is resulted from accept()

NetworkConnections

A set of NetworkCommandQueue that are established via the Connect call Each connect is reference counted, so that the connect will shutdown when the reference reaches 0

OnAcceptAction

Delegate that is called when some one connects in

RemoteContainer

Access state of RemoteContainer

RemoteExecutionEnvironment

Parameters related to Prajna remote running environment

StorageKind

Type of Storage used by DSet

TPLTask
TaskLaunchMode

Enumeration Class that controls the behavior of the remote container launch

Prajna.Service Namespace

TypeDescription
CacheService

Cache Service doesn't do anything itself. It only register a service with an AppDomain/Exe, so that when the client stops, the AppDomain/Exe continues to run and hold cached data.

ContractServerInfoLocal

Specify contract servers to be monitored, this class can not be serialized

ContractServersInfo

Specify servers to be used to launch services, import and export contract

DefaultSerializerForDistributedFunction

Govern the behavior of the default serialization to be used

DistributedFunctionBuiltInProvider

For built in Prajna functions.

DistributedFunctionProvider

Infromation of distributed Function Provider To use distributed function,

DistributedFunctionStore

Representing a single registered distributed function DistributedFunctionStore provides a central location for handling distributed functions.

DistributedFunctionStoreAsync

Distributed function store with Async interface.

RegisteredDistributedFunction

Representing a single registered distributed function

WorkerRoleEntryPointUnit

WorkerRoleEntryPoint can be extended to run a Prajna worker service. The worker service will extend the class WorkerRoleEntryPoint with the following functions: Please note that the extended class will be serialized to the remote end. It is crucial to consider the data footprint in serialization for efficient execution.

WorkerRoleInstance<'StartParamType>

WorkerRoleInstance can be extended to run a Prajna worker service. Unlike WorkerRoleEntryPoint, WorkerRoleInstance is to be instantiated at the remote end so it is class member is not serialized.

WorkerRoleInstance

WorkerRoleInstance can be extended to run a Prajna worker service. Unlike WorkerRoleEntryPoint, WorkerRoleInstance is to be instantiated at the remote end so it is class member is not serialized.

WorkerRoleInstanceStartParam

This class contains the parameter used to start a multithreaded WorkerRoleInstance. The class (and if you have derived from the class, any additional information) will be serialized and send over the network to be executed on Prajna platform. Please fill in all class members that are not default.

Prajna.Service.CSharp Namespace

TypeDescription
ContractServerInfoLocal

Manifested list of servers to be used to launch services, import and export contract This class is a local manifestation of ContractServersInfo that is to be used.

ContractServersInfo

Specify servers to be used to launch services, import and export contract

ContractStore

ContractStore provides a central location for export/import contract

DistributedFunctionProvider

Infromation of distributed Function Provider To use distributed function,

RemoteInstance

Launching a PrajnaInstance on a group of remote nodes. serviceName: name of the serivce param: parameter to be called by OnStart serviceInstance: OnStart(param), OnStop(), Run(), IsRunning() call for the initiating of the service. You must derive serviceInstance from WorkerRoleInstance PrajnaInstance share similar characteristics with Prajnaservice, with characteristics below. 1. You can run Service on Azure VM or your own cluster in the data center. 2. You can host multiple worker role in a same remote program. 3. Service can interact (call each other) with each call being a function call. 4. You can perform Big data analytical tasks (map/filter/choose/collect, fold, map-reduce, sort, hash-join, cross-join, etc.) on data generated by Service 5. You can start Service with a parameter. 6. You can track debug output (log, stderr, stdout) of the remote service. But in addition, PrajnaInstance is 1. Initialied remotely (with a function that you have specified). As such, PrajnaInstance doesn't need to be serializable, and can contain heavy data element. 2. You may specify the number of thread to work on the PrajnaInstance (parameter specified in Start Parameter.

Prajna.Service.FSharp Namespace

TypeDescription
CacheService

Running a empty service, when the service is running, cache data will be hold at remote container.

ContractServerInfoLocal

Manifested list of servers to be used to launch services, import and export contract This class is a local manifestation of ContractServersInfo that is to be used.

ContractServersInfo

Specify servers to be used to launch services, import and export contract

ContractStore

ContractStore provides a central location for export/import contract

DefaultSerializerForDistributedFunction

Govern the behavior of the default serialization to be used

DistributedFunctionProvider

Infromation of distributed Function Provider To use distributed function

RemoteInstance

Launching a PrajnaInstance on a group of remote nodes. serviceName: name of the serivce param: parameter to be called by OnStart serviceInstance: OnStart(param), OnStop(), Run(), IsRunning() call for the initiating of the service. You must derive serviceInstance from WorkerRoleInstance PrajnaInstance share similar characteristics with Prajnaservice, with characteristics below. 1. You can run Service on Azure VM or your own cluster in the data center. 2. You can host multiple worker role in a same remote program. 3. Service can interact (call each other) with each call being a function call. 4. You can perform Big data analytical tasks (map/filter/choose/collect, fold, map-reduce, sort, hash-join, cross-join, etc.) on data generated by Service 5. You can start Service with a parameter. 6. You can track debug output (log, stderr, stdout) of the remote service. But in addition, PrajnaInstance is 1. Initialied remotely (with a function that you have specified). As such, PrajnaInstance doesn't need to be serializable, and can contain heavy data element. 2. You may specify the number of thread to work on the PrajnaInstance (parameter specified in Start Parameter.

WorkerRoleInstance<'StartParamType>

WorkerRoleInstance is extended to run a service. It is to be instantiated at the remote end so that it is class member does not have the constraint to be serializable.

WorkerRoleInstance

WorkerRoleInstance is extended to run a service. It is to be instantiated at the remote end so that it is class member does not have the constraint to be serializable.

WorkerRoleInstanceStartParam

This class contains the parameter used to start a multithreaded WorkerRoleInstance. The class (and if you have derived from the class, any additional information) will be serialized and send over the network to be executed on Prajna platform. Please fill in all class members that are not default.

Prajna.Service.KVStoreService Namespace

TypeDescription
KVStore<'K, 'V>

KV class implements a distributed key-value store.

Prajna.Tools Namespace

TypeDescription
ArgumentParser

Utility class to parse commandline argument. Each argument is in the form of -pattern param, and the programmer can supplied a default value for each parameter. Please note that the pattern is case insensitive prefix matched, so pattern -dir will match "-directory" "-DIRECT". Please design your commandline argument pattern with different prefix.

BufferListStream<'T>
BytesCompare

Compare byte[], note that the default comparison of byte[] is Reference Equality

CustomizedDeserializerFunction

Programmer will implementation CustomizedSerializerAction of Func to customarily deserialize an object

CustomizedSerializerAction

Programmer will implementation CustomizedSerializerAction of Action to customarily serialize an object

ExpandableBuffer

ExpandableBuffer wraps around a bytearray object that can be extended in both direction, front & back The valid bytes in the Buffer is between Head & Tail. The current implementation of expandableBuffer is not threadsafe, and should not be used in multiple thread environment.

ILoggerProvider
IRefCounter<'K>
IdCounter
LogLevel

Prajna Trace level, the lower the level, the more important of the message.

Logger

Logger

MemStream
MemoryStreamB
RBufPart<'T>
RandomWithSalt

This class is created for initialization of Random(), in which the Random generator can be correlated as they have the same time signature. A salt is added to make sure that the resultant random number is different based on different salt value.

RefCntBuf<'T>
RefCntList<'T, 'TBase>
RefCountBase
ReferenceComparer<'T>

Construct a comparer that uses Object.ReferenceEquals to compare object.

SafeRefCnt<'T>
StreamBase<'T>
StreamBaseByte
StreamBaseCounter
StreamBaseExtension

Extensions to StreamBase to allow for custom serialization

StreamExtension

Extension Methods for System.IO.Stream

StringExtension

Extension Methods for System.String

StringTComparer<'T>

Construct a comparer to quick compare String*'T. The class is constructured to take a comparer of string, and a type T that supports equality, and construct a new comparer

UnitAction

UnitAction represent one function to be checked during the wake up of ThreadPool wait. For performance reason, it is important to only put light function in this loop. Any heavy operation should be forked to be executed on another thread/task.

WebCache

Helper class for caching web object.

ModuleDescription
BytesTools

A set of helper routine for byte[] operations

FileTools

A set of helper routine for file operations

GenericSerialization
Hash
HttpBuilderHelper

Helper function to form a properly formatted HTTP page

Runtime

Runtime related information

StringTools

A set of helper routine for string operations

Utils

Utilities

Prajna.Tools.CSharp Namespace

TypeDescription
Logger

Provides logging interface and utility functions.

Prajna.Tools.FSharp Namespace

TypeDescription
LogLevel

LogLevel

Logger

Provides logging interface and utility functions.

Prajna.Tools.Network Namespace

TypeDescription
Component<'T>

A component class provides a generic tool to build a processing pipeline using a threadpool It provides the following functionality: 1. An arbitrary object (an item of type 'T) is dequeue from a queue - a queue must have a BaseQ as a base class 2. The object is repeatedly "processed" until the processing says it is finished by arbirary piece of processing code The processing code returns a tuple of (bool, ManualResetEvent): (complete, event) When complete == true, then item has completed and new item is to be dequeued When event <> null, then processing cannot continue and must wait for event to fire before trying again There may be cases when complete is true, but event is not null, in these cases, processing waits for event to fire However, if complete is false, event must be non-null The processing may occur on its own thread or on a threadpool If event <> null, - If threadpool is being used, the component processing is removed from the threadpool work item queue and gets requeued once event fires - If processing is occuring on own thread, then that thread blocks for event to fire There is also support for multiple processing steps to take place in a single item

GenericBuf

A class capable of reading/writing a buffer asynchronously using an underlying connection

GenericConn

A generic connection which processes SocketAsyncEventArgs

GenericNetwork

base class which maintains multiple GenericConn connections which - share a common pool of SocketAsyncEventArgs which are processed by a superclass along with - share a threadpool for receiving and sending

GenericVal<'V>

A class capable of reading/writing value types asynchronously using an underlying connection

IConn

A generic interface for a connection

LocalDNS

DNS helper functions. Cannot instantiate class, only contains static members.

NetUtils

Abstract Class with static members for network utility functions

Network

maintains multiple network connections

RefCntBufSA

Prajna.Tools.Queue Namespace

TypeDescription
BaseQ<'T>

The base class for various concurrent queue structures with and without flow control logic all enqueue/dequeue methods return (success, waithandle) in all classes 1. GrowQ: No limit on queue growth 2. FixedLenQ: Growth limited by queue length 3. FixedSizeQ: Growth limited by queue "size", where "size" is sum of all element sizes

Prajna.WCFTools Namespace

TypeDescription
HttpTemplateBuilder

Helper class to build HTML page based on template for WCF services.

HttpTools

Helper class to form a HTML page

ModuleDescription
SafeHttpBuilderHelper

Helper class for string to be used in browser.

Prajna.WPFTools Namespace

TypeDescription
GeneralTab

A Customized Tab Control

GridWithScrollBar

A Grid with both horizontal and vertical scroll bar

GridWithStringContent

A Grid with Scrollbar, in which each element and column head of the Grid is a string

ScrollFileWindow

A WPF window that display a large text file

TabWindowWithLog

The collection of UI include a set of tabbed window and a trace log window

WindowWithMenu

A window UI with a menu

Fork me on GitHub