SlideShare una empresa de Scribd logo
1 de 34
WHAT’S IN UNISON?
A FORMAL SPECIFICATION AND
REFERENCE IMPLEMENTATION
OF A FILE SYNCHRONIZER
Presentation type: paper presentation
Class: CS 589 – Domain Specific Languages
Presenter: Sergii Shmarkatiuk
Date: 5/20/2014
TARGET DOMAIN: FILE REPLICATION AND
SYNCHRONIZATION
2
File
synchronization
Replication
MirroringDeployment
Cloud storage
COMMON USE CASE: CLOUD STORAGE AND
SYNCHRONIZATION BETWEEN DEVICES
3
COMMON USE CASE: DEPLOYMENT OF
WEB-APPLICATION
4
development instance production instance
http://localhost/MyApp http://myapp.com
3. upload
2. test
ftp://@myapp.com/var/www/html/
1. edit files
4. test
/var/www/html/MyApp
COMMON USE CASE: DEPLOYMENT OF
WEB-APPLICATION
5
development instance production instance
http://localhost/MyApp http://myapp.com
4. test
/var/www/html/MyApp ftp://@myapp.com/var/www/html/
1. edit files
5. test
2. edit files
3. sync
+
FILE SYNCHRONIZATION SOFTWARE
6
Rsync
Beyond Compare
Synchronize It!
Dropbox
Google Drive
Box.net
OneDrive
Manual synchronization
Cloud storage
SOFTWARE DEPLOYMENT TOOLS
7
Puppet
Chef
Capistrano
CFEngine
Ansible
UNISON
File synchronization tool
Command line interface
Implemented in OCaml (DSL) and C
(tool)
Available for all major platforms (UNIX,
Win, Mac)
Unlike rsync, Unison is not included into
basic UNIX distributions
8
PAPER CONTRIBUTIONS
Paper presents mathematical model,
DSL, mechanics and challenges of file
synchronization
Authors proved some properties of file
synchronization operations using Coq
Authors described the gap between
idealistic representation and actual tool
implementation
9
QUESTIONS
Keying Xu, Chao Peng:
What is the semantic domain of Unison? Is it a deep or
shallow embedded DSL?
10
Unison is a deep embedded DSL
UNISON: SYNTAX AND SEMANTIC DOMAIN
11
 Current states of the
replicas
 2 file trees
 Archive (last
synchronized state)
 Synchronized
replicas
 2 file trees
 Archive (last
synchronized state)
Syntax Semantic domain
sem
A B
~
A B
=
QUESTIONS
Chao Peng:
What is the basic object of Unison?
12
UNISON: BASIC DATA STRUCTURES
FILESYSTEM
13
type name = string
type contents = string
type properties = string
type fs = Dir of properties * dContents
| File of properties * contents
| Symlink of contents
| Bot
and dContents = (name * fs) list
OCaml
UNISON: BASIC DATA STRUCTURES
UPDATE DETECTION
14
type prevState = DIR
| FILE
| SYMLINK
| ABSENT
type ’a leafUpdate = LeafSame
| LeafUpdated of ’a * ’a option
OCaml
UNISON: BASIC DATA STRUCTURES
UPDATE DETECTION
15
type updateItem = Same
| Updated of updateContent * prevState
| Error
and updateContent =
UCDir of properties leafUpdate * updateChildren
| UCFile of properties leafUpdate * contents leafUpdate
| UCSymlink of contents leafUpdate
| UCAbsent
and updateChildren = (name * updateItem) list
OCaml
UNISON: BASIC DATA STRUCTURES
RECONCILIATION
16
type direction = Conflict
| LeftToRight
| RightToLeft
| Equal
type transportInstr =
Instr of updateItem * updateItem * direction
| NoInstr
| Problem
type transportInstrTree = Node of transportInstr * transp
ortInstrList
and transportInstrList = (name * transportInstrTree) list
OCaml
UNISON: BASIC OPERATIONS
17
• Comparison of two file trees
• Description of detected difference
Update detection (buildUpdates)
• Building set of transport instructions
Reconciliation (reconcile)
• Performing transport instructions
• Giving user the opportunity to verify changes
Propagation (propagate)
UNISON: SEMANTIC FUNCTIONS
FILESYSTEM OPERATIONS
18
• assoc
• lookupPath
• reverse
• mem
• fsKind
• remove
• deletions
• buildUpdates
• buildUpdateChildren
UNISON: SEMANTIC FUNCTIONS
UPDATE DETECTION
19
• hasErrors
• hasErrorsChildren
• propagateErrors
• noConflictInstr
• reconcileNoConflict
• reconcileNoConflictChildren
• leafDirection
• combineDirections
• uassoc
• reconcile
• reconcileChildren
• reconcileLeft
UNISON: SEMANTIC FUNCTIONS
RECONCILIATION
20
• leafApply
• updateArchive
• updateArchiveChildren
• emptySource
• copyRec
• copyChildren
• copy
• checkNoUpdates
• replaceRec
• replace
UNISON: SEMANTIC FUNCTIONS
PROPAGATION
21
• performInstrLeaf
• newProps
• unchangedProps
• performInstrDir
• performInstr
• propagateLocally
• propagate
• propagateInChildren
QUESTIONS
Keying Xu:
How do authors deal with modeling gap between the
reference implementation and the specification?
22
Authors describe „modeling gap‟ limitations in
their paper
UNISON: THE “MODELING GAP”
23
 Functional program (Ocaml)
 Returns new replicas without
changing content
 Written as if it “owns”
filesystems
 Regards filesystems as simple,
mathematical tree structures
 Assumes that all operations
can be implemented
111111111111
 Treats archive as full-blown
filesystem
 Imperative program (C)
 Modifies real filesystems in-
place
 Runs with live filesystems
123123
 Operates on real
implementations of filesystems
(POSIX, NTFS, …)
 Deals with operations that might
be impossible to implement
 Stores just a fingerprint of each
file‟s contents
Reference implementation
(DSL)
Real implementation (software
tool)
QUESTIONS
Brent Carmer:
What is the connection between Unison and your DSL?
Panini Patapanchala:
Relation with the version control and what aspects you
can take from this paper.
24
• SCMF-DSL also uses concept of replication
• SCMF-DSL also operates with file trees
• SCMF-DSL also detects file changes to perform such
automatic actions as version numbering
UNISON VS SCMF-DSL
25
Unison
SCMF-
DSL
Deployment
Replication Version control
Version numberingConflicts
UNISON VS SCMF-DSL
26
 Takes into account only latest
synchronized state
 Allows synchronization only
between latest states
 Treats both file trees as equal
sources of changes (everything
is writable)11111111111
 There is no defined direction for
replication 1111111111111111111
 Operates with file trees
 Replicates contents of
filesystem
 Might generate incompatible
changes (conflicts)
 Saves information about all
synchronized states
 Allows to roll back to previous
states
 Treats file trees as primary and
secondary (can be writable or
read-only)
 Operates with certain direction
for replication: from primary
replica to secondary replica
 Operates with version trees
 Replicates contents of version
control system
 Does not generate incompatible
changes
Unison SCMF-DSL
UNISON VS SCMF-DSL
27
A B
~
A B
=
sem
Unison: file trees
SCMF-DSL: version trees
sem
1
x
2
3
57
8
9
11
x
4
6
x
10
1
x
2
3
57
8
9
11
x
4
6
x
10
12
UNISON VS SCMF-DSL
28
A B
~
A B
=
sem
Unison: file trees, 2 platforms (A, B)
SCMF-DSL: version trees, N platforms (P1, P2, … PN)
sem
1
x
2
3
57
8
9
11
x
4
6
x
10
1
x
2
3
57
8
9
11
x
4
6
x
10
12
QUESTIONS
Brent Carmer:
Does the user ever construct things using the types
listed in the reference implementation?
29
NO
User uses real implementation (tool) instead of
reference implementation (DSL)
QUESTIONS
Amin Alipour:
How can they make sure that function synch is run
atomically?
Brent Carmer:
How do they use Coq to verify their reference
implementation?
Panini Patapanchala:
Maximal runs are unique can you justify the theorem with an
example.
30
QUESTIONS
31
Authors use Coq to prove following properties of their DSL:
• Laziness is safe (replication with itself is safe )
• Mirroring is a special case (replication with previously
synchronized state o and replica a gives replica a)
• Maximal runs are unique (it is impossible to generate
two different synchronizations on the same two replicas
a and b)
• Success in the absence of conflicts (if replication does
not generate conflicts first time, it won‟t generate
conflicts next time as well)
QUESTIONS
Amin Alipour:
The paper assumes that there are only two replica of filesystem's.
Is that right? If so, how it can scale synchronization to more than
two replicas?
Rui Qin:
How about more than two replicas, does it also work?
Panini Patapanchala:
I feel the paper explained the base cases for reconciliation and
presently the more important problems are the one presented in
future scope like multi-replica synchronization for more number of
replicas.
32
NO
Unison works only with pairs of replicas
QUESTIONS
Amin Alipour:
What is the relation of conflict as described in the paper and
merge in git?
Chao Peng:
Is Unison easily extensible? can you conclude some low-
level or high-level aspects of Unison?
33
QUESTIONS
Panini Patapanchala:
The buildupdate of the implementation is a bit like
imperative implementation than functional.
34
This is partly because of mixed nature of OCaml language -
it incorporates functional, imperative and
object-oriented paradigms

Más contenido relacionado

Destacado

CS519 - Visual Software Evolution Reconstruction
CS519 - Visual Software Evolution ReconstructionCS519 - Visual Software Evolution Reconstruction
CS519 - Visual Software Evolution ReconstructionSergii Shmarkatiuk
 
1.1 introduction to scm - xp and cm are chicken-and-egg
1.1   introduction to scm - xp and cm are chicken-and-egg1.1   introduction to scm - xp and cm are chicken-and-egg
1.1 introduction to scm - xp and cm are chicken-and-eggSergii Shmarkatiuk
 
Continuous integration for se group meeting
Continuous integration for se group meetingContinuous integration for se group meeting
Continuous integration for se group meetingSergii Shmarkatiuk
 
Software version numbering - DSL of change
Software version numbering - DSL of changeSoftware version numbering - DSL of change
Software version numbering - DSL of changeSergii Shmarkatiuk
 
CS 584 - Aligning development tools with the way programmers think about code...
CS 584 - Aligning development tools with the way programmers think about code...CS 584 - Aligning development tools with the way programmers think about code...
CS 584 - Aligning development tools with the way programmers think about code...Sergii Shmarkatiuk
 
02 - Build and Deployment Management
02 - Build and Deployment Management02 - Build and Deployment Management
02 - Build and Deployment ManagementSergii Shmarkatiuk
 
Introduction to Version Control
Introduction to Version ControlIntroduction to Version Control
Introduction to Version ControlJeremy Coates
 

Destacado (11)

CS519 - Visual Software Evolution Reconstruction
CS519 - Visual Software Evolution ReconstructionCS519 - Visual Software Evolution Reconstruction
CS519 - Visual Software Evolution Reconstruction
 
1.1 introduction to scm - xp and cm are chicken-and-egg
1.1   introduction to scm - xp and cm are chicken-and-egg1.1   introduction to scm - xp and cm are chicken-and-egg
1.1 introduction to scm - xp and cm are chicken-and-egg
 
Continuous integration for se group meeting
Continuous integration for se group meetingContinuous integration for se group meeting
Continuous integration for se group meeting
 
Software version numbering - DSL of change
Software version numbering - DSL of changeSoftware version numbering - DSL of change
Software version numbering - DSL of change
 
03 - Continuous Integration
03 - Continuous Integration03 - Continuous Integration
03 - Continuous Integration
 
CS 584 - Aligning development tools with the way programmers think about code...
CS 584 - Aligning development tools with the way programmers think about code...CS 584 - Aligning development tools with the way programmers think about code...
CS 584 - Aligning development tools with the way programmers think about code...
 
02 - Build and Deployment Management
02 - Build and Deployment Management02 - Build and Deployment Management
02 - Build and Deployment Management
 
Svn Basic Tutorial
Svn Basic TutorialSvn Basic Tutorial
Svn Basic Tutorial
 
Introduction to Version Control
Introduction to Version ControlIntroduction to Version Control
Introduction to Version Control
 
Getting Git
Getting GitGetting Git
Getting Git
 
Mapeh
MapehMapeh
Mapeh
 

Similar a CS589 paper presentation - What is in unison? A formal specification and reference implementation of a file synchronizer

Linux admin interview questions
Linux admin interview questionsLinux admin interview questions
Linux admin interview questionsKavya Sri
 
FAIR Projector Builder
FAIR Projector BuilderFAIR Projector Builder
FAIR Projector BuilderMark Wilkinson
 
Plank
PlankPlank
PlankFNian
 
Environment Canada's Data Management Service
Environment Canada's Data Management ServiceEnvironment Canada's Data Management Service
Environment Canada's Data Management ServiceSafe Software
 
Eventual Consistency - JUG DA
Eventual Consistency - JUG DAEventual Consistency - JUG DA
Eventual Consistency - JUG DASusanne Braun
 
Digital Fabrication Studio.02 _Information @ Aalto Media Factory
Digital Fabrication Studio.02 _Information @ Aalto Media FactoryDigital Fabrication Studio.02 _Information @ Aalto Media Factory
Digital Fabrication Studio.02 _Information @ Aalto Media FactoryMassimo Menichinelli
 
Apache Flink London Meetup - Let's Talk ML on Flink
Apache Flink London Meetup - Let's Talk ML on FlinkApache Flink London Meetup - Let's Talk ML on Flink
Apache Flink London Meetup - Let's Talk ML on FlinkStavros Kontopoulos
 
Terraform modules restructured
Terraform modules restructuredTerraform modules restructured
Terraform modules restructuredAmi Mahloof
 
Terraform Modules Restructured
Terraform Modules RestructuredTerraform Modules Restructured
Terraform Modules RestructuredDoiT International
 
Eventual Consistency - Du musst keine Angst haben
Eventual Consistency - Du musst keine Angst habenEventual Consistency - Du musst keine Angst haben
Eventual Consistency - Du musst keine Angst habenSusanne Braun
 
Flink Forward Berlin 2017: Francesco Versaci - Integrating Flink and Kafka in...
Flink Forward Berlin 2017: Francesco Versaci - Integrating Flink and Kafka in...Flink Forward Berlin 2017: Francesco Versaci - Integrating Flink and Kafka in...
Flink Forward Berlin 2017: Francesco Versaci - Integrating Flink and Kafka in...Flink Forward
 
Open P2P Design: Workshop @ Pixelversity, Helsinki (16/09/2011)
Open P2P Design: Workshop @ Pixelversity, Helsinki (16/09/2011)Open P2P Design: Workshop @ Pixelversity, Helsinki (16/09/2011)
Open P2P Design: Workshop @ Pixelversity, Helsinki (16/09/2011)Massimo Menichinelli
 
Parallel Computing 2007: Overview
Parallel Computing 2007: OverviewParallel Computing 2007: Overview
Parallel Computing 2007: OverviewGeoffrey Fox
 
GraphConnect 2014 SF: Neo4j at Scale using Enterprise Integration Patterns
GraphConnect 2014 SF: Neo4j at Scale using Enterprise Integration PatternsGraphConnect 2014 SF: Neo4j at Scale using Enterprise Integration Patterns
GraphConnect 2014 SF: Neo4j at Scale using Enterprise Integration PatternsNeo4j
 
R12 d49656 gc10-apps dba 26
R12 d49656 gc10-apps dba 26R12 d49656 gc10-apps dba 26
R12 d49656 gc10-apps dba 26zeesniper
 
Burst Buffer: From Alpha to Omega
Burst Buffer: From Alpha to OmegaBurst Buffer: From Alpha to Omega
Burst Buffer: From Alpha to OmegaGeorge Markomanolis
 
Eventual Consistency – Du musst keine Angst haben
Eventual Consistency – Du musst keine Angst habenEventual Consistency – Du musst keine Angst haben
Eventual Consistency – Du musst keine Angst habenSusanne Braun
 
Performance improvement techniques for software distributed shared memory
Performance improvement techniques for software distributed shared memoryPerformance improvement techniques for software distributed shared memory
Performance improvement techniques for software distributed shared memoryZongYing Lyu
 
Chapter 1 - introduction - parallel computing
Chapter  1 - introduction - parallel computingChapter  1 - introduction - parallel computing
Chapter 1 - introduction - parallel computingHeman Pathak
 

Similar a CS589 paper presentation - What is in unison? A formal specification and reference implementation of a file synchronizer (20)

POS 433 Entire Course NEW
POS 433 Entire Course NEWPOS 433 Entire Course NEW
POS 433 Entire Course NEW
 
Linux admin interview questions
Linux admin interview questionsLinux admin interview questions
Linux admin interview questions
 
FAIR Projector Builder
FAIR Projector BuilderFAIR Projector Builder
FAIR Projector Builder
 
Plank
PlankPlank
Plank
 
Environment Canada's Data Management Service
Environment Canada's Data Management ServiceEnvironment Canada's Data Management Service
Environment Canada's Data Management Service
 
Eventual Consistency - JUG DA
Eventual Consistency - JUG DAEventual Consistency - JUG DA
Eventual Consistency - JUG DA
 
Digital Fabrication Studio.02 _Information @ Aalto Media Factory
Digital Fabrication Studio.02 _Information @ Aalto Media FactoryDigital Fabrication Studio.02 _Information @ Aalto Media Factory
Digital Fabrication Studio.02 _Information @ Aalto Media Factory
 
Apache Flink London Meetup - Let's Talk ML on Flink
Apache Flink London Meetup - Let's Talk ML on FlinkApache Flink London Meetup - Let's Talk ML on Flink
Apache Flink London Meetup - Let's Talk ML on Flink
 
Terraform modules restructured
Terraform modules restructuredTerraform modules restructured
Terraform modules restructured
 
Terraform Modules Restructured
Terraform Modules RestructuredTerraform Modules Restructured
Terraform Modules Restructured
 
Eventual Consistency - Du musst keine Angst haben
Eventual Consistency - Du musst keine Angst habenEventual Consistency - Du musst keine Angst haben
Eventual Consistency - Du musst keine Angst haben
 
Flink Forward Berlin 2017: Francesco Versaci - Integrating Flink and Kafka in...
Flink Forward Berlin 2017: Francesco Versaci - Integrating Flink and Kafka in...Flink Forward Berlin 2017: Francesco Versaci - Integrating Flink and Kafka in...
Flink Forward Berlin 2017: Francesco Versaci - Integrating Flink and Kafka in...
 
Open P2P Design: Workshop @ Pixelversity, Helsinki (16/09/2011)
Open P2P Design: Workshop @ Pixelversity, Helsinki (16/09/2011)Open P2P Design: Workshop @ Pixelversity, Helsinki (16/09/2011)
Open P2P Design: Workshop @ Pixelversity, Helsinki (16/09/2011)
 
Parallel Computing 2007: Overview
Parallel Computing 2007: OverviewParallel Computing 2007: Overview
Parallel Computing 2007: Overview
 
GraphConnect 2014 SF: Neo4j at Scale using Enterprise Integration Patterns
GraphConnect 2014 SF: Neo4j at Scale using Enterprise Integration PatternsGraphConnect 2014 SF: Neo4j at Scale using Enterprise Integration Patterns
GraphConnect 2014 SF: Neo4j at Scale using Enterprise Integration Patterns
 
R12 d49656 gc10-apps dba 26
R12 d49656 gc10-apps dba 26R12 d49656 gc10-apps dba 26
R12 d49656 gc10-apps dba 26
 
Burst Buffer: From Alpha to Omega
Burst Buffer: From Alpha to OmegaBurst Buffer: From Alpha to Omega
Burst Buffer: From Alpha to Omega
 
Eventual Consistency – Du musst keine Angst haben
Eventual Consistency – Du musst keine Angst habenEventual Consistency – Du musst keine Angst haben
Eventual Consistency – Du musst keine Angst haben
 
Performance improvement techniques for software distributed shared memory
Performance improvement techniques for software distributed shared memoryPerformance improvement techniques for software distributed shared memory
Performance improvement techniques for software distributed shared memory
 
Chapter 1 - introduction - parallel computing
Chapter  1 - introduction - parallel computingChapter  1 - introduction - parallel computing
Chapter 1 - introduction - parallel computing
 

Más de Sergii Shmarkatiuk

CS519 - Cloud Twin: Native Execution of Android Applications on the Windows P...
CS519 - Cloud Twin: Native Execution of Android Applications on the Windows P...CS519 - Cloud Twin: Native Execution of Android Applications on the Windows P...
CS519 - Cloud Twin: Native Execution of Android Applications on the Windows P...Sergii Shmarkatiuk
 
CS519 - homework project presentation
CS519 - homework project presentationCS519 - homework project presentation
CS519 - homework project presentationSergii Shmarkatiuk
 
CS519 - project idea presentation
CS519 - project idea presentationCS519 - project idea presentation
CS519 - project idea presentationSergii Shmarkatiuk
 
CS519 - Cloud Types for Eventual Consistency
CS519 - Cloud Types for Eventual ConsistencyCS519 - Cloud Types for Eventual Consistency
CS519 - Cloud Types for Eventual ConsistencySergii Shmarkatiuk
 
Agile software configuration management
Agile software configuration managementAgile software configuration management
Agile software configuration managementSergii Shmarkatiuk
 
управление сборками и развертыванием веб приложений
управление сборками и развертыванием веб приложенийуправление сборками и развертыванием веб приложений
управление сборками и развертыванием веб приложенийSergii Shmarkatiuk
 
Организуй свой репозиторий
Организуй свой репозиторийОрганизуй свой репозиторий
Организуй свой репозиторийSergii Shmarkatiuk
 
метод организации репозитория исходного кода
метод организации репозитория исходного кодаметод организации репозитория исходного кода
метод организации репозитория исходного кодаSergii Shmarkatiuk
 

Más de Sergii Shmarkatiuk (9)

CS519 - Cloud Twin: Native Execution of Android Applications on the Windows P...
CS519 - Cloud Twin: Native Execution of Android Applications on the Windows P...CS519 - Cloud Twin: Native Execution of Android Applications on the Windows P...
CS519 - Cloud Twin: Native Execution of Android Applications on the Windows P...
 
CS519 - homework project presentation
CS519 - homework project presentationCS519 - homework project presentation
CS519 - homework project presentation
 
CS519 - project idea presentation
CS519 - project idea presentationCS519 - project idea presentation
CS519 - project idea presentation
 
CS519 - Cloud Types for Eventual Consistency
CS519 - Cloud Types for Eventual ConsistencyCS519 - Cloud Types for Eventual Consistency
CS519 - Cloud Types for Eventual Consistency
 
Breath of life
Breath of lifeBreath of life
Breath of life
 
Agile software configuration management
Agile software configuration managementAgile software configuration management
Agile software configuration management
 
управление сборками и развертыванием веб приложений
управление сборками и развертыванием веб приложенийуправление сборками и развертыванием веб приложений
управление сборками и развертыванием веб приложений
 
Организуй свой репозиторий
Организуй свой репозиторийОрганизуй свой репозиторий
Организуй свой репозиторий
 
метод организации репозитория исходного кода
метод организации репозитория исходного кодаметод организации репозитория исходного кода
метод организации репозитория исходного кода
 

Último

Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...Akihiro Suda
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfInnovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfYashikaSharma391629
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 

Último (20)

Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfInnovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 

CS589 paper presentation - What is in unison? A formal specification and reference implementation of a file synchronizer

  • 1. WHAT’S IN UNISON? A FORMAL SPECIFICATION AND REFERENCE IMPLEMENTATION OF A FILE SYNCHRONIZER Presentation type: paper presentation Class: CS 589 – Domain Specific Languages Presenter: Sergii Shmarkatiuk Date: 5/20/2014
  • 2. TARGET DOMAIN: FILE REPLICATION AND SYNCHRONIZATION 2 File synchronization Replication MirroringDeployment Cloud storage
  • 3. COMMON USE CASE: CLOUD STORAGE AND SYNCHRONIZATION BETWEEN DEVICES 3
  • 4. COMMON USE CASE: DEPLOYMENT OF WEB-APPLICATION 4 development instance production instance http://localhost/MyApp http://myapp.com 3. upload 2. test ftp://@myapp.com/var/www/html/ 1. edit files 4. test /var/www/html/MyApp
  • 5. COMMON USE CASE: DEPLOYMENT OF WEB-APPLICATION 5 development instance production instance http://localhost/MyApp http://myapp.com 4. test /var/www/html/MyApp ftp://@myapp.com/var/www/html/ 1. edit files 5. test 2. edit files 3. sync +
  • 6. FILE SYNCHRONIZATION SOFTWARE 6 Rsync Beyond Compare Synchronize It! Dropbox Google Drive Box.net OneDrive Manual synchronization Cloud storage
  • 8. UNISON File synchronization tool Command line interface Implemented in OCaml (DSL) and C (tool) Available for all major platforms (UNIX, Win, Mac) Unlike rsync, Unison is not included into basic UNIX distributions 8
  • 9. PAPER CONTRIBUTIONS Paper presents mathematical model, DSL, mechanics and challenges of file synchronization Authors proved some properties of file synchronization operations using Coq Authors described the gap between idealistic representation and actual tool implementation 9
  • 10. QUESTIONS Keying Xu, Chao Peng: What is the semantic domain of Unison? Is it a deep or shallow embedded DSL? 10 Unison is a deep embedded DSL
  • 11. UNISON: SYNTAX AND SEMANTIC DOMAIN 11  Current states of the replicas  2 file trees  Archive (last synchronized state)  Synchronized replicas  2 file trees  Archive (last synchronized state) Syntax Semantic domain sem A B ~ A B =
  • 12. QUESTIONS Chao Peng: What is the basic object of Unison? 12
  • 13. UNISON: BASIC DATA STRUCTURES FILESYSTEM 13 type name = string type contents = string type properties = string type fs = Dir of properties * dContents | File of properties * contents | Symlink of contents | Bot and dContents = (name * fs) list OCaml
  • 14. UNISON: BASIC DATA STRUCTURES UPDATE DETECTION 14 type prevState = DIR | FILE | SYMLINK | ABSENT type ’a leafUpdate = LeafSame | LeafUpdated of ’a * ’a option OCaml
  • 15. UNISON: BASIC DATA STRUCTURES UPDATE DETECTION 15 type updateItem = Same | Updated of updateContent * prevState | Error and updateContent = UCDir of properties leafUpdate * updateChildren | UCFile of properties leafUpdate * contents leafUpdate | UCSymlink of contents leafUpdate | UCAbsent and updateChildren = (name * updateItem) list OCaml
  • 16. UNISON: BASIC DATA STRUCTURES RECONCILIATION 16 type direction = Conflict | LeftToRight | RightToLeft | Equal type transportInstr = Instr of updateItem * updateItem * direction | NoInstr | Problem type transportInstrTree = Node of transportInstr * transp ortInstrList and transportInstrList = (name * transportInstrTree) list OCaml
  • 17. UNISON: BASIC OPERATIONS 17 • Comparison of two file trees • Description of detected difference Update detection (buildUpdates) • Building set of transport instructions Reconciliation (reconcile) • Performing transport instructions • Giving user the opportunity to verify changes Propagation (propagate)
  • 18. UNISON: SEMANTIC FUNCTIONS FILESYSTEM OPERATIONS 18 • assoc • lookupPath • reverse • mem • fsKind • remove • deletions • buildUpdates • buildUpdateChildren
  • 19. UNISON: SEMANTIC FUNCTIONS UPDATE DETECTION 19 • hasErrors • hasErrorsChildren • propagateErrors • noConflictInstr • reconcileNoConflict • reconcileNoConflictChildren • leafDirection • combineDirections • uassoc • reconcile • reconcileChildren • reconcileLeft
  • 20. UNISON: SEMANTIC FUNCTIONS RECONCILIATION 20 • leafApply • updateArchive • updateArchiveChildren • emptySource • copyRec • copyChildren • copy • checkNoUpdates • replaceRec • replace
  • 21. UNISON: SEMANTIC FUNCTIONS PROPAGATION 21 • performInstrLeaf • newProps • unchangedProps • performInstrDir • performInstr • propagateLocally • propagate • propagateInChildren
  • 22. QUESTIONS Keying Xu: How do authors deal with modeling gap between the reference implementation and the specification? 22 Authors describe „modeling gap‟ limitations in their paper
  • 23. UNISON: THE “MODELING GAP” 23  Functional program (Ocaml)  Returns new replicas without changing content  Written as if it “owns” filesystems  Regards filesystems as simple, mathematical tree structures  Assumes that all operations can be implemented 111111111111  Treats archive as full-blown filesystem  Imperative program (C)  Modifies real filesystems in- place  Runs with live filesystems 123123  Operates on real implementations of filesystems (POSIX, NTFS, …)  Deals with operations that might be impossible to implement  Stores just a fingerprint of each file‟s contents Reference implementation (DSL) Real implementation (software tool)
  • 24. QUESTIONS Brent Carmer: What is the connection between Unison and your DSL? Panini Patapanchala: Relation with the version control and what aspects you can take from this paper. 24 • SCMF-DSL also uses concept of replication • SCMF-DSL also operates with file trees • SCMF-DSL also detects file changes to perform such automatic actions as version numbering
  • 25. UNISON VS SCMF-DSL 25 Unison SCMF- DSL Deployment Replication Version control Version numberingConflicts
  • 26. UNISON VS SCMF-DSL 26  Takes into account only latest synchronized state  Allows synchronization only between latest states  Treats both file trees as equal sources of changes (everything is writable)11111111111  There is no defined direction for replication 1111111111111111111  Operates with file trees  Replicates contents of filesystem  Might generate incompatible changes (conflicts)  Saves information about all synchronized states  Allows to roll back to previous states  Treats file trees as primary and secondary (can be writable or read-only)  Operates with certain direction for replication: from primary replica to secondary replica  Operates with version trees  Replicates contents of version control system  Does not generate incompatible changes Unison SCMF-DSL
  • 27. UNISON VS SCMF-DSL 27 A B ~ A B = sem Unison: file trees SCMF-DSL: version trees sem 1 x 2 3 57 8 9 11 x 4 6 x 10 1 x 2 3 57 8 9 11 x 4 6 x 10 12
  • 28. UNISON VS SCMF-DSL 28 A B ~ A B = sem Unison: file trees, 2 platforms (A, B) SCMF-DSL: version trees, N platforms (P1, P2, … PN) sem 1 x 2 3 57 8 9 11 x 4 6 x 10 1 x 2 3 57 8 9 11 x 4 6 x 10 12
  • 29. QUESTIONS Brent Carmer: Does the user ever construct things using the types listed in the reference implementation? 29 NO User uses real implementation (tool) instead of reference implementation (DSL)
  • 30. QUESTIONS Amin Alipour: How can they make sure that function synch is run atomically? Brent Carmer: How do they use Coq to verify their reference implementation? Panini Patapanchala: Maximal runs are unique can you justify the theorem with an example. 30
  • 31. QUESTIONS 31 Authors use Coq to prove following properties of their DSL: • Laziness is safe (replication with itself is safe ) • Mirroring is a special case (replication with previously synchronized state o and replica a gives replica a) • Maximal runs are unique (it is impossible to generate two different synchronizations on the same two replicas a and b) • Success in the absence of conflicts (if replication does not generate conflicts first time, it won‟t generate conflicts next time as well)
  • 32. QUESTIONS Amin Alipour: The paper assumes that there are only two replica of filesystem's. Is that right? If so, how it can scale synchronization to more than two replicas? Rui Qin: How about more than two replicas, does it also work? Panini Patapanchala: I feel the paper explained the base cases for reconciliation and presently the more important problems are the one presented in future scope like multi-replica synchronization for more number of replicas. 32 NO Unison works only with pairs of replicas
  • 33. QUESTIONS Amin Alipour: What is the relation of conflict as described in the paper and merge in git? Chao Peng: Is Unison easily extensible? can you conclude some low- level or high-level aspects of Unison? 33
  • 34. QUESTIONS Panini Patapanchala: The buildupdate of the implementation is a bit like imperative implementation than functional. 34 This is partly because of mixed nature of OCaml language - it incorporates functional, imperative and object-oriented paradigms

Notas del editor

  1. Hello everybody. Today I will be presenting paper about file synchronization tool called Unison created by the researchers at the University of Pennsylvania. I know that all of you read the paper. So, you probably already know a little bit about file synchronization. Nevertheless, let me do quick recap on the target domain of the DSL described in the paper.
  2. Target domain is file synchronization. There are also related activities, such as … Unison can be used to help with those activities because In one way or another listed activities employ concept of file synchronization. Basically, those are all synonyms with few minor differences. Core principle is the same – file synchronization.
  3. If you will say that you never used tool for file synchronization, I won’t believe you. The most common use case for file synchronization is cloud storage. And thanks to cloud storage tools such as Dropbox and Google Drive today not only software engineers use file synchronization, but also end-users to keep their documents up to date on different devices.
  4. Another common use case is deployment of web-application. How many of you have personal web-page? How do you update content of your web-page? Do you edit it manually directly on the server or do you edit it locally and then upload it to the server? Personally I prefer editing it locally and uploading it to the server after I tested it on my machine
  5. But sometimes I need to perform changes directly on the server. In that case I will need to synchronize files after I edited it in different locations. Such tools as unison can help with that.
  6. There are many similar tools for file synchronization – manual and automatic
  7. There are also tools used specifically for deployment of applications and infrastructure. They provide high-level abstractions for file synchronization hiding technical details of file synchronization from the users.
  8. What is unison and how is it different from all other tools?
  9. Why do we need it then if it is the same as rsync? It is beneficial for us as the researchers to know more about file synchronization DSL, mechanics of file synchronization, prove properties of the DSL and learn about approach of converting DSL into real-world tool that can be used by real users.
  10. Unison is a deep embedded DSLBecause basic types and semantic functions are defined separately
  11. Unison takes current states of the replicas as an inputAnd produces synchronized replicas as an output
  12. Let me provide an overview of the file sync workflow used by Unison.There are few basic operations introduced by Unison, such as …
  13. There are certain DSL helper functions used to help with filesystem operations, …
  14. … with update detection, …
  15. … with reconciliation …
  16. … and with propagation …
  17. Authors just describe ‘modeling gap’ limitations in their paper
  18. They come up with several important points on conceptual differences between DSL implementation and tool implementation.I consider this to be one of the most important paper contributions because I believe in one way or another all DSL developers face the problem of implementing real tool and matching initial idealistic specification of the DSL with real world and coping with implementation problems.Some operations cannot be implemented sometimes. For example, atomic rename. There are problems with that on different OS.
  19. Unison is the most close match with my DSL among other available DSLs I reviewed. It is somehow similar, but it is also different at the same time.
  20. Learning about system as a whole
  21. Learning about system as a whole
  22. У сегодняшнего тренинга две цели.Первая - ?Вторая – ?
  23. Marco D’Ambros and MicheleLanza describe approach of software evolution reconstruction. Its goal is to help with software history visualization
  24. Marco D’Ambros and MicheleLanza describe approach of software evolution reconstruction. Its goal is to help with software history visualization
  25. What I liked:Discrete time moduleWhat I didn’t like:CVS module view, CVS revision viewNot enough accent on evolutionAmbivalent:Fractal view