mbraceproject/MBrace.Core
50.6
Weak · 24 September 2026
20.9k
lines of production code
F#
with C#
5
measurements over time
What this system is
MBrace is a distributed computing framework that enables parallel processing and stream-based data analysis across a cluster of workers. It provides high-level APIs, such as CloudFlow and CloudCollection, to define and execute fault-tolerant workflows and manage persistent state like distributed dictionaries and queues. The system relies on the Thespian actor model to handle process scheduling, worker management, and cluster state tracking, supported by a modernized .NET Core build infrastructure.
Features
Add C\# and F\# samples for MBrace CloudFlow and Thespian
Added new sample scripts demonstrating the use of MBrace's distributed computing capabilities. The C\# script (cloudflow.csx) showcases parallel workflows and caching using the Thespian cluster, while the F\# script (wordcount.fsx) implements a distributed word count algorithm using CloudFlow. These samples provide practical examples for users to understand and implement cloud-based parallel processing in both C\# and F\#.
samples · high confidence
Add C\# wrappers for MBrace Cloud and CloudFlow workflows
New C\# extension methods are introduced in the MBrace.CSharp library to enable cloud workflow composition. The \CloudBuilder\ class provides factory methods (e.g., \FromValue\, \Delay\, \Bind\) and logging utilities, while the \CloudFlow\ class exposes distributed data processing operations such as \OfArray\, \OfCloudCollection\, and \OfCloudFiles\. These additions allow C\# developers to construct and execute distributed cloud workflows and flows directly.
src/MBrace.CSharp · high confidence
Add MBrace.Thespian.StandaloneClient sample project
A new sample project, MBrce.Thespian.StandaloneClient, has been added to demonstrate running MBrace on a local machine using the Thespian worker. The sample includes a F\# entry point that initializes a two-node cluster and executes a simple computation, with dependencies on FSharp.Core, FsPickler, Vagabond, Thespian, and Argu.
samples/MBrace.Thespian.StandaloneClient · high confidence
Added utility modules for concurrency, caching, and cross-platform support
The MBrace.Runtime.Utils namespace now includes new utility modules: Concurrency.fs provides thread-safe atomic containers and a thread-safe cache with expiry semantics; InMemoryCache.fs wraps System.Runtime.Caching.MemoryCache for in-memory caching; Reflection.fs adds helpers for resolving generic interfaces and matching F\# function types; Retry.fs implements a retry policy system with exponential backoff; Serialization.fs adds object size counting and sequence partitioning by size; String.fs provides a base32 encoding scheme and string builder utilities; TypePrinter.fs offers pretty-printing for type names; Utils.fs contains general helpers like environment variable resolution and hash code generation; WorkItemExecutionMonitor.fs enables cooperative tracking of closed multi-threaded computations; and XPlat.fs adds cross-platform detection for OS and .NET runtime. These changes enhance runtime reliability, cross-platform compatibility, and internal utility support.
src/MBrace.Runtime/Utils · high confidence
Introduce CloudFlow as a new distributed stream processing API
The MBrace.Flow library introduces a new \CloudFlow\<'T\>\ type and a comprehensive set of combinators (such as \map\, \filter\, \fold\, \sortBy\, \persist\, and \cache\) for processing distributed data streams. This new API, which depends on the \Nessos.Streams\ library, provides fluent extension methods and static factory methods to construct flows from arrays, cloud collections, files, and directories. The change also includes a \PersistedCloudFlow\ type for handling long-running or large-scale data that needs to be persisted across the cluster, along with utility functions for partitioning and size formatting.
src/MBrace.Flow · high confidence
Introduce CloudProcess, FaultPolicy, and ParallelismProvider APIs for distributed execution
Added new core types and methods to support distributed cloud workflows. CloudProcess and ICloudProcess provide a unified interface for tracking and awaiting distributed tasks, including WaitAsync, WhenAny, and WhenAll combinators. FaultPolicy is now a proper interface with default properties on MBraceClient, enabling dynamic fault handling. IParallelismProvider replaces the previous runtime provider, exposing scheduling, worker management, and fault policy configuration. These changes allow users to manage long-running cloud processes, handle faults with configurable policies, and execute parallel computations across workers.
src/MBrace.Core/Distribution · high confidence
Introduce cloud process and work item runtime components
The MBrace.Runtime library now includes new core runtime components for managing cloud computations. A new \CloudProcess\ type and associated \ProcessManager\ provide the foundation for tracking and controlling long-running cloud tasks, including support for asynchronous waiting (\WaitAsync\) and log retrieval. A \CloudWorkItem\ type and \WorkerManager\ have been added to handle the scheduling, execution, and fault handling of individual work units across the cluster. Additionally, a \PerformanceMonitor\ has been introduced to collect and report node-level metrics such as CPU and memory usage, while a \ClosureSiftManager\ and \StoreCloudValue\ components have been added to optimize large closure serialization and cloud value storage.
MBrace.Runtime · high confidence
Introduce continuation-based Cloud and LocalCloud workflows
The MBrace.Core library now implements a new continuation-based model for distributed and local workflows. This introduces the \Cloud\<'T\>\ type for distributed computations and \LocalCloud\<'T\>\ for local, non-distributable ones. The change includes a new \ExecutionContext\ to manage state and resources, a \ResourceRegistry\ for managing serializable resources, and an \ICloudCancellationToken\ for distributed cancellation. Users can now leverage these new types to define and execute cloud workflows with improved support for cancellation, resource management, and local execution contexts.
src/MBrace.Core/Continuation · high confidence
Introduce core utility modules for async, exception handling, and I/O
Added new internal utility modules to MBrace.Core/Utils, including AsyncExtensions for improved Task and Async interop (e.g., AwaitTaskCorrect, WithTimeout, RunSync), ExceptionDispatchInfo for preserving stack traces, Trampoline for managing call depth and thread pool offloading, and TextReaders for efficient line-based stream reading. These additions support more robust error handling, better performance, and safer async execution in the core library.
src/MBrace.Core/Utils · high confidence
Introduce new components for persisted values, process monitoring, and JSON-based logging
Added three new components in the runtime: a PersistedValueManager to handle serializing and storing large objects to cloud storage, a ProcessMonitor to spawn and automatically restart child processes, and a StoreJsonLogger that batches and persists log entries as JSON files. These changes provide new capabilities for data persistence, process management, and structured logging within the runtime environment.
src/MBrace.Runtime/Components · high confidence
Introduced core runtime components for distributed computation and cancellation
Added new files to the MBrace.Runtime project to support distributed execution and state management. This includes the AssemblyManager for handling Vagabond assembly uploads and dependencies, a CloudCancellationToken implementation for managing distributed cancellation tokens, and combinators for parallel and choice workflows. The MBraceClient class was added to provide a high-level API for submitting cloud processes, managing workers, and handling fault policies. Additionally, logging and serialization infrastructure was introduced, including the CloudLogEntry structure, ICloudLogManager and ILocalSystemLogManager interfaces, and FsPickler-based serializers for binary, XML, and JSON formats.
src/MBrace.Runtime/Runtime · high confidence
Introduces new core abstractions for cloud collections, workflows, and persistence
The library now includes new implementations for distributed and local collection processing, including \CloudCollectionUtils\ for handling \ICloudCollection\ and \IPartitionedCollection\ interfaces, and \CloudWorkflows\ for sequential and parallel collection combinators. Additionally, \DomainLocal\ provides thread-local value initialization, \FileStoreExtensions\ adds upload/download capabilities for cloud files, and \PersistedSequence\/\PersistedValue\ enable serializable, immutable references to cloud-persisted data and sequences.
src/MBrace.Core/Library · high confidence
Local file system and caching store implementations
Added new local file system store and file store cache implementations for MBrace.Runtime. The FileSystemStore provides a concrete ICloudFileStore backed by the local file system, supporting case-sensitivity detection, last-modified-time retrieval, and standard file operations. The FileStoreCache wraps a remote ICloudFileStore with a local cache, enabling transparent caching of remote files to the local file system to improve performance and reduce remote access.
src/MBrace.Runtime/Store · high confidence
MBrace.Thespian client and runtime implementation
The MBrace.Thespian library is now implemented in F\# (Client.fs, Config.fs, etc.), providing the core runtime and client API for managing distributed computations. This includes the ThespianWorker class for controlling worker processes, configuration management for local directories and TCP ports, and a new ConsoleLogger for system logging. The implementation exposes key types like CloudProcess, SystemLogEntry, and various serializers (FsPickler, Json.Net) to the MBrace.Thespian namespace, enabling users to spawn, monitor, and interact with MBrace clusters.
src/MBrace.Thespian · high confidence
Migrate MBrace.Core to .NET Core and modernize build infrastructure
The project has been migrated to .NET Core, enabling cross-platform support on Linux and macOS as indicated by the new \.travis.yml\ configuration. The build system has been modernized by introducing a FAKE-based \build.fsx\ script and a \Directory.Build.props\ file for centralized MSBuild properties. Additionally, the solution structure has been reorganized to include distinct projects for C\# interop (\MBrace.CSharp\), the core library (\MBrace.Core\), and the runtime foundation (\MBrace.Runtime\), alongside updated test suites.
(repo-wide) · high confidence
Refactored MBrace.Core store primitives and added new distributed storage types
The MBrace.Core store module has been refactored to introduce new distributed storage abstractions: CloudAtom for atomic updates, CloudDictionary for key-value pairs, CloudQueue for message queues, and CloudValue for cached objects. The file CloudFileStore.fs was added to define the ICloudFileStore interface and related utilities, while CloudCollection.fs introduces ICloudCollection and partitioning interfaces. Additionally, the Serializer.fs file was added to provide serialization and deserialization capabilities for cloud values.
src/MBrace.Core/Store · high confidence
Thespian-based distributed primitives for MBrace
The MBrace.Thespian library now provides actor-based implementations for core distributed primitives, including CloudDictionary, CloudAtom, CloudQueue, and ICloudCounter. These new components enable developers to leverage Thespian actors for reliable, concurrent state management and message passing within the MBrace runtime, supporting features like batch dequeuing for queues and transactional updates for dictionaries and atoms.
src/MBrace.Thespian/Primitives · high confidence
Behavioural changes
1 commit (0 fixes) modifying resource
A change to existing behaviour in resource — 1 commit, 2 files.
resource · medium confidence · unverified
Introduce ProcessManager and WorkerManager actors for cluster state tracking
The runtime now includes dedicated actor-based managers for tracking cluster state. The new ProcessManager actor manages the lifecycle of cloud processes, allowing the system to create, retrieve, and clear process entries. Simultaneously, the WorkerManager actor handles worker registration, status declarations, and performance metrics. A key behavioral change is the introduction of a heartbeat monitoring system that tracks worker liveness and declares workers as dead if they fail to send heartbeats within the specified threshold, ensuring the cluster maintains an accurate view of available workers.
src/MBrace.Thespian/Runtime · high confidence
MBrace.Thespian runtime core refactored into new files
The MBrace.Thespian runtime has been reorganized into new source files: LocalState.fs defines the local node state and serialization; ProcessEntry.fs implements the CloudProcess entry point with status and work item tracking; ClusterState.fs manages the cluster state, worker, and process managers; WorkItemQueue.fs handles distributed work item queuing and lease management; Utils.fs provides actor and queue utilities; and Subscription.fs manages worker subscriptions and evaluation. These files collectively implement the core runtime infrastructure for managing cloud processes, work items, and worker interactions.
MBrace.Thespian · high confidence
Refactor MBrace.Thespian worker into modular components with configurable runtime options
The MBrace.Thespian worker logic has been restructured into separate modules for configuration, controller, and entry point, enabling better separation of concerns. Users can now configure worker behavior via command-line arguments, including setting the log level, specifying log file paths, enabling quiet mode, and adjusting the heartbeat interval and threshold for worker health checks. The worker also supports configuring the maximum number of concurrent work items and enabling AppDomain isolation, providing finer control over resource usage and process isolation.
src/MBrace.Thespian/Worker · high confidence
Refactored CloudFlow consumer implementations into dedicated modules
The CloudFlow consumer implementations, including distinct, fold, sort, take, and transformers, have been refactored into separate, dedicated files (Distinct.fs, Fold.fs, NonDeterministic.fs, Sort.fs, Take.fs, Transformers.fs) within the Consumers directory. This change organizes the codebase by separating each consumer's logic into its own module, improving code structure and maintainability without altering the external API.
src/MBrace.Flow/Consumers · high confidence
Refactored CloudFlow producers for improved parallelism and partitioning
The CloudFlow producers in MBrace.Flow have been refactored to improve parallelism and partitioning logic. Array and CloudCollection producers now support targeted worker assignment and weighted partitioning, allowing better distribution of work across available workers. The CloudQueue producer has been updated to support degree of parallelism and targeted worker support, ensuring more efficient processing of incoming messages. These changes enhance throughput and resource utilization in distributed computing scenarios.
src/MBrace.Flow/Producers · medium confidence
Rename Main.fs to Main.fs and update FSharp.Core reference
The main entry point file for the MBrace Thespian Worker has been renamed from 'main.fs' to 'Main.fs' to follow standard casing conventions. Additionally, the project's FSharp.Core dependency has been updated in the paket.references file, ensuring the correct version of the F\# core library is used by the worker.
src/MBrace.Thespian.Worker · medium confidence
Test coverage
Add core unit tests for CloudFlow, parallelism, and partitioning; Added C\# test suite for MBrace Cloud and CloudFlow; Added in-memory runtime tests for file system and thread pool execution; Added unit tests for MBrace.Thespian runtime; Added unit tests for core store primitives.
Dependencies
Migrate to Paket for dependency management
The project has migrated from NuGet to Paket for managing dependencies. This introduces \paket.dependencies\ and \paket.lock\ files to define package versions and constraints for the main, test, FSI, and build groups. Key dependencies such as FSharp.Core, FsPickler, Vagabond, and Thespian are now managed through this new system, ensuring consistent and reproducible builds.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 49 → 51 (+1.4)
- Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 93 → 95 (+2.3)
- Architecture 93 → 92 (-0.9)
- Maturity 35 → 47 (+12.3)
- Readiness 39 → 37 (-1.8)
- Security 100 → 73 (-26.7)
- Performance 70 → 70 (+0.0)
Resolved (33)
- Duplicate intent: creating an 'Some' option from a value
- Duplicated block (10 lines × 2) (src/MBrace.CSharp/Cloud.cs)
- Duplicated block (11 lines × 2) (src/MBrace.CSharp/Cloud.cs)
- Duplicated block (11 lines × 2) (src/MBrace.CSharp/Cloud.cs)
- Duplicated block (12 lines × 2) (src/MBrace.CSharp/Cloud.cs)
- Duplicated block (14 lines × 2) (src/MBrace.CSharp/Cloud.cs)
- Duplicated block (15 lines × 2) (src/MBrace.CSharp/Cloud.cs)
- Duplicated block (15 lines × 2) (src/MBrace.CSharp/Cloud.cs)
- Duplicated block (15 lines × 5) (src/MBrace.CSharp/CloudFlow.cs)
- Duplicated block (16 lines × 2) (src/MBrace.CSharp/Cloud.cs)
- Duplicated block (21 lines × 2) (src/MBrace.CSharp/Cloud.cs)
- Duplicated block (21 lines × 2) (src/MBrace.CSharp/Cloud.cs)
- Duplicated block (6 lines × 2) (src/MBrace.Thespian/Primitives/CloudAtom.fs)
- Duplicated block (7 lines × 2) (src/MBrace.Runtime/Runtime/WorkItemEvaluator.fs)
- Duplicated block (8 lines × 2) (src/MBrace.Runtime/Runtime/ThreadPool/ThreadPoolCombinators.fs)
- Duplicated block (8 lines × 2) (src/MBrace.Runtime/Runtime/ThreadPool/ThreadPoolCombinators.fs)
- Duplicated block (9 lines × 2) (src/MBrace.Runtime/Runtime/ThreadPool/ThreadPoolCombinators.fs)
- Duplicated block (9 lines × 2) (src/MBrace.Runtime/Runtime/ThreadPool/ThreadPoolCombinators.fs)
- Inconsistent handling of empty/none states
- Navigability not included (check did not complete)
- …and 13 more
New (82)
- Ambiguous intent between Cache and Persist. In many data processing libraries, Cache implies in-memory or temporary storage for reuse within the same execution context, while Persist implies durable storage. However, without clear documentation or distinct return types (e.g., PersistedCloudFlow vs CloudFlow), users may confuse when to use which. Persist returns PersistedCloudFlow, which is good, but Cache also returns PersistedCloudFlow. This suggests they might be functionally similar or that Cache is just a convenience wrapper for Persist with default settings.
- Array.splitWeightedRange (cognitive 28) (src/MBrace.Core/Utils/Utils.fs)
- BuilderImpl.tryFinally (cognitive 19) (src/MBrace.Core/Continuation/Builders.fs)
- CloudCollection.PartitionBySize (cognitive 38) (src/MBrace.Core/Library/CloudCollectionUtils.fs)
- CloudCollection.PartitionBySize (cyclomatic 25) (src/MBrace.Core/Library/CloudCollectionUtils.fs)
- CloudCollection.ToCloudFlow (cognitive 32) (src/MBrace.Flow/Producers/CloudCollection.fs)
- CloudCollection.ToCloudFlow (cyclomatic 17) (src/MBrace.Flow/Producers/CloudCollection.fs)
- Combinators.Choice (cognitive 27) (src/MBrace.Runtime/Runtime/ThreadPool/ThreadPoolCombinators.fs)
- Combinators.Choice (cyclomatic 16) (src/MBrace.Runtime/Runtime/ThreadPool/ThreadPoolCombinators.fs)
- Combinators.Parallel (cognitive 35) (src/MBrace.Runtime/Runtime/ThreadPool/ThreadPoolCombinators.fs)
- Combinators.Parallel (cyclomatic 22) (src/MBrace.Runtime/Runtime/ThreadPool/ThreadPoolCombinators.fs)
- Combinators.runChoice (cognitive 30) (src/MBrace.Runtime/Runtime/Combinators.fs)
- Combinators.runChoice (cyclomatic 16) (src/MBrace.Runtime/Runtime/Combinators.fs)
- Combinators.runParallel (cognitive 38) (src/MBrace.Runtime/Runtime/Combinators.fs)
- Combinators.runParallel (cyclomatic 21) (src/MBrace.Runtime/Runtime/Combinators.fs)
- Documentation: no installation or build instructions (README.md)
- Duplicated block (10 lines × 2) (src/MBrace.Core/Library/StoreClient.fs)
- Duplicated block (10 lines × 2) (src/MBrace.Runtime/Runtime/Combinators.fs)
- Duplicated block (10 lines × 5) (src/MBrace.CSharp/CloudFlow.cs)
- Duplicated block (10–11 lines × 2) (src/MBrace.Runtime/Runtime/Combinators.fs)
- …and 62 more
Architecture
- Containers 0 added · 0 removed · contexts 1 added · 0 removed · edges 3 added · 0 removed
Added bounded contexts (1)
- MBrace.Core
Added dependency edges (3)
- MBrace.Runtime → MBrace.Core (coupling)
- MBrace.Thespian → MBrace.Core (coupling)
- MBrace.Thespian → MBrace.Runtime (coupling)
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
mbraceproject/MBrace.Core was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 24 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 210475780f9344264b652858148ca6d0ced41856 — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-923689c465cf.