-
Notifications
You must be signed in to change notification settings - Fork 1
Concepts
In this page, the basic concepts of Openbox are going to be explained. Be patient while this is a work in progress.
The Openbox server is a small Java application (downloadable from here either in source or installer format). It contains the "server" part of Openbox, and should be installed on the machine (desktop/laptop) that Openbox "serves" to your mobile phone. The Openbox server monitors a folder of your system for changes, and asks your Openbox client (mobile phone) to get a copy of them.
The Openbox client is an application that is downloaded from the Android Market. This application lives in your phone and registers for incoming "calls" of Openbox servers (see above).
The Openbox client on your mobile phone is constantly listening for a connection. In a sense the client-server paradigm is reversed, similarly to the way the Xwindows server works. For a connection to be made, the following must occur: a) Openbox server broadcasts a server message to the network. This message denotes the servers' presense. b) Openbox client receives the message and checks if the server is "known" already. If yes, go to (d), else (c) c) The server is not known. The user is notified via the notifications bar and may choose to ignore or pair this server. d) If the server is "known" or "paired", the Openbox client can check to see file differences and start the synchronisation process.
Whenever a "connection" is made, the client checks for the servers' authorisation, and if none exists, prompts you with some details (e.g. the server name/description) and a challenge/response code. The code should be entered on the Openbox server within a reasonable timeframe and if all goes well, the two are paired and can transfer information between each other. Using the challenge/response code and other variables, both sides compute a private/public key combination and publish their public key to the other side.
The Openbox client on the mobile phone can sync between different locations at the same time; it does so sequentially for performance reasons. While the Openbox servers are reachable, a synchronisation operation may occur once every 5 minutes. During that operation, the following are checked: a) time between the client and server - lag is calculated and a time difference is extrapolated. b) list of files on each side w/modification time, size and MD5 are compared. c) in case of differences, the latest file wins and gets copied over to the other side (synchronisation works both ways). d) for each of the files to be synchronised, the file is fragmented to pieces and the transfer process(es) are initiated.
Openbox uses public key encryption for data traveling in the network. For performance reasons, the "advertising" and network lag/time difference phases are not encrypted. The transfer of data (synchronisation process) is completely encrypted via means of public key encryption via public keys communicated in advance. The following data are encrypted prior to transmission:
- list of files and details of
- decisions on copy/delete operations
- file data (blocks of data)