Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client Migration #19

Open
wants to merge 156 commits into
base: dev_CFM
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
156 commits
Select commit Hold shift + click to select a range
65eaa99
add worklog
Sep 10, 2012
06589fb
VSS server JSON response fixed
Sep 28, 2012
4e6d5be
get subscribers returns correct ident
Sep 29, 2012
088031a
catch exception during VONpeer tick
Sep 30, 2012
860de2d
fixed disconnect issues so now it's handled properly
Sep 30, 2012
38f013d
modify VSS server publish/pos response to be query subscribers
Oct 1, 2012
ce727a1
VSS response fixed, adopt msg_handler with VON_peer
Oct 25, 2012
e31ce4e
set default error level to 2 (in common.js)
Oct 25, 2012
3fce357
turn off processData log
Oct 25, 2012
a9ea501
no subscriber return empty array
Oct 25, 2012
16b759f
modify VON join behavior to discover neighbors immediately after VON_…
Oct 26, 2012
d7e2ff8
fix VSS dealing with invalid request
Oct 27, 2012
6509d22
VSS server to perform id to ident mapping
Oct 30, 2012
01cc601
bugfix: meta data discovery between remote VSS servers
Oct 30, 2012
c43c649
VON_PING added, msg_handler work with VON_peer
Nov 22, 2012
70c6807
unsubscribe for VSS will not report itself when positions overlapped
Nov 22, 2012
0157f29
add close() to net layers and shut() to VON_peer, VAST.js works with …
Nov 27, 2012
731d104
modify listen error display to single line
Nov 27, 2012
9820dd2
id attached to all vast_net messages
Mar 5, 2013
3cf2a8f
re-structure directory to be integrated with ImonCloud
Mar 5, 2013
8e450da
VSS dependency fix
Mar 7, 2013
5e4bfba
VSS publish_pos returns new_list/left_list/subscribers
Mar 13, 2013
9ea938d
VSS RPC mechanism first functional
Mar 26, 2013
2228abe
update VSS logic
Apr 7, 2013
e496349
FIX: socket handling to support node 0.10.4
Apr 15, 2013
b3fc46d
FIX: getNode not found bug in VSS/logic.js
Apr 16, 2013
763665f
FIX: VSS query/subscribers did not return as expecred'
Apr 17, 2013
4352089
FIX: VSS query/subscribers returns subscriber list only
Apr 17, 2013
f38d2b7
MOD: VSS revokeNode returns subscriber list instead of just OK
Apr 18, 2013
9dc73fa
ADD: VSS directory listNode added for a given VSS server
May 3, 2013
cde43da
ADD: VSS/logic will return unsubscribe_list
May 16, 2013
8f91aa1
FIX: unsubscribe_list content error
May 16, 2013
8669153
0.0.1-0: FIX: make sure tests / html can execute in tests directory
Jul 30, 2014
e33f145
0.0.1 fixing Readme and package.json
Aug 5, 2014
3b4d3fb
0.0.1-1: update LICENSE
Aug 5, 2014
9d87033
update README to reflect spec usage
Aug 6, 2014
8ed9049
add test/vast.js for test purpose
Aug 18, 2014
e8d67b1
0.0.1-2 ADD: test/vast.js for testing purpose
Aug 18, 2014
37a69af
0.0.1-3: MOD: extract working original vast.js files to /lib
Aug 18, 2014
83a6f52
backup current version
imoncloud Oct 27, 2015
f2036f9
Merge branch 'master' of https://github.com/imonology/VAST.js
imoncloud Oct 27, 2015
86f417b
fix: package.json to reduce vulnerabilities
snyk-bot Jan 19, 2021
48107f3
Merge pull request #1 from imonology/snyk-fix-73676f52e0048d1b7b21b11…
bluet Jan 19, 2021
6b77af8
fix: upgrade socket.io from 3.0.0 to 3.0.4
snyk-bot Jan 19, 2021
4840f2f
fix: upgrade debug from 0.7.4 to 0.8.1
snyk-bot Jan 19, 2021
fb51f5d
Merge pull request #2 from imonology/snyk-upgrade-1b3e7b1b67bb3a8a3fe…
bluet Jan 20, 2021
e344b30
Merge branch 'master' into snyk-upgrade-d46a5b120482e72ad9e7fb0d44b30f15
bluet Jan 20, 2021
42e8374
Update package.json
bluet Jan 20, 2021
9b7d715
Update package.json
bluet Jan 20, 2021
7326879
Merge pull request #3 from imonology/snyk-upgrade-d46a5b120482e72ad9e…
bluet Jan 20, 2021
0672b9a
created new branch to demonstrate matchers sending packets over VON
cfmarais-eng Aug 13, 2021
ed70556
no message
cfmarais-eng Aug 13, 2021
5afb112
no message
cfmarais-eng Aug 13, 2021
2dc7555
- Added client with join propagation (Theoretically can join any matc…
cfmarais-eng Aug 14, 2021
0b7a5ff
-Implemented "working" Pub/Sub in single matcher region
cfmarais-eng Aug 14, 2021
24b9259
Refined SPS for subs / pubs in a single matcher region.
cfmarais-eng Aug 15, 2021
f2e1ef6
Update README.md
cfmarais-eng Aug 15, 2021
21f4303
Fixed small error in test script and decreased matcher AoI to test ne…
cfmarais-eng Aug 16, 2021
6fe966c
no message
cfmarais-eng Aug 18, 2021
c3164d5
-Overlapping Subscriptions
cfmarais-eng Aug 29, 2021
16814f4
no message
cfmarais-eng Aug 29, 2021
8c7cf8a
no message
cfmarais-eng Aug 31, 2021
aad3ff0
testing different layers of the library
vic3e Sep 1, 2021
4c6c110
-Spatial message routing fully implemented
cfmarais-eng Sep 5, 2021
8182e8d
no message
cfmarais-eng Sep 6, 2021
f1cf1cf
Added a global visualiser - visualise clients and matchers only
cfmarais-eng Sep 25, 2021
c81f127
-better visualiser, implemented localised views and subscription drawing
cfmarais-eng Sep 26, 2021
61db78f
Implemented minimum spanning tree for area publications on VON layer.
cfmarais-eng Oct 12, 2021
77f7e31
removed unneccessary files
cfmarais-eng Oct 12, 2021
f7c9e10
no message
cfmarais-eng Oct 12, 2021
8835ca3
- made connection to GS optional (hardcoded, but simple boolean value)
cfmarais-eng Oct 12, 2021
9f64edc
no message
cfmarais-eng Oct 13, 2021
df5d6ba
no message
cfmarais-eng Oct 13, 2021
9ea026d
no message
cfmarais-eng Oct 13, 2021
869366e
no message
cfmarais-eng Oct 13, 2021
418267c
no message
cfmarais-eng Oct 13, 2021
92e645c
no message
cfmarais-eng Oct 13, 2021
883f9f9
no message
cfmarais-eng Oct 13, 2021
56d213f
no message
cfmarais-eng Oct 13, 2021
95c8beb
no message
cfmarais-eng Oct 13, 2021
338d568
no message
cfmarais-eng Oct 13, 2021
fa29788
no message
cfmarais-eng Oct 13, 2021
2a2c09a
no message
cfmarais-eng Oct 15, 2021
43e2a53
Added latency and bandwidth calcs for client spatial PING/PONG
cfmarais-eng Oct 15, 2021
09af477
Fixed duplicate pub issue
cfmarais-eng Oct 16, 2021
bd74b9e
- Matcher and VON now run on seperate threads
cfmarais-eng Oct 17, 2021
1d44ace
no message
cfmarais-eng Oct 17, 2021
02b8e03
- VON bandwidth measurements
cfmarais-eng Oct 25, 2021
5f28bde
no message
cfmarais-eng Oct 27, 2021
1256f7c
no message
cfmarais-eng Oct 28, 2021
176dfab
no message
cfmarais-eng Oct 29, 2021
6b37840
no message
cfmarais-eng Oct 29, 2021
13317a1
no message
cfmarais-eng Oct 29, 2021
34d9a3e
no message
cfmarais-eng Oct 29, 2021
774dd7c
no message
cfmarais-eng Oct 29, 2021
4ea3a13
no message
cfmarais-eng Oct 30, 2021
d33dfbe
no message
cfmarais-eng Oct 30, 2021
b6dcf5a
no message
cfmarais-eng Oct 30, 2021
c151a55
no message
cfmarais-eng Oct 30, 2021
6aaaa88
no message
cfmarais-eng Oct 30, 2021
23e7d17
no message
cfmarais-eng Oct 31, 2021
829dc3a
no message
cfmarais-eng Oct 31, 2021
116b220
no message
cfmarais-eng Nov 1, 2021
b5adfff
no message
cfmarais-eng Nov 1, 2021
124290f
no message
cfmarais-eng Nov 1, 2021
c9362c9
no message
cfmarais-eng Nov 1, 2021
0282db5
no message
cfmarais-eng Nov 1, 2021
f7e0f0e
no message
cfmarais-eng Nov 1, 2021
5d3cf74
no message
cfmarais-eng Nov 3, 2021
85c4fa0
no message
cfmarais-eng Nov 3, 2021
f1988ab
no message
cfmarais-eng Nov 7, 2021
f996e60
no message
cfmarais-eng Nov 10, 2021
e5329c2
no message
cfmarais-eng Nov 14, 2021
e8955c2
Added more thourough documentation and perfomed some basic cleanup fo…
cfmarais-eng Nov 14, 2021
419aac7
Update README.md
cfmarais-eng Nov 14, 2021
7a52eb5
Update new_client.js
cfmarais-eng Nov 15, 2021
8eeffad
Update start_matcher.js
cfmarais-eng Nov 15, 2021
655f78c
creating new branch for dev_CFM
vic3e Nov 15, 2021
83285fc
Merge pull request #5 from cfmarais-eng/dev_CFM
vic3e Nov 15, 2021
e719a27
Added functionality so that VAST can be used to add SPS functionality…
Nov 22, 2021
df97a92
Removed some debugging console messages and also made sure the global…
Nov 22, 2021
55a0039
Some cosmetic changes. Also fixed a function call to sendGSMessage
Nov 23, 2021
f36049e
- Removed worker thread for VON peer (VON peer and matcher objects ar…
cfmarais-eng Jan 26, 2022
1d78c1d
no message
cfmarais-eng Jan 26, 2022
408c074
Merge pull request #13 from cfmarais-eng/dev_CFM
vic3e Jan 26, 2022
9ba4f0b
added simulator foundation
cfmarais-eng Feb 7, 2022
557c382
Merge pull request #14 from cfmarais-eng/dev_CFM
vic3e Feb 7, 2022
8f84ce9
Instructions from text file
Debojyoti1915001 Feb 8, 2022
d5e0598
Instructions from text file
Debojyoti1915001 Feb 8, 2022
855e860
Modified the logger to write to text files. Logger can use multiple "…
cfmarais-eng Feb 11, 2022
3ea2d7e
Merge pull request #15 from cfmarais-eng/dev_CFM
vic3e Feb 11, 2022
517e8b9
Function added
Debojyoti1915001 Feb 11, 2022
f31112f
Merge branch 'dev_CFM' of https://github.com/imonology/VAST.js into d…
Debojyoti1915001 Feb 11, 2022
98ee47c
Reading line by line
Debojyoti1915001 Feb 16, 2022
902280c
Bug fix
Debojyoti1915001 Feb 16, 2022
4c126bb
Added length check
Debojyoti1915001 Feb 16, 2022
248ccb8
bug fix
Debojyoti1915001 Feb 19, 2022
9a7384b
comments can be added
Debojyoti1915001 Feb 24, 2022
a806c16
if else converted to switch case
Debojyoti1915001 Feb 28, 2022
3acbc8e
added double quotes around payload
Debojyoti1915001 Mar 2, 2022
ed7903b
added file check and filename as user input
Debojyoti1915001 Mar 2, 2022
743bee5
after end statement no line gets executed
Debojyoti1915001 Mar 2, 2022
361c5c2
after end statement no line gets executed
Debojyoti1915001 Mar 2, 2022
78aaf86
Removed unnecessary files
cfmarais-eng Mar 3, 2022
e3a70be
- Implemented new logger across all classes
cfmarais-eng Mar 3, 2022
d986361
- Fixed some bugs from debo's simulator implementation
cfmarais-eng Mar 3, 2022
3ad4739
Merge branch 'dev_CFM' into dev_CFM
vic3e Mar 3, 2022
918ede4
Merge pull request #16 from cfmarais-eng/dev_CFM
vic3e Mar 3, 2022
0e2b645
Process ended when we pass on the end instruction
Debojyoti1915001 Mar 16, 2022
29eca80
no message
cfmarais-eng Apr 6, 2022
c28b4fd
no message
cfmarais-eng Apr 6, 2022
45ef38b
Merge branch 'dev_CFM' of https://github.com/cfmarais-eng/VAST.js int…
cfmarais-eng Apr 6, 2022
7d9b5c8
Merge branch 'dev_CFM' into dev_CFM
vic3e Apr 6, 2022
951a3a6
- Complete Rework of client join / move procedure. Now works with ACK…
cfmarais-eng Apr 30, 2022
b6e2235
Merge branch 'dev_CFM' of https://github.com/cfmarais-eng/VAST.js int…
cfmarais-eng Apr 30, 2022
96af55d
no message
cfmarais-eng Aug 25, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
doc
3 changes: 3 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
test
examples
.gitignore
18 changes: 18 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
(The GPLv3 License)

vast.js: a P2P library for spatial publish subscribe (SPS)
Copyright (C) 2014 Imonology Inc. <[email protected]>

This program is free 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.

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, see <http://www.gnu.org/licenses/>.

1 change: 0 additions & 1 deletion NN.bat

This file was deleted.

100 changes: 97 additions & 3 deletions README.md
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,98 @@
vast.js
=======
# VAST.js
P2P Spatial Publish and Subscribe built on the Voronoi Overlay Network (VON).
This documentation is not exhaustive and may not conform to current code 100%.

- [VAST.js](#vastjs)
- [Introduction to VAST.js](#introduction-to-vastjs)
- [Basic Stricture](#basic-structure)
- [Matchers](#matchers)
- [Voronoi Overlay Network](#voronoi-overlay-network)
- [The Global Server](#the-global-server)
- [Dependancies](#dependancies)
- [Getting Started](#getting-started)

VAST.js is the javascript implementation of VAST: a scalable P2P network for spatial publish/subscribe (SPS)
# Introduction to VAST.js
## Basic Structure
<img src="./docs/images/VAST_Layers.png" alt="drawing" width="400"/>

## Matchers
Clients establish connections to [matchers](./docs/matcher.md) based on their position in the environment. Matchers act as "spatial message brokers", i.e. they are responsible for handling subscription requests from their own clients and for matching publications to subscriptions.
Each matcher keeps a list of all subscriptions of its own clients as well as copies of "ovelapping" subscriptions for clients connected to other matchers.

Matchers are not "aware" of each other and do not have direct connections, instead each matcher has an underlying [VON Peer](./docs/VON.md), which can be used to send any matcher-to-matcher packets with the newly implemented spatial forwarding functions in the VON peer.

<br/><br/>

## Voronoi Overlay Network
The Voronoi Overlay Network (VON) is a dynamic, self-organising peer-to-peer network that establishes mutual awareness and a TCP socket between each peer and its neighbours in the virtual environment. Each peer maintains a localised Voronoi partition of its enclosing, AoI and boundary neighbours, which is shared between peers to facilitate neighbour discovery as peers join, leave and move around the VE. The VON has been extended to send any message to a point or area in the environment, and each VON peer will only receive the message once.

For more detail on the VON, see [VON Peer](./docs/VON.md)

<br/><br/>

## The Global Server
The HTML visualiser requires the global server to function. Each matcher has a connection to the global server and sends updates on its position, its perceived neighbours, clients, etc.
The global server collects all of this localised data and constructs a global understanding of the environments, which is rendered on the html client. The global server does not have any functional purpose in VAST.js and is strictly for debugging and demonstration purposes.

**NOTE: If you wish to use VAST.js without the global server, the "RequireGS" flag must be set to false in matcher.js.**
If "RequireGS" is set to true, the matcher will not initialise before establishing a connection to the Global Server.


When using the Global Server for visualisation, ensure that you start it before any matchers. You can manually start it from the terminal:
```sh
node ./lib/visualiser/global_server.js
```

<br/><br/>

### Limitations to the Visualiser Imposed by Multithreading
When inspecting the ./lib/visualiser/visualiser.html, you will notice a renderLocal flag. Back when the matcher and VON peer were instantiated in the same process, the matcher was able to send its underlying VON peers neighbour list to the GS, which allowed for the visualiser to display both the global and localised views of the VON.
When the VON peer was shifted to run in a worker thread, this functionality was lost as no mechanism has been written for the VON peer to exchange this data with its matcher.
This functionality can be reintroduced by expanding the VON_peer_worker to accept a "get_VON_data" message from its matcher or something similar.
For now, the renderLocal flag is forced to false in the render function in the visualiser.

<br/><br/>

# Dependancies
## Worker Threads Module
The VON peer runs on a worker thread of the Matcher. Install in the VAST.js directory using:
```sh
npm install worker-threads
```

<br/><br/>

## Socket.io and Socket.io-client
Currently, the matcher uses socket.io to establish a WebSocket connection with clients.
The Global Server also uses Socket.io to establish a connection with each matcher.
Clients and matchers also require the socket.io-client module.
Install in the VAST.js directory using:
```sh
npm install socket.io
npm install socket.io-client
```

<br/><br/>

# Getting Started
## ./test
The ./test directory contains some basic .js files to start matchers and clients.

## start_GW.js and start_matcher.js
These files start a Gate Way or ordinary matcher at the given coordinates with the given AoI. If these arguments are not specified, the matchers will be placed randomly.
**NOTE: The hostname for the machine running the gateway is currently specified directly in these files. By default, it listens on port 8000 for VON traffic and 20000 for client sockets**
Example: Start the Gate Way matcher at {x: 200, y: 600} with an AoI radius of 100:
```sh
node ./test/start_GW.js 200 600 100
```

## new_client.js
This file creates a new client. Currently, this file starts clients, registers them for subscriptions, and makes them publish messages at set intervals.
This file was unfortunately written for tests performed by CFM specifically, and have not yet been changed for more generalised applications. Use this file as an example to write your own client starter app for your own debugging needs.

## start_test.js
This file starts the global server and a number of matchers (including a GW) randomly around the environment, each with the same specified AoI. The amount of time to wait between adding each new matcher can also be specified. All matchers are instantiated in a new node process.
Example: To start 5 matchers (including the gateway), each with an aoi of 100, and a wait time between matchers of 2 seconds
```sh
node ./test/start_test.js 5 100 2000
```
Loading