Prajna


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.

Constructors

ConstructorDescription
new()
Signature: unit -> RemoteInstance

Static members

Static memberDescription
IsRunningLocal(serviceName)
Signature: serviceName:string -> bool

Is a local instance still running

Start(...)
Signature: (serverInfo:ContractServersInfo * serviceName:string * param:'StartParamType * func:(unit -> 'RType)) -> unit
Type parameters: 'StartParamType, 'RType

Launching Prajna Service on a group of remote nodes. serviceName: name of the serivce serverInfo: information of the server param: parameter to be called by OnStart, must derive from WorkerRoleInstanceStartParam func: the function to initialized the WorkerRoleInstance. This function will be executed as a closure remotely. The returned class must derive from WorkerRoleInstance.

Start(serviceName, func)
Signature: (serviceName:string * func:(unit -> 'RType)) -> unit
Type parameters: 'RType

Launching Prajna Service on a group of remote nodes. serviceName: name of the serivce param: parameter to be called by OnStart, must derive from WorkerRoleInstanceStartParam func: the function to initialized the WorkerRoleInstance. This function will be executed as a closure remotely. The returned class must derive from WorkerRoleInstance.

Start(serviceName, param, func)
Signature: (serviceName:string * param:WorkerRoleInstanceStartParam * func:(unit -> 'RType)) -> unit
Type parameters: 'StartParamType, 'RType

Launching Prajna Service on a group of remote nodes. serviceName: name of the serivce param: parameter to be called by OnStart, must derive from WorkerRoleInstanceStartParam func: the function to initialized the WorkerRoleInstance. This function will be executed as a closure remotely. The returned class must derive from WorkerRoleInstance.

Start(cl, serviceName, param, func)
Signature: (cl:Cluster * serviceName:string * param:'StartParamType * func:(unit -> 'RType)) -> unit
Type parameters: 'StartParamType, 'RType

Launching Prajna Service on a group of remote nodes. serviceName: name of the serivce param: parameter to be called by OnStart, must derive from WorkerRoleInstanceStartParam func: the function to initialized the WorkerRoleInstance. This function will be executed as a closure remotely. The returned class must derive from WorkerRoleInstance.

StartLocal(serviceName, func)
Signature: (serviceName:string * func:(unit -> 'RType)) -> unit
Type parameters: 'RType

Launching Instance locally. serviceName: name of the serivce param: parameter to be called by OnStart, must derive from WorkerRoleInstanceStartParam func: the function to initialized the WorkerRoleInstance. This function will be executed as a closure remotely. The returned class must derive from WorkerRoleInstance. Return: toStop (a function can be called to terminate the current RoleInstance). isRunning ( a Func that can be called to evaluate if the current RoleInstance is still running)

StartLocal(serviceName, param, func)
Signature: (serviceName:string * param:'StartParamType * func:(unit -> 'RType)) -> unit
Type parameters: 'StartParamType, 'RType

Launching Instance locally. serviceName: name of the serivce param: parameter to be called by OnStart, must derive from WorkerRoleInstanceStartParam func: the function to initialized the WorkerRoleInstance. This function will be executed as a closure remotely. The returned class must derive from WorkerRoleInstance. Return: toStop (a function can be called to terminate the current RoleInstance). isRunning ( a Func that can be called to evaluate if the current RoleInstance is still running)

Stop(serverInfo, serviceName)
Signature: (serverInfo:ContractServersInfo * serviceName:string) -> unit

Stopping services on a set of servers

Stop(serviceName)
Signature: serviceName:string -> unit

Stopping Service on a group of remote nodes.

Stop(cl, serviceName)
Signature: (cl:Cluster * serviceName:string) -> unit

Stopping Service on a group of remote nodes.

StopLocal(serviceName)
Signature: serviceName:string -> unit

Stop a local instance

Fork me on GitHub