Digitala Vetenskapliga Arkivet

Change search
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf
Fixing and Extending a Formally Verified Distributed Key-Value Store
KTH, School of Electrical Engineering and Computer Science (EECS).
2025 (English)Independent thesis Advanced level (degree of Master (Two Years)), 20 credits / 30 HE creditsStudent thesisAlternative title
Reparation och utökning av en formellt verifierad distribuerad key value-databas (Swedish)
Abstract [en]

Distributed key-value stores can offer different consistency guarantees, such as strong consistency, causal consistency, and eventual consistency, which leads to differences in performance and fault tolerance. Chapar is a causally consistent key-value store implementation verified in the Coq proof assistant and maintained as an open-source project on GitHub. The code is extracted from Coq to the OCaml programming language and has been experimentally executed and performance tested as part of the work described in a 2016 conference paper. However, there are several serious practical problems in the verified code, such as the formal specification assuming the removal of duplicates. At the same time, the implementation uses the UDP protocol which gives no guarantees regarding duplicates. This thesis confirmed the existence and reproducibility of the reported UDP issues. To address these underlying problems, a reliable protocol was integrated into the Chapar framework. This involved restructuring the codebase and extending the framework with the TCP protocol. Additionally, a testing framework was developed to replicate the conditions under which the errors occurred. The findings demonstrated the successful recreation of all reported issues. Furthermore, the results indicated that replacing the unreliable UDP protocol with the reliable TCP protocol resolved the issues while maintaining comparable performance levels.

Abstract [sv]

Nyckel-värde-databaser har konsistensegenskaper vilker ger olika garantier och prestanda på databasen. ”Causal consistency” är ett exempel på en sådan egenskap som garanteerar kausalitet mellan olika händelser. Chapar är en ”causal consistent” nyckel-värde-databas som har verifierats med hjälp av bevisassistenten Coq i tidigare arbete från 2016 och underhålls som ett öppen källkodsprojekt på GitHub. Koden extraheras från Coq till OCaml programmeringsspråket och har experimentellt körts och prestandatestats som en del av den ursprungliga avhandlingen. Även om den nuvarande implementationen av den exekverbara koden kan extraheras till OCaml och kompileras med bibliotekskod, kan nyckel-värde-databasen inte köras på grund av problem i senare versioner av OCaml-biblioteket. Dessutom finns det flera allvarliga praktiska problem i den verifierade koden, såsom att den formella specifikationen förutsätter borttagning av dubbletter, medan OCaml- implementationen inte tar bort dubbletter eftersom den använder UDP- protokollet. Denna avhandling lyckas återskapa de problemen relaterade till UDP och återskapar de ursprungliga UDP-benchmarkstesterna med liknande resultat. Dessutom löses de öppna problemen genom att implementera ett pålitligt protokoll (TCP). TCP prestandatestas också och visas ha liknande prestanda, vilket gör det till ett lämpligt protokoll för framtida implementationer.

Place, publisher, year, edition, pages
2025. , p. 51
Series
TRITA-EECS-EX ; 2025:14
Keywords [en]
UDP, OCaml, Reproducing, RFC 768
National Category
Computer and Information Sciences
Identifiers
URN: urn:nbn:se:kth:diva-361682OAI: oai:DiVA.org:kth-361682DiVA, id: diva2:1947301
Supervisors
Examiners
Available from: 2025-03-31 Created: 2025-03-25 Last updated: 2025-03-31Bibliographically approved

Open Access in DiVA

fulltext(908 kB)24 downloads
File information
File name FULLTEXT02.pdfFile size 908 kBChecksum SHA-512
4f6a73a12d605e4bbcef94e23313cd1f779981bed67409260a2bce62a70e4df6e94795bb96a8b2816207b87aec181c1a24dff581fb5e6555da88d67998ea4011
Type fulltextMimetype application/pdf

By organisation
School of Electrical Engineering and Computer Science (EECS)
Computer and Information Sciences

Search outside of DiVA

GoogleGoogle Scholar
Total: 25 downloads
The number of downloads is the sum of all downloads of full texts. It may include eg previous versions that are now no longer available

urn-nbn

Altmetric score

urn-nbn
Total: 541 hits
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf