Click here to Skip to main content
15,889,096 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
GeneralRe: How to design the accessibility problem Pin
Richard MacCutchan8-Feb-16 3:03
mveRichard MacCutchan8-Feb-16 3:03 
GeneralRe: How to design the accessibility problem Pin
jschell12-Feb-16 12:31
jschell12-Feb-16 12:31 
QuestionOpinions on dividing up a single entity framework layer in source control Pin
darkliahos4-Feb-16 5:18
darkliahos4-Feb-16 5:18 
AnswerRe: Opinions on dividing up a single entity framework layer in source control Pin
Gerry Schmitz4-Feb-16 7:25
mveGerry Schmitz4-Feb-16 7:25 
GeneralRe: Opinions on dividing up a single entity framework layer in source control Pin
darkliahos6-Feb-16 2:38
darkliahos6-Feb-16 2:38 
GeneralRe: Opinions on dividing up a single entity framework layer in source control Pin
Gerry Schmitz6-Feb-16 5:44
mveGerry Schmitz6-Feb-16 5:44 
AnswerRe: Opinions on dividing up a single entity framework layer in source control Pin
jschell6-Feb-16 13:29
jschell6-Feb-16 13:29 
QuestionFile Sharing App (DropBox) Propose Architecture Pin
zephaneas3-Feb-16 9:30
zephaneas3-Feb-16 9:30 
Here's some thoughts on a potential design for a file transfer application. I welcome any input you may have:

Purpose
Provide a real-time file transfer service that allows users to upload/download files to/from a server and to provide automatic synchronization between the server and the user machines.

A user-specified folder structure can be defined on the local machine. When a file or folder is added, modified, or deleted (Known as a Change) in any file or folder in this structure is the added, modified, or deleted on the server accordingly.

When a Change occurs, all users must be notified, and automatic folder/file synchronization between the server and the local file structures must be automatic and transparent to the users.

Proposed Solution (Prototype)
- The local machine will run a FileSystemWatcher hosted by a windows service.
- FTP wil be used to transfer files to/from the server.
- A SignalR service will be hosted on the server and function as the mechanism for maintainin connection to and communicating Changes Messages between clients.

A Change Message contains the following data:
1. Client Id (GUID) - The ID of the client originating the change
2. Item Type - File or Folder
2. Name - Full path and name of the file or folder
4. Action - Create, Modify, Delete
5. Location - Client or Server

Use Case 1 - File Added
A user drags a file into a folder called c:\TheApp\SomeFolder\MyFile.txt. The file does not already exist in the folder. The FileSystemWatcher detects the new file, FTP's it to the server with progress reporing. Once the upload is commplete then the client transmists a message to the server as such:
Client:     {6FD41E1C-0057-44E4-B1AA-E0A4A263ABA3}
ItemType:   File
Name:       "c:\TheApp\SomeFolder\MyFile.txt"
Action      New
Location:   Client

The server recieves the message, verifys that the file exists on the server, then generates and sends the following message to all clients except the sender:
Client:     {6FD41E1C-0057-44E4-B1AA-E0A4A263ABA3}
ItemType:   File
Name:       "SomeFolder\MyFile.txt"
Action      New
Location:   Server

The client recieves the message and then initiates an FTP of the file "SomeFolder\MyFile.txt" to "c:\TheApp\SomeFolder\MyFile.txt".

Use Case 2 - Folder Deleted
A user removes the folder c:\TheApp\SomeFolder. The FileSystemWatcher detects the change and transmists a message to the server as such:
Client:     {6FD41E1C-0057-44E4-B1AA-E0A4A263ABA3}
ItemType:   Folder
Name:       "c:\TheApp\SomeFolder\"
Action      Delete
Location:   Client

The server recieves the message, verifys that the folder exists on the server, deletes the folder "SomeFolder", then generates and sends the following message to all clients except the sender:
Client:     {6FD41E1C-0057-44E4-B1AA-E0A4A263ABA3}
ItemType:   File
Name:       "SomeFolder\MyFile.txt"
Action      New
Location:   Server

The client recieves the message and then deletes the folder "c:\TheApp\SomeFolder".

Issue - Simultaneous Changes by Mutiple Users
User A changes the contents of a file but does NOT save and leaves the file in an edited state. User B changes the contents of the same file and saves it. User A then saves changes to the file.

The local component of the application could use the date/time stamp of the file to determine the disposition of the file, but there may be differences in those date/times. The simplest implementation could be to run the last action received on the file.
AnswerRe: File Sharing App (DropBox) Propose Architecture Pin
Gerry Schmitz4-Feb-16 7:48
mveGerry Schmitz4-Feb-16 7:48 
GeneralRe: File Sharing App (DropBox) Propose Architecture Pin
Kevin Marois4-Feb-16 8:41
professionalKevin Marois4-Feb-16 8:41 
GeneralRe: File Sharing App (DropBox) Propose Architecture Pin
Gerry Schmitz4-Feb-16 9:18
mveGerry Schmitz4-Feb-16 9:18 
GeneralRe: File Sharing App (DropBox) Propose Architecture Pin
Kevin Marois4-Feb-16 9:30
professionalKevin Marois4-Feb-16 9:30 
GeneralRe: File Sharing App (DropBox) Propose Architecture Pin
Gerry Schmitz4-Feb-16 9:36
mveGerry Schmitz4-Feb-16 9:36 
GeneralRe: File Sharing App (DropBox) Propose Architecture Pin
Kevin Marois4-Feb-16 9:41
professionalKevin Marois4-Feb-16 9:41 
QuestionDropBox Type Of App Pin
zephaneas2-Feb-16 10:30
zephaneas2-Feb-16 10:30 
AnswerRe: DropBox Type Of App Pin
Eddy Vluggen2-Feb-16 12:41
professionalEddy Vluggen2-Feb-16 12:41 
GeneralRe: DropBox Type Of App Pin
Kevin Marois3-Feb-16 7:57
professionalKevin Marois3-Feb-16 7:57 
GeneralRe: DropBox Type Of App Pin
Eddy Vluggen3-Feb-16 8:40
professionalEddy Vluggen3-Feb-16 8:40 
AnswerRe: DropBox Type Of App Pin
jschell2-Feb-16 13:30
jschell2-Feb-16 13:30 
GeneralRe: DropBox Type Of App Pin
Kevin Marois3-Feb-16 7:58
professionalKevin Marois3-Feb-16 7:58 
GeneralRe: DropBox Type Of App Pin
Eddy Vluggen3-Feb-16 8:48
professionalEddy Vluggen3-Feb-16 8:48 
GeneralRe: DropBox Type Of App Pin
zephaneas3-Feb-16 8:52
zephaneas3-Feb-16 8:52 
GeneralRe: DropBox Type Of App Pin
Eddy Vluggen3-Feb-16 9:05
professionalEddy Vluggen3-Feb-16 9:05 
GeneralRe: DropBox Type Of App Pin
jschell6-Feb-16 13:20
jschell6-Feb-16 13:20 
AnswerRe: DropBox Type Of App Pin
Gerry Schmitz3-Feb-16 8:29
mveGerry Schmitz3-Feb-16 8:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.