Line 3: |
Line 3: |
| == Summary == | | == Summary == |
| | | |
− | The requirements: | + | The design and implementation are tailored by the following intentions: |
| | | |
− | * Implement the initial server in a [[Platform_Team/Sugar_Network/0.1/Roadmap|short period of time]]; | + | * Implementation should be as lightweight as possible to run all components on restricted hardware like XO laptops; |
− | * Server should work on [[Deployment_Team/Peru/Puno#The_problem|XO laptops]];
| + | * Minimize any maintaining costs as much as possible to use Sugar Network in environments like offline schools where the only maintainers are not IT skilled people; |
− | * System should support synchronisation between distributed servers and provide full featured text search. | + | * Assume decentralization scheme when Sugar Network nodes might be started on different servers with further online or offline synchronization with the master. |
| | | |
− | That's why using [[Platform_Team/Sugar_Network/Active_Document|Active Document]] to:
| + | To accomplish above tasks, Sugar Network content is handled by the [[Platform_Team/Active_Document|active-document]] library which uses Xapian to index content and simple filesystem storage (might be changed in the future). |
| | | |
− | * Server should be as simple/lightweight as possible;
| + | Sugar Network is represented by two major applications to run on Sugar Network node or users side: |
− | * 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 [[Sugar_Network/Concept#Resources|resources]] are being represented as Active Document's classes, resource objects as Active Document's objects.
| + | * [[#sugar-network-node|sugar-network-node]], and, |
| + | * [[#sugar-network-client|sugar-network-client]]. |
| | | |
− | == Usage ==
| + | In both cases, applications provide RESTful [[Platform_Team/Sugar_Network/API|API]] as the only access point for outer usage. Any end users related functionality implemented in Sugar Network [[Platform_Team/Sugar_Network#Clients|clients]] on top of API providers. |
| | | |
− | === Public instance === | + | == sugar-network-node == |
| | | |
− | Testing instance is {{Code|api.network.sugarlabs.org}}. It support HTTPS connections using StartSSL certificate.
| + | == sugar-network-client == |
| | | |
− | Add the {{Code|18.85.44.120 api.network.sugarlabs.org}} IP to {{Code|/etc/hosts}} file and use http://api.network.sugarlabs.org:8000 as connection url.
| + | == Usage == |
− | | |
− | === Local instance === | |
− | | |
− | Attach [http://download.sugarlabs.org/packages/Server:/Factory/ Server:Factory] repository. For Ubuntu repositories, download GPG key:
| |
− | | |
− | wget -qO- <REPO-URL>/Release.key | sudo apt-key add -
| |
− | | |
− | And install {{Code|sugar-network-server}} package.
| |
− | | |
− | To see current configuration:
| |
− | | |
− | sugar-network-server config
| |
− | | |
− | Default configuration is (tweak {{Code|/etc/sugar-network-server.conf}} file to change it):
| |
− | | |
− | * server listens {{Code|0.0.0.0:8000}} address;
| |
− | * database in {{Code|/var/lib/sugar-network}} directory;
| |
− | * log directory in {{Code|/var/log/sugar-network}}.
| |
− | | |
− | To start server:
| |
− | | |
− | /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 (it will take some time to create indexes).
| |
− | | |
− | == Features ==
| |
| | | |
− | === Collecting usage statics ===
| + | Install ''sugar-network'' package from the Factory repository from [[Sweets Distribution]] or checkout sources from [http://git.sugarlabs.org/network Gitorious]: |
| | | |
− | Server will accept [[Platform_Team/Usage_Statistics|usage statistics]] from clients (and, for master server, from nodes) and will keep them in {{Code|--stats-root}} directory.
| + | git clone git://git.sugarlabs.org/network/network.git --recurse-submodules |
| | | |
− | == Todo == | + | == See Also == |
| | | |
− | * 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 [http://developers.facebook.com/docs/reference/api/realtime/ real-time updates]. | + | * Sugar Network [[Platform_Team/Sugar_Network/API|API]]. |
− | * Support collaborative work on Wiki pages for different resources. | + | * Distribution [[Sugar_Network#Try_it|options]]. |
| + | * Sugar Network [[Platform_Team/Sugar_Network#Clients|clients]]. |
| | | |
| == Getting involved == | | == Getting involved == |
| | | |
| {{:Sugar_Network/Feedback}} | | {{:Sugar_Network/Feedback}} |
− | * [[Sugar Server Kit]]'s [http://git.sugarlabs.org/server Gitorious project] for server side libraries.
| |
− | * Sugar Network's [http://git.sugarlabs.org/network Gitorious projects] itself.
| |