Skip to content

arieldll/trabalho-cmu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 

Repository files navigation

git go linux mongodb

Network Exposure Function (Português)

Desenvolvimento de Software Orientado à Computação Móvel e Ubíqua

Este trabalho implementa uma Network Exposure Function (NEF) conceitual para o projeto free5gc, com todos os endpoints definidos pela exposição de eventos, através das definições da 3GPP para TS29591_Nnef_EventExposure. Funciona em conjunto com a Application Function (AF) disponível aqui.

Arquitetura

A arquitetura de funcionamento segue o seguinte fluxo: image

Requisitos de software

  • Core funcional do projeto free5gc
  • Linguagem go versão 1.17 ou superior
  • Ubuntu 22.04 ou superior
  • Bibliotecas da linguagem go

Requisitos de hardware

  • Processador com no mínimo 2 GHz
  • 4 Gigabytes de memória RAM
  • 2 Gigabyte de espaço em disco livre
  • Sistema Operacional Linux

Como instalar o go?

https://go.dev/dl/

Biliotecas necessárias

context, strings, time, fmt, net/http, log, bytes, ioutil, mongodb, httprouter, json, uuid, openapi, cli

Instalando biliotecas de terceiros no go

$ go get go.mongodb.org/mongo-driver/bson
$ go get go.mongodb.org/mongo-driver/mongo
$ go get go.mongodb.org/mongo-driver/mongo/options
$ go get github.com/julienschmidt/httprouter
$ go get github.com/segmentio/encoding/json
$ go get github.com/google/uuid
$ go get github.com/free5gc/openapi/Nnrf_NFManagement
$ go get github.com/free5gc/openapi/models
$ go get github.com/urfave/cli

Por onde começar

Faça um clone ou fork do projeto oficial do free5gc:

git clone https://github.com/free5gc/free5gc

Instale todas as dependências e compile as funções disponíveis no projeto, free5gc, conforme este link. Para que a NEF funcione, faz-se necessário apenas a compilação e execução da Network Repository Function (NRF), junto com o MongoDB. Fica a seu critério compilar ou não as outras funções do core.

Feito a instalação e compilação da NRF, inicialize-a. Se você estiver usando o projeto free5gc, a partir da raiz do projeto

$ ./bin/nrf 

Tendo a NRF instanciada, entre na pasta free5gc/NFs e clone este próprio repositório:

$ git clone https://github.com/arieldll/trabalho-cmu

No arquivo nef.go, configure o seguinte:

Na linha 43, insira o endereço e porta do MongoDB do projeto free5gc
Na linha 252, configure o endereço e porta da NRF

Após, apenas execute:

$ go run nef.go

Se tudo estiver funcionando, a NEF estará disponível e exposta na porta 20000

Primeiros resultados

A seguir, as primeiras avaliações de desempenho da NEF conceitual, utilizando uma quantidade incremental de AFs registradas, incrementando o registor de AFs ao longo do tempo. Todos os valores foram coletados via instrumentação da aplicação, e estão descritos na ordem de milissegundos (ms). Os experimentos foram feitos com 1, 5, 10, 50 e 100 AFs e uma instância da NEF. As requisições de inscrição foram feitas através do Postman. O computador host do core do free5gc e NEF tem a seguinte configuração:

  • Processador Intel(R) Xeon(R) CPU E5-2650 0 @ 2.00GHz – 1 core
  • 4GB de memória RAM

image

Podemos notar que o tempo de resposta é proporcional a quantidade de AFs registradas.

image

Network Exposure Function (English)

This work implements a conceptual Network Exposure Function (NEF) to the free5gc project, covering all endpoints defined by the event exposure through 3GPP definitions for the TS29591_Nnef_EventExposure. This project works together the Application Function (AF) available here.

Architecture

The architecture works as flows: image

Software requirements

  • Functional core of free5gc project
  • Go language version 1.17 or higher
  • Ubuntu 22.04 or higher
  • Go language 3rd party libraries

Hardware requirements

  • Processor minimum 2 GHz
  • 4 Gigabytes of RAM
  • 2 Gigabytes of free disk space
  • Linux Operating System

How to install golang?

https://go.dev/dl/

3rd party libraries of golang

context, strings, time, fmt, net/http, log, bytes, ioutil, mongodb, httprouter, json, uuid, openapi, cli

Installing 3rd party libraries in golang

$ go get go.mongodb.org/mongo-driver/bson
$ go get go.mongodb.org/mongo-driver/mongo
$ go get go.mongodb.org/mongo-driver/mongo/options
$ go get github.com/julienschmidt/httprouter
$ go get github.com/segmentio/encoding/json
$ go get github.com/google/uuid
$ go get github.com/free5gc/openapi/Nnrf_NFManagement
$ go get github.com/free5gc/openapi/models
$ go get github.com/urfave/cli

How to start

Clone or fork the official free5gc project:

git clone https://github.com/free5gc/free5gc

Install all dependencies and compile the NFs available in the project, free5gc, as suchthis link. For NEF works, you need to compile and execute Network Repository Function (NRF), together with MongoDB. If necessary, you would compile the other 5G core functions.

After, start NRF. From 5gc root project:

$ ./bin/nrf 

Enter on the free5gc/NFs folder and clone this one repository:

$ git clone https://github.com/arieldll/trabalho-cmu

On the nef.go file, configure as follow:

In line 43, change to the IP/port of MongoDB
In line 252, change to the IP/port of NRF

If all dependencies are correct, just execute:

$ go run nef.go

If all is working, NEF is available at http://localhost:20000

First results

Above, are the first performance evaluations of this implementation of conceptual NEF. For this evaluation, are used an incremental amount of registered AFs, scaling the register of AFs over time. All values were collected via the application's instrumentation, and all values are described in the order of milliseconds (ms). The experiments were carried out with 1, 5, 10, 50, and 100 AFs and just one instance of NEF. The subscr tion requests were made using Postman. The free5gc and NEF core host computer has the following configuration:

  • Intel(R) Xeon(R) processor E5-2650 CPU 0 @ 2.00GHz – 1 core
  • 4GB of RAM

image

We can see a response time is proportional to the amount of registered AFs

image

About

Trabalho de computação móvel

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages