Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 74 lines (49 sloc) 2.351 kB
ceb5ac5 Updated README
brstgt authored
1 socket-push
2 ===========
3 is a highly scalable and fault tolerant COMET solution with a shared nothing architecture built on top of socket.io, connect and noderpc.
4 There is no single point of failure. socket.io is used for client connections.
5 It offers services for
6
7 * user authentication
8 * channel pub/sub
9 * multiple socket connections per user
10
11 Each service is fully shardeable via noderpc. This means, there can be several independant nodes for handling user connections, channel management and auth service and even completely independant and fault tolerant management nodes that maybe fully loadbalanced.
12
6465055 Edited README.md via GitHub
Benjamin Roth authored
13 Install
14 -------
15
16 npm install socket-push
17
ceb5ac5 Updated README
brstgt authored
18 Demo
19 ----
20
21 For a demo, simply download and start with "node server.js". Start your browser with
22
23 * http://127.0.0.1:8080 to start a client socket
24 * http://127.0.0.1:8181 to see the self exposing management interface
25
26 Then
27
28 1. Register a user in the management interface with auth set, e.g. userId 1 and sessionId test
29 2. Use the same userId + sessionId in the client interface to start a session
30 3. Do a user/publish on userId 1 with a message of your choice
31
32
33 Management API
34 --------------
35
36 The management API can be addressed via
37
38 * HTTP directly
39 * node.js objects
40 * PHP
41
42 In fact, the server uses its own client API internally for sharding and distributing requests.
43 In rpc/bindings/php is an API generator for PHP which generates PHP classes to access the management API.
44
45 Client bindings
46 ---------------
47
48 In node.js it looks like this:
49
50 var authServiceDefinition = require('service/auth.js');
51 var authService = new (require('rpc/proxy/http'))(authServiceDefinition, '127.0.0.1', 8181);
52 authService.set(1, 'test', function(resultOnSuccess) {}, function(exception) {});
53
54 In PHP it looks like this:
55
8e29859 Edited README.md via GitHub
Benjamin Roth authored
56 First generate Service class
57
58 rpc/bindings/php> generateApi.php -h 127.0.0.1 -p 8181
59
60 Then
61
ceb5ac5 Updated README
brstgt authored
62 $authService = new NodeRPC_Auth_Service('127.0.0.1', 8181);
63 $authService->set(1, 'test');
64
65 The API, literally speaking naming of services, methods and parameters is consistent across the client APIs in node.js, PHP and via HTTP.
66
67 TODO
68 ----
69
ab709c7 Edited README.md via GitHub
Benjamin Roth authored
70 * worker.heartbeat method
71 ** elect spare workers on node down
a809331 Implemented Application class as service collection in rpc/binding/php
brstgt authored
72 * abstraction for distributed config, node and election strategy
e4aeed5 Edited README.md via GitHub
Benjamin Roth authored
73 * allow client to subscribe to channels optionally
74 * optionally subscribe to channel as session instead of user
Something went wrong with that request. Please try again.