EdgeLab-FHDO / Edge-Diagnostic-Platform

MIT License
0 stars 2 forks source link

Match-Making New Algorithm #64

Open alyhasansakr opened 4 years ago

alyhasansakr commented 4 years ago

Either extend the score-based algorithm (#63) or develop a new algorithm altogether.

Whichever way you choose, you must explain it in an abstract way first.

Write everything you try in this issue, even if it sounds stupid.

Then we discuss and decide which way to go, then you can start implementation.

zero212 commented 3 years ago

First of all, excuse my language/wording 🤣 Many profanities and personal ideas/prejudice will be written from now on. Beside Aly and me who have discussed these topics, you may not understand what I am writing here but bear with us, when the result and writing paper phase comes, I will have a deeper understanding of those and will answer any questions if needed.

Things to do:

Main project: 1) History diagnostic. Will write about this in the below comment. Cuz this is my main focus.

Side projects: (rather optional, but would be great if we got these 2 covered, I will probably do them anyway) Rather lengthy but below are everything that I need to start them later on after I got (1) settled down

2) Apply prediction using different algorithms/formulas. A small 3 pages introduction for methods that I would like to use are here. Forecasting method.docx

3) Implementation of this "A greedy algorithm for task offloading in mobile edge computing system" to prove that their algorithm is not practical enough. (Or in other way telling people that using energy consumed as a comparison criterion is stupid). I may be wrong but we will find out if I ended up doing these

energy saved = energy local - energy transfer to the cloud. image

zero212 commented 3 years ago

History Diagnostic:

Use cases (not sure whether it's the proper wording for this but meh) Please chime in more ideas/usage/expectation of a diagnostic from history and what to do with please, I will add them here along the way.

02.02.2021

zero212 commented 3 years ago

Oh lol take me long enough to start committing. Bad zero, bad bad detailed about commit above 91af246

Added a new class called TimeData, so I can use the object to put in a Multimap. Things would be different if we starting to implement a DB (SQL, Dongo) but I would keep things locally for now. This class seem to be a recreating of the LocalDateTime but I think we will have different use-cases for this. 🤞

Still have not come up with new ideas about how history diagnostic would work. I will just focus on making a framework/platform to easily get history data first. This should be a seperated module.

zero212 commented 3 years ago

Zenith: Utility-Aware Resource Allocation for Edge Computing https://ieeexplore.ieee.org/document/8029256/

Their idea: (rough summary)

Useful/insight learn from them:

image

Propose ideas:

  1. Give our platform a cloud, and only use utility (the gain mentioned above) as criterion, and do match making. Then compare with our current score based (not sure what would be the metrics)
  2. Define a minimum score (baseline) for all clients, match making with score based (but without location as criterion, so resource, bandwidth, history). Consider all nodes that have score above the baseline and choose the one that satisfies these 2 requirements: i. Node with the closest distance (or client in the node’s “zone”) ii. Node that when assigned will have the best utilization. (chose this if conflict with the one above)
alyhasansakr commented 3 years ago

@zero212 In essence, they deal with a problem we don't deal with yet; When the service provider (SP) is different than (decoupled from) the infrastructure provider (ECIP), basically the SP makes profit by selling a service to a customer but has to buy infrastructure from ECIP to do so.

Their definition of "Utility" depends on the entity; For SP, it is exactly the same as our definition of "Quality of Service" with a hard limit for latency. And for ECIP, it is the absolute utilization of the infrastructure (how much is occupied) regardless of the gain in SP's utility (however, they assume there is always a gain for SP as well).

The "Cloud" part that they mention is similar to our solution of "Local Execution", both are an alternative to the edge that is assumed to provide less quality than the edge.

If you look at your proposed ideas and consider my points above, the problem reduces to the NaĂŻve approach, which we have already studied.

What do you think?

zero212 commented 3 years ago

If you look at your proposed ideas and consider my points above, the problem reduces to the NaĂŻve approach, which we have already studied.

@alyhasansakr
Can you say a bit clearer regarding the 1st proposal? I understand that they deal with the "selling resource" bit, my idea was just to simply ignore that part and straight-up using the "gain in utility" as a criterion. But my preference lean toward the 2nd proposal to be fair

My 2nd proposal is a bit different than the original Naive, only a bit, that bit is the utilization part. I wanted to focus on the utilization of nodes, where we may skip the closest node to go for the node that will have higher utilization with the client assigned.

zero212 commented 3 years ago

Cooperative Computation Offloading for UAVs A Joint Radio and Computing Resource Allocation Approach

https://ieeexplore.ieee.org/document/8473379 Their idea:

My insight from their paper:

zero212 commented 3 years ago

Energy-Efficient Resource Allocation for Mobile Edge Computing in NOMA-Enabled Small Cell Networks

https://ieeexplore.ieee.org/abstract/document/9295762/

Their work's idea:

My insight from their paper:

Propose idea:

zero212 commented 3 years ago

Resource Allocation and task scheduling scheme in priority based hierarchical edge computing system

https://ieeexplore.ieee.org/document/9277773

Their scenario:

Useful/insight learn from them:

Proposed idea:

zero212 commented 3 years ago

Risk-based Optimization of Resource Provisioning in Mobile Edge Computing

https://ieeexplore.ieee.org/document/8567678

Their idea:

Insight from them:

zero212 commented 3 years ago

Development process

Previous proposal: 2 different methods Preemption or not is a big factor, need discusses

  1. Classify and preemption
  2. Introducing priority as a score’s factor

Note: For the sake of easy understanding. Client/node with letter (client A, node B) are entities that have already been matched, client/node with number (client 1, node 2) are entities that have not yet been matched or are going to be matched.

Classify and preemption

Main idea: Each client/application will be divided into different classes. Respectively class 1 to 9, whereas class 9 is lowest and 1 is the highest priority. Fairly simple, nothing new or groundbreaking

Scenario: A situation where preemption happens: Client 1,2,3 want to match, no nodes have enough resource Preemption happens depending on the client's priority, more info in the algorithm part.

Use case: (or benefit, don’t mind the wording) Accommodate situations where we need to prioritize the importance/urgentness or task. Without this, the algorithm will always execute small clients to keep the utilization number high

Algorithm: Client 1 have lowest priority (9) -> no match, no preemption, not doing anything, return fail messaged, ignore this

Client 2 have higher priority (2 - 8)

Client 3 have highest priority (1)

How to decide which node to match:

Proposals

  1. Calculate score of all nodes for client 2,3 base on current remaining resources (normally we skip this calculation due to lack of resources)
  2. Calculate score of all node for client 2,3 base on the maximum resources

Both proposal 1 and 2 go through the same flow as below:

Attempt: match with the highest score node (node A)

zero212 commented 3 years ago

Introduce priority as a new factor:

Still researching for this, been reading papers for related idea but not going anywhere okay. Need discussion @alyhasansakr

Main idea: Adding another factor P (priority) when calculating score.

Scenario / use case:

Algorithm:

How to decide which node to assign:

zero212 commented 3 years ago

Clients’ dependency:

Main idea: Client’s execution depends on other clients’ completion.

Old algorithm: Use the total of the whole group as required resources, and do match making New algorithm: Split the group and match making each element in group to nodes

_Definition: client1 and its dependency (client 1a,1b,1c) will be call Gclient1 (group client 1)

Scenario: Scenario where this can happen:

Client 1 needs client 1a, 1b, 1c to be complete before execution. Local execution won’t be able to pull it off, resource too expensive E.g: AR application, depend on several aspect, rendering, tracking, etc

Algorithm: When G_client1 want to matchmaking:

Access client1’s dependency (1a,1b,1c…) and try to do matchmaking for each of them (not simultaneously, but one after another) G_client1 will only be matched if all of its elements are successfully matched

Comparing factors/things: Comparing old algorithm with this dependency to see how often the G_clients are matched