Difference between revisions of "Platform Team/Sugar Network/Implementation"

From Sugar Labs
Jump to navigation Jump to search
Line 36: Line 36:
 
  sugar-network-server config
 
  sugar-network-server config
  
Default configuration is:
+
Default configuration is (tweak {{Code|/etc/sugar-network-server.conf}} file to change it):
  
 
* server listens {{Code|0.0.0.0:8000}} address;
 
* server listens {{Code|0.0.0.0:8000}} address;
 
* database in {{Code|/var/lib/sugar-network}} directory;
 
* database in {{Code|/var/lib/sugar-network}} directory;
 
* log directory in {{Code|/var/log/sugar-network}}.
 
* log directory in {{Code|/var/log/sugar-network}}.
 
To change configuration, tweak {{Code|/etc/sugar-network-server.conf}} file.
 
  
 
To start server:
 
To start server:
  
 
  /etc/init.d/sugar-network-server start
 
  /etc/init.d/sugar-network-server start
 +
 +
To simplify testing, untar example [http://people.sugarlabs.org/~alsroot/db.tar.xz db data] to {{Code|/var/lib/sugar-network}} and restart server.
  
 
== Todo ==
 
== Todo ==

Revision as of 11:11, 20 March 2012

Summary

The requirements:

  • Implement the initial server in a short period of time;
  • Server should work on XO laptops;
  • System should support synchronisation between distributed servers and provide full featured text search.

That's why using Active Document to:

  • Server should be as simple/lightweight as possible;
  • No SQL, just NoSQL;
  • Since server should support full featured text search, use Xapian and keep it as a "NoSQL replacement" with storing data directly in files system;
  • If server will start serving users from the Internet and current implementation won't manage to handle multiple requests, another implementation might be created.

All resources are being represented as Active Document's classes, resource objects as Active Document's objects.

Usage

Public instance

Testing instance is api.network.sugarlabs.org. It support HTTPS connections using StartSSL certificate.

Add the 18.85.44.120 api.network.sugarlabs.org IP to /etc/hosts file.

Local instance

Attach Server:Factory repository. For Ubuntu repositories, download GPG key:

wget -qO- <REPO-URL>/Release.key | sudo apt-key add -

And install sugar-network-server package.

To see current configuration:

sugar-network-server config

Default configuration is (tweak /etc/sugar-network-server.conf file to change it):

  • server listens 0.0.0.0:8000 address;
  • database in /var/lib/sugar-network directory;
  • log directory in /var/log/sugar-network.

To start server:

/etc/init.d/sugar-network-server start

To simplify testing, untar example db data to /var/lib/sugar-network and restart server.

Todo

  • Network notifications framework to, e.g., let client cache resources and refetch them only on updates. Reuse existing or implement something similar to Facebook's real-time updates.
  • Support collaborative work on Wiki pages for different resources.

Getting involved