MBrace.Core and MBrace.Azure


Using MBrace with a Locally Simulated Cluster

To use a locally simulated cluster,

  1. Download or clone the starter pack.
  2. Build the solution to get the required packages.
  3. Open the first tutorial script and to use MBrace programming with your simulated cluster.

The scripts follow the tutorials in the Core Programming Model.

The locally simulated cloud fabric is called "MBrace.Thespian". This utilizes the multi-core capabillities of your machine and is independent of any particular cloud provider, but supports the same programming model as MBrace.Azure and other MBrace implementations. This lets you learn the MBrace cloud programming model in a provider-independent way.

Initializing Thespian Manually

Your cluster workers will be created automaticaly when using the scripts in the starter pack. You can also initialize manually (e.g. from an application) as follows:

1: 
2: 
3: 
4: 
5: 
open MBrace.Thespian
let cluster = 
    ThespianCluster.InitOnCurrentMachine(workerCount = 4, 
                                         logger = ConsoleLogger(), 
                                         logLevel = LogLevel.Info)

You can create a multi-machine cluster using instances of ThespianWorker and InitOnWorker. This is not covered in this tutorial.

namespace MBrace
namespace MBrace.Thespian
val cluster : ThespianCluster

Full name: Thespian-tutorial.cluster
type ThespianCluster =
  inherit MBraceClient
  private new : state:ClusterState * logLevel:LogLevel option * defaultFaultPolicy:FaultPolicy option -> ThespianCluster
  private new : state:ClusterState * manager:IRuntimeManager * defaultFaultPolicy:FaultPolicy option -> ThespianCluster
  member AttachNewLocalWorkers : workerCount:int * ?logLevel:LogLevel * ?quiet:bool -> unit
  member AttachWorker : worker:ThespianWorker -> unit
  member DetachWorker : worker:IWorkerRef -> unit
  member KillAllWorkers : unit -> unit
  member KillWorker : worker:IWorkerRef -> unit
  member IsWorkerHosted : bool
  member MasterNode : ThespianWorker option
  ...

Full name: MBrace.Thespian.ThespianCluster
static member ThespianCluster.InitOnCurrentMachine : workerCount:int * ?hostClusterStateOnCurrentProcess:bool * ?fileStore:MBrace.Core.Internals.ICloudFileStore * ?faultPolicy:MBrace.Core.FaultPolicy * ?resources:MBrace.Core.Internals.ResourceRegistry * ?quiet:bool * ?logger:MBrace.Runtime.ISystemLogger * ?logLevel:LogLevel -> ThespianCluster
type ConsoleLogger = MBrace.Runtime.ConsoleLogger

Full name: MBrace.Thespian.ConsoleLogger
type LogLevel = MBrace.Runtime.LogLevel

Full name: MBrace.Thespian.LogLevel
MBrace.Runtime.LogLevel.Info: MBrace.Runtime.LogLevel = 4
Fork me on GitHub