ServiceRegistry

Package: simu5g.mec.platform.ServiceRegistry

simple module ServiceRegistry

Models the functionalities of the Service Registry entity in the MEC architecture (ETSI GS MEC 003). It exposes a REST API compliant with ETSI GS MEC 011, allowing MEC applications to discover MEC services available in the MEC host. In particular, MEC applications can obtain the IP address and port number for each instantiated MEC service, so that they can start sending requests to it

simu5g.mec.platform.ServiceRegistry.ServiceRegistryServiceRegistrysimple

Usage diagram

Inheritance diagram

Used in compound modules

Name

Type

Description

MecPlatform

compound module

Represents the MEC Platform entity within a MecHost, as specified in the ETSI MEC architecture (ETSI GS MEC 003). It encompasses the MEC services made available to MEC applications instantiated within the MEC Host, along with the ServiceRegistry. The type and number of available MEC services can be configured.

Parameters

Name

Type

Default value

Description

serviceName

string

“ServiceRegistry”

requestQueueSize

int

0

subscriptionQueueSize

int

0

localAddress

string

“”

Local address; may be left empty (“”)

localPort

int

1000

localPort number to listen on

requestServiceTime

double

15us

subscriptionServiceTime

double

20us

serverThreadClass

string

“simu5g.mec.platform.services.base.SocketManager”

tos

int

-1

If not -1, set the Type of Service (IPv4) / Traffic Class (IPv6) field of sent packets to this value

binderModule

string

“binder”

Properties

Name

Value

Description

class

ServiceRegistry

display

i=block/source

Gates

Name

Direction

Size

Description

socketOut

output

socketIn

input

Signals

Name

Type

Unit

Description

loadGeneratorNumBackgroundRequests

responseTime

Statistics

Name

Title

Source

Record

Unit

Interpolation Mode

Description

loadGeneratorNumBackgroundRequests

Load Generator Background Requests Count

mean,vector

responseTime

Response time of foreground requests

mean,vector

Source code

//
// Models the functionalities of the Service Registry entity in
// the MEC architecture (ETSI GS MEC 003). It exposes a REST API
// compliant with ETSI GS MEC 011, allowing MEC applications to discover MEC services
// available in the MEC host. In particular, MEC applications can obtain the IP address
// and port number for each instantiated MEC service, so that they can start sending
// requests to it
//
simple ServiceRegistry like IApp
{
    parameters:
        @display("i=block/source");
        @class("ServiceRegistry");

        string serviceName = default("ServiceRegistry");
        int requestQueueSize = default(0);
        int subscriptionQueueSize = default(0);
        string localAddress = default(""); // Local address; may be left empty ("")
        int localPort = default(1000);     // localPort number to listen on

        double requestServiceTime @unit(s) = default(15us);
        double subscriptionServiceTime @unit(s) = default(20us);

        string serverThreadClass = default("simu5g.mec.platform.services.base.SocketManager");

        int tos = default(-1); // If not -1, set the Type of Service (IPv4) / Traffic Class (IPv6) field of sent packets to this value

        string binderModule = default("binder");

        @signal[loadGeneratorNumBackgroundRequests];
        @statistic[loadGeneratorNumBackgroundRequests](title="Load Generator Background Requests Count"; record=mean,vector);
        @signal[responseTime];
        @statistic[responseTime](title="Response time of foreground requests"; record=mean,vector);

    gates:
        output socketOut;
        input socketIn;
}

File: src/simu5g/mec/platform/ServiceRegistry/ServiceRegistry.ned