This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// Cloud workflow expression builder | |
| type CloudBuilder () = | |
| member __.Return (t : 'T) = ... | |
| member __.Zero () = ... | |
| member __.Delay (f : unit -> Cloud<'T>) : Cloud<'T> = ... | |
| member __.ReturnFrom (c : Cloud<'T>) = ... | |
| member __.Combine(f : Cloud<unit>, g : Cloud<'T>) = ... | |
| member __.Bind (f : Cloud<'T>, g : 'T -> Cloud<'S>) : Cloud<'S> = bind f g | |
| member __.Using<'T, 'U, 'p when 'T :> IDisposable>(value : 'T, bindF : 'T -> Cloud<'U>) : Cloud<'U> = ... | |
| member __.Using<'T, 'U when 'T :> ICloudDisposable>(value : 'T, bindF : 'T -> Cloud<'U>) : Cloud<'U> = ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| static member Parallel (computations : seq<Cloud<'T>>) : Cloud<'T []> = cloud { | |
| let! runtime = Cloud.GetResource<IRuntimeProvider> () | |
| let workflow = runtime.ScheduleParallel (computations |> Seq.map (fun c -> c,None)) | |
| return! Cloud.WithAppendedStackTrace "Cloud.Parallel[T](seq<Cloud<T>> computations)" workflow | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="utf-8"?> | |
| <configuration> | |
| <appSettings> | |
| <!-- hostname that uniquely and globally identifies the host machine of the daemon. This can be an IP address. --> | |
| <add key="hostname" value="" /> | |
| <!--- IP addresses the daemon will listen on. Separate with commas. If empty then the daemon will listen on all local interfaces. --> | |
| <!-- <add key="listen ips" value="192.168.1.10, 10.10.10.10"/> --> | |
| <!-- Primary TCP port --> | |
| <add key="primary port" value="2675" /> | |
| <!-- available ports for mbrace workers. e.g: 30000-30042 --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let nodes = | |
| [ | |
| MBraceNode.Connect("10.0.1.4", 2675) | |
| MBraceNode.Connect("10.0.1.5", 2675) | |
| MBraceNode.Connect("10.0.1.6", 2675) | |
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let nodes = | |
| [ | |
| MBraceNode.Connect("hostname1", 2675) | |
| MBraceNode.Connect("hostname1", 2675) | |
| MBraceNode.Connect("hostname1", 2675) | |
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| MBraceSettings.DefaultStore <- AzureStore.Create(accountName = "your name", accountKey = "your key") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| MBraceSettings.DefaultStore <- FileSystemStore.Create @"\\path\to\shared" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let config = | |
| { | |
| Configuration.Default with | |
| StorageConnectionString = "<storage connection string>" | |
| ServiceBusConnectionString = "<service bus connection string>" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let runtime = Runtime.GetHandle(config) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let runtime = MBrace.Boot nodeslet runtime = MBrace.Boot(nodes, store = azureStore) |