Diese Mini-Code-Version meiner Bachelorarbeit dient mit ca. 370 Code-Zeilen als Beispiel des Farmer-Worker-Modells. Der C++ Code zeigt die Nutzung von Apache Thrift (zur Verteilung) und glpk (zum Lösen).

Der Code besteht im Kern aus folgenden Dateien:

- MiniBachelor.thrift: ca. 20 Zeilen IDL beschreibt den Teil, der für Farmer und Worker wichtig ist
- Farmer.cpp, Worker.cpp: ca. 200 bzw. 120 Zeilen enthalten die Implementierung.
- farmer.conf: praktisch, um nicht alle Konfigurationsdaten in der Komandozeile angeben zu müssen
- Buffer.hpp: Mit ca. 30 Zeilen Code ist dies eine Klasse, wo Threads Elemente entnehmen und beifügen können. Dieser Vorgang wird durch Semaphoren geschützt.

Im Branch "speedup" habe ich mit jedem Commit folgende Features beigefügt:

- Worker-Proxies mit gerader id machen Breitensuche
- Optimierungen beim Kompilieren
- Nutzung einer Heuristik statt Simplex
- Multi-Threaded Server und Callback-Funktion zum Beenden von solve()

Features

  • using c++2011 threads
  • each Worker use glpk
  • Farmer - Worker concept
  • Documentation via doxygen
  • using Apache Thrift
  • Distributed System
  • for education
  • Semaphore

Project Samples

Project Activity

See All Activity >

Categories

Education

License

Creative Commons Attribution License

Follow miniBachelor

miniBachelor Web Site

You Might Also Like
Full Control for Complex IT - Try PRTG Now Icon
Full Control for Complex IT - Try PRTG Now

Gain deeper insights and proactive alerts for your entire network. PRTG empowers you to optimize uptime and prevent costly outages.

As an IT monitoring expert, you need more than basic alerts - you need actionable data and full transparency. PRTG gives your team a single pane of glass for all systems, devices, and applications, with customizable dashboards and granular user management. Detect issues before they escalate, automate reporting, and ensure compliance with SLAs. PRTG’s scalable engine and advanced analytics help you optimize resources, reduce manual effort, and keep your organization running smoothly. Take control of your IT landscape and make smarter decisions with real-time, enterprise-grade monitoring.
Activate Your PRTG Trial Today
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of miniBachelor!

Additional Project Details

Intended Audience

Developers

User Interface

Console/Terminal

Programming Language

C++

Related Categories

C++ Education Software

Registered

2015-11-04