/*
* checkpointing module for the database
*
- * Copyright (c) 1987-2011 by the citadel.org team
+ * Copyright (c) 1987-2012 by the citadel.org team
*
* This program is open source 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.
+ * modify it under the terms of the GNU General Public License, version 3.
*
* This program 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 this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "sysdep.h"
#include <ctype.h>
#include <string.h>
#include <errno.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <dirent.h>
-
-#ifdef HAVE_DB_H
-#include <db.h>
-#elif defined(HAVE_DB4_DB_H)
-#include <db4/db.h>
-#else
-#error Neither <db.h> nor <db4/db.h> was found by configure. Install db4-devel.
-#endif
-
-
-#if DB_VERSION_MAJOR < 4 || DB_VERSION_MINOR < 1
-#error Citadel requires Berkeley DB v4.1 or newer. Please upgrade.
-#endif
#include <libcitadel.h>
#include "citadel.h"
#include "server.h"
#include "citserver.h"
-#include "database.h"
#include "msgbase.h"
#include "sysdep_decls.h"
#include "config.h"
#include "ctdl_module.h"
#include "context.h"
-
-
CTDL_MODULE_INIT(checkpoint) {
if (threading)
+++ /dev/null
-This will be a module to synchronise two Citadel servers.
-
-We should add comments here for features that are needed
-
-
-The initial plan is that this module will provide services to allow
-a new Citadel server to collect all data from an existing Citadel server
-resulting in the new server being a complete duplicate of the original.
-
-All data must be transfered over the wire.
-The data synchronised should include the log in/out messages and anyfiles
-in a room not just the content of the message base.
-
-I think we should structure this as a series of commands that can be issued
-in any order with the exception of one command that forces the exporting
-server to go "single user" to ensure the system doesn't change during the sync.
-
-These are the commands I can think of at the moment.
-
-SNGL Go single user.
-This will prevent new logins from happening and also prevent inbound messages
-from SMTP, IMAP RSS and IGNET etc.
-This command should allow real user to complete what they are doing and should
-probably give them a message to say the system wants to go single user.
-This command should take two arguments. The first is the time to wait for the
-system to go single user. The second argument is the time to expire single user
-mode if the requesting server disappears.
-
-ESNG End single user mode.
-
-SYNC Main command for all synchronisation options.
-This is to be followed by 2 or more arguments.
-Argument 1 is the type of Citadel data to be worked with eg. rooms, files
-messages, users etc.
-Argument 2 is the action to carry out on the specified data.
-
-
-So a sequence might go something like this:
-
-Unconfigured server. Old server
-SNGL 120|500 Goes single user within 120
- seconds. Reverts to normal
- operation if no activity
- for 500 seconds.
-
-SYNC users|info Send back info on the system
- users. A CRC and a few other
- items so that the requesting
- server can determine if its
- user data is out of sync.
-
-SYNC users|getall Send back all users info.
-
-ESNG Revert back to multi user mode.
-
-
-Obviously there is lots to be worked out here. It may be a good idea to
-timestamp every thing to determine the need for updates.
-
-If we do this right this module could replace IGNET and ARTV and could be used
-clients to sync mailboxes and calendars etc.
-
-We should care a bit about performance here.
--> not use the sendcommand/ctdl_ipc here.
-To gain performance, (profiler says...) we musn't read byte by byte aymore, but read blocks.
-thus the out/input format should be a bit similar to the http chunked mode, sending blobs of
-n bytes at once.
-Probably up 64K windows are apropriate here. it could look like that:
-<line by line mode>
-Messageheader=blabla
-AnotherMessageHeader=blub
-DATA CHUNK 65535
-< 64 k BLOB >
-CHUNK 2344
-< 2344 bytes; probably the overlaps of the message. >
-
/*
- * A skeleton module to test the dynamic loader.
- *
+ * This is an empty skeleton of a Citadel server module, included to demonstrate
+ * how to add a new module to the system and how to activate it in the server.
+ *
* Copyright (c) 1998-2012 by the citadel.org team
*
* This program is open source software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3.
- *
- *
*
* This program 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.
- *
- *
- *
- *
*/
#include "sysdep.h"