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
All-in-One IT Monitoring - No More Blind Spots Icon
All-in-One IT Monitoring - No More Blind Spots

Stop juggling tools. PRTG gives you a complete, real-time view of your IT: servers, devices, cloud, and more - in one easy dashboard.

Tired of switching between different tools and missing critical alerts? PRTG brings everything together, monitoring your entire IT infrastructure from a single, intuitive interface. Whether it’s servers, switches, printers, or cloud services, you get instant visibility and clear notifications - no technical jargon, no clutter. Set up in minutes, PRTG helps you prevent downtime, reduce stress, and prove your value to your company. Focus on your job, not on chasing issues. Try PRTG and experience true IT peace of mind.
Get Your Unified IT Trial
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