How faramarzq/resource_allocation_using_machine_learning works
• Cloud Module: Represents the “brain” of the system.
• Following subcomponents:
• Data Storage – The cloud storage folder (Cloud/storage) where raw data, processed data, and the trained model (model.joblib) reside.
• ML Model Trainer – Represent Cloud/cloud.py which splits the dataset, trains the model (Decision Tree Classifier), validates it, and persists the trained ML model.
• Edge Module: Represents the distributed task handling part.
• Master Node:
• Depicted as the coordinator (Edges/Master.py) that takes in Cloudlet details and the trained model from the Cloud Module.
• It chooses the best Worker for each task using both the ML model and a secondary greedy algorithm for comparison.
• Cloudlets:
• Represented by the Cloudlet class (Edges/Cloudlet.py). They encapsulate task attributes (e.g., position, instructions, size, and priority) that the Master node needs to evaluate.
• Worker Nodes:
• Depicted as individual worker components (in Edges/workers/). Include the abstract Worker (Edges/workers/Worker.py) and the three specific Worker implementations (Worker1.py, Worker2.py, Worker3.py) which differ in processing power and their network characteristics.
Out the Relationships and Data Flow
• Cloud Module Processing:
• Ingestion of raw data into Cloud/cloud.py for training.
• Separation of data into training (70%) and testing (30%), highlight decision tree training, and show the final output: the ML model saved in the storage.
• Interconnection Between Cloud and Edge:
• Inside the Edge Module:
• That Cloudlets are initiated, processed, and then dispatched to a worker.
• Network communication/data flow between the Master Node and Worker Nodes (possibly label them with “Resource Allocation Decision” and “Task Dispatch”).
Architectural Patterns and Decision Points
• Separation between a centralized Cloud (data processing, ML training, storage) and distributed Edge (task management, execution).
• Incorporate the inherited worker design pattern where Worker1, Worker2, and Worker3 derive from the base Worker class.
Incorporate Technical Details
• Use clear labels for each component and subcomponent.
• Where applicable, add technology hints (e.g., Python-based ML using Decision Tree Classifier, joblib for model persistence).
• Use a central block representing the Cloud Module that includes ML training and data management.