‚Äč
MatchingEngine APIs

Functions

RegisterClientRequest DistributedMatchEngine.MatchingEngine.CreateRegisterClientRequest (string orgName, string appName, string appVersion, string authToken=null, UInt32 cellID=0, string uniqueIDType=null, string uniqueID=null, Dictionary< string, string > tags=null)
 
async Task< RegisterClientReplyDistributedMatchEngine.MatchingEngine.RegisterClient (RegisterClientRequest request)
 
async Task< RegisterClientReplyDistributedMatchEngine.MatchingEngine.RegisterClient (string host, uint port, RegisterClientRequest request)
 
FindCloudletRequest DistributedMatchEngine.MatchingEngine.CreateFindCloudletRequest (Loc loc, string carrierName=null, UInt32 cellID=0, Dictionary< string, string > tags=null)
 
async Task< FindCloudletReplyDistributedMatchEngine.MatchingEngine.FindCloudlet (FindCloudletRequest request, FindCloudletMode mode=FindCloudletMode.PROXIMITY)
 
async Task< FindCloudletReplyDistributedMatchEngine.MatchingEngine.FindCloudlet (string host, uint port, FindCloudletRequest request, FindCloudletMode mode=FindCloudletMode.PROXIMITY)
 
async Task< FindCloudletReplyDistributedMatchEngine.MatchingEngine.RegisterAndFindCloudlet (string orgName, string appName, string appVersion, Loc loc, string carrierName="", string authToken=null, UInt32 cellID=0, string uniqueIDType=null, string uniqueID=null, Dictionary< string, string > tags=null, FindCloudletMode mode=FindCloudletMode.PROXIMITY)
 
async Task< FindCloudletReplyDistributedMatchEngine.MatchingEngine.RegisterAndFindCloudlet (string host, uint port, string orgName, string appName, string appVersion, Loc loc, string carrierName="", string authToken=null, UInt32 cellID=0, string uniqueIDType=null, string uniqueID=null, Dictionary< string, string > tags=null, FindCloudletMode mode=FindCloudletMode.PROXIMITY)
 
VerifyLocationRequest DistributedMatchEngine.MatchingEngine.CreateVerifyLocationRequest (Loc loc, string carrierName=null, UInt32 cellID=0, Dictionary< string, string > tags=null)
 
async Task< VerifyLocationReplyDistributedMatchEngine.MatchingEngine.VerifyLocation (VerifyLocationRequest request)
 
async Task< VerifyLocationReplyDistributedMatchEngine.MatchingEngine.VerifyLocation (string host, uint port, VerifyLocationRequest request)
 
AppInstListRequest DistributedMatchEngine.MatchingEngine.CreateAppInstListRequest (Loc loc, string carrierName=null, UInt32 cellID=0, Dictionary< string, string > tags=null)
 
async Task< AppInstListReplyDistributedMatchEngine.MatchingEngine.GetAppInstList (AppInstListRequest request)
 
async Task< AppInstListReplyDistributedMatchEngine.MatchingEngine.GetAppInstList (string host, uint port, AppInstListRequest request)
 
QosPositionRequest DistributedMatchEngine.MatchingEngine.CreateQosPositionRequest (List< QosPosition > QosPositions, Int32 lteCategory, BandSelection bandSelection, UInt32 cellID=0, Dictionary< string, string > tags=null)
 
async Task< QosPositionKpiStreamDistributedMatchEngine.MatchingEngine.GetQosPositionKpi (QosPositionRequest request)
 
async Task< QosPositionKpiStreamDistributedMatchEngine.MatchingEngine.GetQosPositionKpi (string host, uint port, QosPositionRequest request)
 

Detailed Description

Function Documentation

◆ CreateAppInstListRequest()

AppInstListRequest DistributedMatchEngine.MatchingEngine.CreateAppInstListRequest ( Loc  loc,
string  carrierName = null,
UInt32  cellID = 0,
Dictionary< string, string >  tags = null 
)

Creates the AppInstListRequest object that will be used in GetAppInstList

Parameters
loc(Loc): User location
carrierName(string): Optional device carrier (if not provided, carrier information will be pulled from device)
cellID(UInt32): Optional cell tower id. If none supplied, default is 0.
tags(Tag[]): Optional
Returns
AppInstListRequest

Example

var appInstListRequest = me.CreateAppInstListRequest(loc, carrierName);

◆ CreateFindCloudletRequest()

FindCloudletRequest DistributedMatchEngine.MatchingEngine.CreateFindCloudletRequest ( Loc  loc,
string  carrierName = null,
UInt32  cellID = 0,
Dictionary< string, string >  tags = null 
)

Creates the FindCloudletRequest object that will be used in the FindCloudlet function. The FindCloudletRequest object wraps the parameters that have been provided to this function.

Parameters
loc(Loc): User location
carrierName(string): Optional device carrier (if not provided, carrier information will be pulled from device)
cellID(UInt32): Optional cell tower id. If none supplied, default is 0.
tags(Tag[]): Optional
Returns
FindCloudletRequest

Example

var findCloudletRequest = me.CreateFindCloudletRequest(loc, carrierName);

◆ CreateQosPositionRequest()

QosPositionRequest DistributedMatchEngine.MatchingEngine.CreateQosPositionRequest ( List< QosPosition QosPositions,
Int32  lteCategory,
BandSelection  bandSelection,
UInt32  cellID = 0,
Dictionary< string, string >  tags = null 
)

Creates the QosPositionRequest object that will be used in CreateQosPositionRequest

Parameters
QosPositions(List<QosPosition): List of gps positions
lteCategory(Int32): Client's device LTE category number
bandSelection(BandSelection): Band list used by client
cellID(UInt32): Optional cell tower id. If none supplied, default is 0.
tags(Tag[]): Optional
Returns
QosPositionRequest

Example

var qosPositionRequest = me.CreateQosPositionRequest(requestList, 0, null);

◆ CreateRegisterClientRequest()

RegisterClientRequest DistributedMatchEngine.MatchingEngine.CreateRegisterClientRequest ( string  orgName,
string  appName,
string  appVersion,
string  authToken = null,
UInt32  cellID = 0,
string  uniqueIDType = null,
string  uniqueID = null,
Dictionary< string, string >  tags = null 
)

Creates the RegisterClientRequest object that will be used in the RegisterClient function.The RegisterClientRequest object wraps the parameters that have been provided to this function.

Parameters
orgName(string): Organization name
appName(string): Application name
appVersion(string): Application version
authToken(string): Optional authentication token for application. If none supplied, default is null.
cellID(UInt32): Optional cell tower id. If none supplied, default is 0.
uniqueIDType(string): Optional
uniqueID(string): Optional
tags(Tag[]): Optional
Returns
RegisterClientRequest

Example

var registerClientRequest = me.CreateRegisterClientRequest(orgName, appName, appVers);

◆ CreateVerifyLocationRequest()

VerifyLocationRequest DistributedMatchEngine.MatchingEngine.CreateVerifyLocationRequest ( Loc  loc,
string  carrierName = null,
UInt32  cellID = 0,
Dictionary< string, string >  tags = null 
)

Creates the VerifyLocationRequest object that will be used in VerifyLocation

Parameters
loc(Loc): User location
carrierName(string): Optional device carrier (if not provided, carrier information will be pulled from device)
cellID(UInt32): Optional cell tower id. If none supplied, default is 0.
tags(Tag[]): Optional
Returns
VerifyLocationRequest

Example

var verifyLocationRequest = me.CreateVerifyLocationRequest(loc);

◆ FindCloudlet() [1/2]

async Task<FindCloudletReply> DistributedMatchEngine.MatchingEngine.FindCloudlet ( FindCloudletRequest  request,
FindCloudletMode  mode = FindCloudletMode.PROXIMITY 
)

FindCloudlet returns information needed for the client app to connect to an application backend deployed through MobiledgeX. If there is an application backend instance found, FindCloudetReply will contain the fqdn of the application backend and an array of AppPorts (with information specific to each application backend endpoint)

Parameters
request(FindCloudletRequest)
mode(FindCloudletMode): Optional. Default is PROXIMITY. PROXIMITY will just return the findCloudletReply sent by DME (Generic REST API to findcloudlet endpoint). PERFORMANCE will test all app insts deployed on the specified carrier network and return the cloudlet with the lowest latency (Note: PERFORMANCE may take some time to return). Default value if mode parameter is not supplied is PROXIMITY.
Returns
Task<FindCloudletReply>

Example

Proximity Example

findCloudletReply = await me.FindCloudlet(findCloudletRequest);

Performance Example

findCloudletReplyPerformance = await me.FindCloudlet(findCloudletRequest, FindCloudletMode.PERFORMANCE);

◆ FindCloudlet() [2/2]

async Task<FindCloudletReply> DistributedMatchEngine.MatchingEngine.FindCloudlet ( string  host,
uint  port,
FindCloudletRequest  request,
FindCloudletMode  mode = FindCloudletMode.PROXIMITY 
)

FindCloudlet overload with hardcoded DME host and port. Only use for testing.

Parameters
host(string): DME host
port(uint)DME port (REST: 38001, GRPC: 50051)
request(FindCloudletRequest)
mode(FindCloudletMode): Optional. Default is PROXIMITY. PROXIMITY will just return the findCloudletReply sent by DME (Generic REST API to findcloudlet endpoint). PERFORMANCE will test all app insts deployed on the specified carrier network and return the cloudlet with the lowest latency (Note: PERFORMANCE may take some time to return). Default value if mode parameter is not supplied is PROXIMITY.
Returns
Task<FindCloudletReply>

Example

findCloudletReply = await me.FindCloudlet(fallbackDmeHost, MatchingEngine.defaultDmeRestPort, findCloudletRequest);

◆ GetAppInstList() [1/2]

async Task<AppInstListReply> DistributedMatchEngine.MatchingEngine.GetAppInstList ( AppInstListRequest  request)

Returns a list of the developer's backend instances deployed on the specified carrier's network. If carrier was "", returns all backend instances regardless of carrier network. This is used internally in FindCloudlet Performance mode to grab the list of cloudlets to test.

Parameters
request(AppInstListRequest)
Returns
Task<AppInstListReply>

Example

appInstListReply = await me.GetAppInstList(appInstListRequest);

◆ GetAppInstList() [2/2]

async Task<AppInstListReply> DistributedMatchEngine.MatchingEngine.GetAppInstList ( string  host,
uint  port,
AppInstListRequest  request 
)

GetAppInstList overload with hardcoded DME host and port. Only use for testing.

Parameters
host(string): DME host
port(uint)DME port (REST: 38001, GRPC: 50051)
request(AppInstListRequest)
Returns
Task<AppInstListReply>

Example

appInstListReply = await me.GetAppInstList(fallbackDmeHost, MatchingEngine.defaultDmeRestPort, appInstListRequest);

◆ GetQosPositionKpi() [1/2]

async Task<QosPositionKpiStream> DistributedMatchEngine.MatchingEngine.GetQosPositionKpi ( QosPositionRequest  request)

Returns quality of service metrics for each location provided in qos position request

Parameters
request(QosPositionRequest)
Returns
Task<QosPositionKpiStream>

Example

qosReplyStream = await me.GetQosPositionKpi(qosPositionRequest);

◆ GetQosPositionKpi() [2/2]

async Task<QosPositionKpiStream> DistributedMatchEngine.MatchingEngine.GetQosPositionKpi ( string  host,
uint  port,
QosPositionRequest  request 
)

GetQosPositionKpi overload with hardcoded DME host and port. Only use for testing.

Parameters
host(string): DME host
port(uint)DME port (REST: 38001, GRPC: 50051)
request(QosPositionRequest)
Returns
Task<QosPositionKpiStream>

Example

qosReplyStream = await me.GetQosPositionKpi(fallbackDmeHost, MatchingEngine.defaultDmeRestPort, qosPositionRequest);

◆ RegisterAndFindCloudlet() [1/2]

async Task<FindCloudletReply> DistributedMatchEngine.MatchingEngine.RegisterAndFindCloudlet ( string  host,
uint  port,
string  orgName,
string  appName,
string  appVersion,
Loc  loc,
string  carrierName = "",
string  authToken = null,
UInt32  cellID = 0,
string  uniqueIDType = null,
string  uniqueID = null,
Dictionary< string, string >  tags = null,
FindCloudletMode  mode = FindCloudletMode.PROXIMITY 
)

RegisterAndFindCloudlet overload with hardcoded DME host and port. Only use for testing. This API cannot be used for Non-Platform APPs.

Parameters
host(string): DME host
port(uint)DME port (REST: 38001, GRPC: 50051)
orgName(string): Organization name
appName(string): Application name
appVersion(string): Application version
loc(Loc): User location
carrierName(string): Optional device carrier (if not provided, carrier information will be pulled from device)
authToken(string): Optional authentication token for application. If none supplied, default is null.
cellID(UInt32): Optional cell tower id. If none supplied, default is 0.
uniqueIDType(string): Optional
uniqueID(string): Optional
tags(Tag[]): Optional
mode(FindCloudletMode): Optional. Default is PROXIMITY. PROXIMITY will just return the findCloudletReply sent by DME (Generic REST API to findcloudlet endpoint). PERFORMANCE will test all app insts deployed on the specified carrier network and return the cloudlet with the lowest latency (Note: PERFORMANCE may take some time to return). Default value if mode parameter is not supplied is PROXIMITY.
Returns
Task<FindCloudletReply>

◆ RegisterAndFindCloudlet() [2/2]

async Task<FindCloudletReply> DistributedMatchEngine.MatchingEngine.RegisterAndFindCloudlet ( string  orgName,
string  appName,
string  appVersion,
Loc  loc,
string  carrierName = "",
string  authToken = null,
UInt32  cellID = 0,
string  uniqueIDType = null,
string  uniqueID = null,
Dictionary< string, string >  tags = null,
FindCloudletMode  mode = FindCloudletMode.PROXIMITY 
)

Wrapper function for RegisterClient and FindCloudlet. Same functionality as calling them separately. This API cannot be used for Non-Platform APPs.

Parameters
orgName(string): Organization name
appName(string): Application name
appVersion(string): Application version
loc(Loc): User location
carrierName(string): Optional device carrier (if not provided, carrier information will be pulled from device)
authToken(string): Optional authentication token for application. If none supplied, default is null.
cellID(UInt32): Optional cell tower id. If none supplied, default is 0.
uniqueIDType(string): Optional
uniqueID(string): Optional
tags(Dictionary<string, string>): Optional
mode(FindCloudletMode): Optional. Default is PROXIMITY. PROXIMITY will just return the findCloudletReply sent by DME (Generic REST API to findcloudlet endpoint). PERFORMANCE will test all app insts deployed on the specified carrier network and return the cloudlet with the lowest latency (Note: PERFORMANCE may take some time to return). Default value if mode parameter is not supplied is PROXIMITY.
Returns
Task<FindCloudletReply>

◆ RegisterClient() [1/2]

async Task<RegisterClientReply> DistributedMatchEngine.MatchingEngine.RegisterClient ( RegisterClientRequest  request)

First DME API called. This will register the client with the MobiledgeX backend and check to make sure that the app that the user is running exists. (ie. This confirms that CreateApp in Console/Mcctl has been run successfully). RegisterClientReply contains a session cookie that will be used (automatically) in later API calls. It also contains a uri that will be used to get the verifyLocToken used in VerifyLocation.

Parameters
request(RegisterClientRequest)
Returns
Task<RegisterClientReply>

Example

registerClientReply = await me.RegisterClient(registerClientRequest);

◆ RegisterClient() [2/2]

async Task<RegisterClientReply> DistributedMatchEngine.MatchingEngine.RegisterClient ( string  host,
uint  port,
RegisterClientRequest  request 
)

RegisterClient overload with hardcoded DME host and port. Only use for testing.

Parameters
host(string): DME host
port(uint)DME port (REST: 38001, GRPC: 50051)
request(RegisterClientRequest)
Returns
Task<RegisterClientReply>

Example

registerClientReply = await me.RegisterClient(fallbackDmeHost, MatchingEngine.defaultDmeRestPort, registerClientRequest);

◆ VerifyLocation() [1/2]

async Task<VerifyLocationReply> DistributedMatchEngine.MatchingEngine.VerifyLocation ( string  host,
uint  port,
VerifyLocationRequest  request 
)

VerifyLocation overload with hardcoded DME host and port. Only use for testing.

Parameters
host(string): DME host
port(uint)DME port (REST: 38001, GRPC: 50051)
request(VerifyLocationRequest)
Returns
Task<VerifyLocationReply>

Example

verifyLocationReply = await me.VerifyLocation(fallbackDmeHost, MatchingEngine.defaultDmeRestPort, verifyLocationRequest);

◆ VerifyLocation() [2/2]

async Task<VerifyLocationReply> DistributedMatchEngine.MatchingEngine.VerifyLocation ( VerifyLocationRequest  request)

Makes sure that the user's location is not spoofed based on cellID and gps location. Returns the Cell Tower status (CONNECTED_TO_SPECIFIED_TOWER if successful) and Gps Location status (LOC_VERIFIED if successful). Also provides the distance between where the user claims to be and where carrier believes user to be (via gps and cell id) in km.

Parameters
request(VerifyLocationRequest)
Returns
Task<VerifyLocationReply>

Example

verifyLocationReply = await me.VerifyLocation(verifyLocationRequest);
DistributedMatchEngine.FindCloudletMode
FindCloudletMode
Definition: DistributedMatchEngine.cs:179
DistributedMatchEngine.MatchingEngine.MatchingEngine
MatchingEngine(CarrierInfo carrierInfo=null, NetInterface netInterface=null, UniqueID uniqueID=null, DeviceInfo deviceInfo=null)
Definition: DistributedMatchEngine.cs:243