Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

High Availability #120

Merged
merged 336 commits into from
Feb 16, 2018
Merged

High Availability #120

merged 336 commits into from
Feb 16, 2018

Conversation

yatli
Copy link

@yatli yatli commented Aug 15, 2017

Do not merge; Currently for unit testing purpose.

@@ -194,11 +194,11 @@ static Storage()
#endregion

#region Message Sending Interfaces
internal abstract void SendMessage(TrinityMessage message);
internal abstract void SendMessage(TrinityMessage message, out TrinityResponse response);
protected internal abstract void SendMessage(TrinityMessage message);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Message passing interfaces may require further polishing:

  1. The ability to send a message to a cell (chunk routing)
  2. The ability to set message passing semantics (RR/All/LB/FirstAvailable etc.)
  3. The ability to create a "transaction": a transaction is a set of servers, that every message to one partition(AG) will be deterministically sent to a server in the transaction set. This guarantees that the messages within a transaction effectively share a context, without excessive synchronization. When the transaction ends, we can further "commit" this to the whole memory cloud.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yatao All of the things you enumerate here are of critical importance particularly in our use-case and application area of Ontological Semantic Reasoning in what we call Multi-Zoned Ontology (multiple AGs) with Global Semantic Event projection and Query/Answer Reasoning.

In an actual product scenario like ours, client's *KBs in the SF/GE Distributed (RDF+) member cloud is logically partition via secured licensed ID but the low-level distributed parsing, reasoning is local to entire cluster(s). So I need to be able to send(message) data using a variety of methods (i.e., direct message, Azure Events, Reliable Queues...).

*KB - def. W3C OWL 2 Full/DL Representation of Knowledge
*(RDF+) - def. Our Extended RDF Theoretic Graph Representation and Grafting Engine with FanoutSearch and extended/enhanced LIKQ capabilities.

@microsoft microsoft deleted a comment from msftclas Sep 27, 2017
@yatli yatli unassigned fexio Nov 8, 2017
/// A Microsoft Trinity Communiactions based listener for Service Fabric based stateless and stateful
/// service.
/// </summary>
public class TrinityCommunictionListener<TServiceContract> : TrinityServer, ICommunicationListener
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TaviTruman let's clean this up and rebase to the dynamic cluster :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yatli Okay will do and I'm going to work against the Listeners you have in place but make it so that its extensible from the GraphEngineServiceBase.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TaviTruman good to know! I was also wondering how does a developer kick off based on what we have. 👍


namespace Trinity.DynamicCluster.Storage
{
public partial class DynamicMemoryCloud : MemoryCloud
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idea: remote UseCell via active message

{
InitializeComponents();

m_partitioner.Start(m_cancelSrc.Token);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note, implementations should make sure that components do not have dependencies on each other.. or, do we need to implement dependency check (like AutoFac)?

class DynamicRemoteStorage : RemoteStorage
{

public DynamicRemoteStorage(ServerInfo server_info, int connPerServer, MemoryCloud mc, int pid, bool nonblocking)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leo's solution is to publish the instance GUID together with ServerInfo, so we do not have to set the id later with a query. Not sure if it's a good idea to add this requirement to an adapter implementation...

// When creating multiple listeners for a service, each listener must be given a unique name.
return new[] {
new ServiceReplicaListener(ctx => new GraphEngineListener(ctx), "GraphEngineTrinityProtocolListener", listenOnSecondary: true),
new ServiceReplicaListener(ctx => new GraphEngineHttpListener(ctx), "GraphEngineHttpListener", listenOnSecondary: true),
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

http port shall not be opened on passive units

/// <returns>true if saving succeeds; otherwise, false.</returns>
public override bool SaveStorage()
{
throw new NotImplementedException();
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new save format, persistency adapters, and a storage iterator that does not lock up the whole local storage...

#endregion
#region Base implementation
// XXX an implementation shall initialize this!
protected internal Storage[] StorageTable;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make this abstract then.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well on second thought... do not want to waste cpu cycles...

thautwarm and others added 27 commits February 4, 2018 18:05
GraphEngine python binding - core components
…n. service is wrapped into infra, remove listener package. now the user program is surprisingly easy to write.
@yatli
Copy link
Author

yatli commented Feb 16, 2018

good work people. this feature branch is now complete and coming back to master.

@yatli yatli merged commit 30ee63f into master Feb 16, 2018
@yatli yatli deleted the availability branch March 23, 2018 03:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants