ledjon-behluli / orleanspaces Goto Github PK
View Code? Open in Web Editor NEWA virtual, fully-asynchronous, Tuple Space implementation backed by Orleans.
License: Apache License 2.0
A virtual, fully-asynchronous, Tuple Space implementation backed by Orleans.
License: Apache License 2.0
Makes it more feasible to work with the generic tuples as a whole array can be passed as opposed to array elements.
This is useful when clients build an array of elements in a loop and want to pass it down, or if they already get an array from a source that they can not control
In certain cases like where the agent is used to perform only writes, or the application needs fast startup times, it is useful to allow a configurable way to load (or not) the space contents. Best way is to have this on the SpaceOptions.
The functionality needs to be complimented via a new method on the ISpaceAgent (and generic versions) called ReloadAsync
which acts as loading the space for agents that have been configured to NOT load space upon startup, or in general a reload of the space (for whatever reasons)
In SpaceTuple.cs, I modified to avoid crash:
public override string ToString() => fields == null ? "!! fields is null !!" : $"({string.Join(", ", fields)})";
Run Concurrent:
...
READER 0: (exchange-key, 0)
READER 4: !! fields is null !!
READER 6: (exchange-key, 6)
...
Usually 1 or two Readers have null fields.
Adjust OSA003 to NOT report on direct array passing because of #6
Partitioning the space for each space kind allows us to avoid performance impacts due to frequent updates to a large list of tuples, because each update involves serializing and persisting the entire dataset.
Hi,
Is this project production ready?
Enhance 'AddOrleanSpace()' on the silo builder by means of accepting 2 optional options configs.
public static ISiloBuilder AddOrleanSpaces(
this ISiloBuilder builder,
Action<SpaceServerOptions>? configureServerOptions = null,
Action<SpaceClientOptions>? configureClientOptions = null)
{
...
}
If user provides an non-null configureClientOptions
and specifies SpaceKind.XXX
then that space (therefor also the agent) is available in the silo too.
Agents must rehydrate their state upon startup, this is missing currently and needs to be resolved
SpaceTuple(1, 1, 1)
-> IntTuple(1, 1, 1)
SpaceTuple('a', 'b', 'c')
-> CharTuple('a', 'b', 'c')
While getting all data collected from the director grain is the more efficient way, since it involves n + 1 calls, where n is the number of
partitions (i.e. store grains), and 1 is a call from the agent to the director, and all calls to the store grains are done in parallel via Task.WhenAll. We need to keep in-mind the potential size of the whole tuple space, so when the number of partitions grows a lot, this call to the director might result in contention for ThreadPool threads and may lead to thread starvation, therefor degrading performance.
An alternative is for the director to expose an IAsyncEnumerable way to load the data, where each call to it will result in a single batch of loading the data. This "batch" basically means the director calls the store grains one-by-one and streams back the result which the agent call append to its in-memory dataset. This does result in a slower loading of the whole tuple space, as there are 2*n calls, each time a call to the director + 1 call to the partition of a store, but ultimately should not lead to potential thread starvation.
We should have a configurable behavior for this in the SpaceClientOptions.
Both methods should enumerate only tuples that match the given template, or in cases when template = default, than it should enumerate all tuples in the respective space(s).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.