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

Other Useful Business Software
Our Free Plans just got better! | Auth0 Icon
Our Free Plans just got better! | Auth0

With up to 25k MAUs and unlimited Okta connections, our Free Plan lets you focus on what you do best—building great apps.

You asked, we delivered! Auth0 is excited to expand our Free and Paid plans to include more options so you can focus on building, deploying, and scaling applications without having to worry about your security. Auth0 now, thank yourself later.
Try free now
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