########################################################################
# webdar - a web server and interface program to libdar
# Copyright (C) 2013-2023 Denis Corbin
#
# This file is part of Webdar
#
#  Webdar is free software: you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation, either version 3 of the License, or
#  (at your option) any later version.
#
#  Webdar is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with Webdar.  If not, see <http://www.gnu.org/licenses/>
#
#----
#  to contact the author: dar.linux@free.fr
########################################################################

WEBDAR PROJECT

Introduction:
       The following is a description of software project from the
       services it should provide to the possible way it could be
       implemented. This is a proposal, subject to dscussion in all
       its aspects.

AIM:
        The main targets for the initial release are:
        - provide a web-base interface to libdar
        - it should be usable with most popular browser
        - let libdar store slices to remote storage through FTP as an
	  alternative to local filesystem
        - propose a basic authentication mecanism (for now) like
          dynamically generated password displayed on stdout for use
          throught the web session.
	- for the initial release, only few Unixes systems will be
	  supported but at least Linux, FreeBSD and MacOS X.


Form and Constraints:
        - webdar must be available as a single executable
          suitable for use in bootable Live-CD systems.
          It may be available as shared and statically linked
          binary.
	- It must not rely on any existing directory tree to provide
 	  a web service (a single static binary should work alone)
	- It shall be able to work even on a read-only filesystem,
	  and should not need to pass through filesystem to provide
	  a gateway between libdar and http protocol (to avoid
	  performance penalty during backup as most of the disk bandwidth
	  would be used by the backup/restoration process).
	- it must not rely on any non GPL or proprietary software, both
	  for building the software and for working.



LICENSING:
	Webdar will be released under GPLv3. Version 3 is important
	for Webdar as it could be easily emmbedded in many proprietary
	devices.

ARCHITECTURE:

+----------+         +--------------------------+
| browser  |<------->| WEBDAR                   |                   +----------+
+----------+         +--------------------------+                   | FTP/SFTP |
                     | libdar                   |<#################>| Server   |
                     |                          |  slice drop/read  |          |
                     |                          |                   +----------+
                     +--------------------------+                        ^
                        ^            ^                                   #
     backup/restoration +            # slice drop/read                   #
                        +            #                                   #
			+            #                                   #
                        v            v                                   v
--------   network   --------------------------------   network    -------------
                               local                                  remote
                             filesystem                             filesystem



POSSIBLE EVOLUTIONS:
      Room should be done for future evolutions:
       - support for daemon mode and user priviledge management (with a
         semaphore to limit the maximum number of running backup at a given
	 time, other job get pending for a slot to get free => new session
	 status "pending" => scheduling/queuing)
       - support for concurrent sessions (may not be available in version 1.0)
       - support webdar configuration/restoration using the http interface
       - implement dar_manager API
