README
author Leslie Michael Orchard <lorchard@mozilla.com>
Thu, 06 May 2010 15:49:17 -0400
changeset 85 24bba735d86d108c3365a6cdad1561b0d50d04b2
parent 20 c9ae24b36c91bac8a6a4f40e4b5b8bec5e440edb
permissions -rw-r--r--
bug 563820: Fix for UTF8 detection in strings, including passwords, r=telliott

This library implements the Browser Sync portion of the Weave Services. 

Full documentation for this section of the API can be found at: https://wiki.mozilla.org/Labs/Weave/Sync/1.0/API

Full setup instructions can be found at: https://wiki.mozilla.org/Labs/Weave/Sync/1.0/Setup

SETUP SUMMARY:

REQUIRES:
apache, configured with ssl and a valid certificate.
php with json, utf8 and pdo support
mysql
The Weave Registration module

APACHE CONFIG:

Apache configs can vary widely, depending on whether you are doing this inside a VirtualHost and how
your system is configured. The Aliases that need to be set up are as follows:

Alias /1.0 <full path to install directory>/weaveserver-sync/1.0/index.php


MYSQL SETUP:

Create a database in mysql

CREATE TABLE `collections` (
  `userid` int(11) NOT NULL,
  `collectionid` smallint(6) NOT NULL,
  `name` varchar(32) NOT NULL,
  PRIMARY KEY  (`userid`,`collectionid`),
  KEY `nameindex` (`userid`,`name`)
) ENGINE=InnoDB;

CREATE TABLE `wbo` (
  `username` int(11) NOT NULL,
  `collection` smallint(6) NOT NULL default '0',
  `id` varbinary(64) NOT NULL default '',
  `parentid` varbinary(64) default NULL,
  `predecessorid` varbinary(64) default NULL,
  `sortindex` int(11) default NULL,
  `modified` bigint(20) default NULL,
  `payload` longtext,
  `payload_size` int(11) default NULL,
  PRIMARY KEY  (`username`,`collection`,`id`),
  KEY `parentindex` (`username`,`collection`,`parentid`),
  KEY `modified` (`username`,`collection`,`modified`),
  KEY `weightindex` (`username`,`collection`,`sortindex`),
  KEY `predecessorindex` (`username`,`collection`,`predecessorid`),
  KEY `size_index` (`username`,`payload_size`)
) ENGINE=InnoDB;


CONSTANTS:

Copy weaveserver-sync/1.0/default_constants.php.dist to default_constants.php and 
follow the instructions in it to set your constants

TESTING:

Create a user and set it in your constants. Run the tests/test_1.0.php script on the command line
in the tests folder (make sure that folder isn't accessible for apache).

CLIENT VALUES:

Set extensions.weave.clusterURL to https://<your server>/weave-sync/