Comparing version 2.2.7 to 2.2.8
{ | ||
"name": "netget", | ||
"version": "2.2.7", | ||
"version": "2.2.8", | ||
"description": "Rette Adepto/ Recibido Directamente.", | ||
"main": "netget.js", | ||
"type": "module", | ||
"main": "index.js", | ||
"scripts": { | ||
"start": "node netget.js", | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"start": "node index.js", | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"doc": "jsdoc -c jsdoc.json" | ||
}, | ||
"keywords": [ | ||
"netget" | ||
"netget", | ||
"gateway", | ||
"networking", | ||
"express-middleware", | ||
"dynamic-routing", | ||
"service-mesh", | ||
"api-gateway", | ||
"local-development", | ||
"modular-network", | ||
"nodejs" | ||
], | ||
"author": "Sui Gn", | ||
"license": "MIT License", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/suiGn/netget" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/suiGn/netget/issues" | ||
}, | ||
"homepage": "https://github.com/suiGn/netget#readme", | ||
"dependencies": { | ||
"axios": "^1.4.0", | ||
"dotenv": "^16.3.1", | ||
"express": "^4.18.2" | ||
} | ||
"morgan": "^1.10.0" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/suiGn/netget.git" | ||
}, | ||
"homepage": "https://www.npmjs.com/package/netget", | ||
"docs": "https://suiGn.github.io/netget", | ||
"author": "Sui Gn", | ||
"license": "MIT License", | ||
"repoType": "NPM Package" | ||
} |
131
README.md
@@ -1,6 +0,11 @@ | ||
<img src="./_._.svg" alt="SVG Image" width="123" height="123" style="width123px; height:123px;"> | ||
<img src="./src/_._.svg" alt="SVG Image" width="123" height="123" style="width123px; height:123px;"> | ||
# netget | ||
https://neurons.me | ||
# The Netget Protocol | ||
The Netget Protocol is designed to facilitate real-time communication between **web nodes using a handshaker** mechanism. It enables seamless and secure information exchanges and can be readily integrated into any domain. | ||
## Installation: | ||
Netget is available as an npm package: | ||
```bash | ||
@@ -10,18 +15,27 @@ npm i netget | ||
### 1. Initialization: | ||
When a node (be it service or registry) is created, the constructor will gather details about the node. | ||
## Features: | ||
- **Versatile Handshaker**: Easily embed the script to any domain. The handshaker script can be embedded into any HTML application. It automatically establishes a WebSocket connection to the specified server endpoint upon loading. | ||
- **Domain Pointing**: The handshaker relies on communication to a specified domain, allowing for dynamic endpoint determination. | ||
- **Conditional Filtering**: Utilizes advanced filtering to perform checks like authentication before proceeding, ensuring secure and condition-based communications. | ||
- **Real-Time Communication**: Leverages WebSocket technology for bi-directional, real-time interaction between clients and servers. | ||
## QuickStart: | ||
**The handshaker** script can be **embedded into any HTML**. It automatically establishes a WebSocket connection to the specified server endpoint upon loading. | ||
```html | ||
<script src="/path-to-netget-protocol"></script> | ||
``` | ||
## Embedding with a CDN: | ||
```js | ||
constructor(options = {}) { | ||
this.nodeType = options.nodeType || 'service'; // 'service' or 'registry' | ||
this.metadata = options.metadata || {}; | ||
this.network = options.network || 'development'; | ||
this.registryNodes = new Set(options.registryNodes || []); | ||
} | ||
<script src="https://suign.github.io/netget/netget.js"></script> | ||
``` | ||
The node can be classified as either a 'service' node or a 'registry' node. Metadata contains information about the node, and the network determines which environment the node belongs to (e.g., 'development', 'production'). | ||
## ServerEndpoint: | ||
## Handling Messages | ||
Implement handling for incoming and outgoing messages based on user interactions or other events on the client side. | ||
### 2. Registry Node Management: | ||
These methods allow the system to keep track of registry nodes. If `Netget` is initialized as a service node, it will use these registry nodes to register itself. | ||
## Registry Node Management: | ||
These methods allow the system to keep track of registry nodes. `Netget` will use these registry nodes to register itself. | ||
@@ -32,3 +46,2 @@ ```js | ||
} | ||
removeRegistryNode(node) { | ||
@@ -39,8 +52,7 @@ this.registryNodes.delete(node); | ||
### 3. Service Registration: | ||
When a node wants to register itself as a service node, the `registerWithNetwork` method communicates with the registry nodes to do so. | ||
## - Service Registration: | ||
When a node wants to register `WithNetwork` method communicates with the registry nodes to do so. | ||
```js | ||
registerWithNetwork() { | ||
// Communicate with registry nodes to register this node. | ||
// Communicate to register this node. | ||
// Send necessary details like metadata, IP address, etc. | ||
@@ -50,5 +62,4 @@ } | ||
### 4. Service Discovery: | ||
## - Service Discovery: | ||
This function allows other services or clients to discover and retrieve details of a specific service node. | ||
```js | ||
@@ -61,8 +72,4 @@ discoverServiceNode(serviceName) { | ||
### 5. Decentralization: | ||
`Netget` can manage a distributed list of nodes and sync them. Using a Distributed Hash Table (DHT) or a decentralized protocol. | ||
### 6. Security & Validation: | ||
Security is vital. The module will have private methods (prefixed with `_` for convention) to ensure communications are secure and validate node authenticity during registration. | ||
## - Security & Validation: | ||
Private methods (prefixed with `_` for convention) to ensure communications are secure and validate node authenticity during registration. | ||
```js | ||
@@ -74,6 +81,3 @@ _validateNode() { | ||
### 7. Network Management: | ||
The `network` property determines the environment the node belongs to. This allows for separation and management of different networks. | ||
### 8. Node Health & Monitoring: | ||
## Node Health & Monitoring: | ||
A private method can periodically check the health status of nodes. This ensures that all nodes in the network are active and responsive. | ||
@@ -90,5 +94,5 @@ | ||
The classification of a node as either a 'service' node or a 'registry' node dictates its primary responsibilities and functionalities within the `Netget` framework. Let's break down each type of node: | ||
The classification of a node as either a **'service' node or a 'registry'** node dictates its primary responsibilities and functionalities within the `Netget` framework. Let's break down each type of node: | ||
### Service Node: | ||
# Service Node: | ||
@@ -120,3 +124,3 @@ A **Service Node** is essentially a participant in the network that provides a specific functionality or service. This could be anything from a database service, an API endpoint, a web application, or any other service that other nodes or clients might want to interact with. | ||
### Registry Node: | ||
# Registry Node: | ||
@@ -169,6 +173,7 @@ A **Registry Node** serves as a directory or lookup service for the network. It maintains a list of all Service Nodes, allowing clients or other nodes to discover and communicate with any Service Node they need. | ||
### netget Architecture & Features: | ||
# netget Architecture & Features. | ||
Service Node Initialization: | ||
netget will provide a simple API that allows any node to initialize itself as a service node. | ||
### Service Node Initialization: | ||
netget provides a simple API that allows any node to initialize itself as a service node. | ||
During initialization, the service node will specify its metadata, including service details, preferred network (e.g., development, production, custom), and other information. | ||
@@ -185,3 +190,3 @@ Registry Node Management: | ||
netget will provide APIs that allow any client or service to query for a specific service node. | ||
**netget** will provide APIs that allow any client or service to query for a specific service node. | ||
It will connect to registry nodes, find the requested service details, and return them to the client. | ||
@@ -194,3 +199,3 @@ Decentralization Support: | ||
netget should ensure all communications are secure, possibly using cryptographic techniques. | ||
**netget** should ensure all communications are secure, possibly using cryptographic techniques. | ||
It should provide methods for validating the authenticity of nodes during the registration process. | ||
@@ -203,32 +208,26 @@ Network Management: | ||
netget could have built-in features to periodically check the health of registered nodes. | ||
**netget** could have built-in features to periodically check the health of registered nodes. | ||
If a node is found to be offline or unresponsive, it could be temporarily removed from the active nodes list. | ||
# THIS Sandbox DEMO Playground | ||
Welcome to the THIS.ME Playground, where the entire THIS.ME suite comes together with NEURONS.ME to provide a rich development and execution environment for your AI adventures. | ||
## Quick Start | ||
### 1. Clone the Repository | ||
```bash | ||
git clone https://github.com/suiGn/.me.git | ||
``` | ||
### 2. Navigate to the Project Directory | ||
```bash | ||
cd .me | ||
``` | ||
### 3. Install Dependencies | ||
You can use either Yarn or npm to install the necessary dependencies. | ||
Using Yarn: | ||
```bash | ||
yarn install | ||
``` | ||
Using npm: | ||
```bash | ||
npm install | ||
``` | ||
### 4. Launch the Application | ||
``` | ||
npx electron index.js | ||
``` | ||
## Decentralization: | ||
`Netget` can manage a distributed list of nodes and sync them. Using a Distributed Hash Table (DHT) or a decentralized protocol. | ||
## Security Considerations | ||
- **CORS**: Configure Cross-Origin Resource Sharing on your WebSocket server to accept connections from different origins. | ||
- **WSS**: Use Secure WebSocket for encrypted connections when dealing with sensitive information. | ||
## Scalability Considerations | ||
Architect your WebSocket server to handle multiple concurrent connections based on your expected load. | ||
## Contributing | ||
If you have suggestions or issues, please open an issue. We encourage contributions from the community. | ||
Contributions to the Netget Protocol are welcome. Please read [CONTRIBUTING.md](https://chat.openai.com/c/CONTRIBUTING.md) for details on our code of conduct and the process for submitting pull requests. | ||
## Acknowledgements | ||
Special thanks to all contributors and users of the Netget Protocol for making real-time, secure, and scalable communications possible. | ||
## License & Policies | ||
@@ -235,0 +234,0 @@ - **License**: MIT License (see LICENSE for details). |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
526219
1
29
518
Yes
227
2
1
+ Addedmorgan@^1.10.0
+ Addedbasic-auth@2.0.1(transitive)
+ Addedmorgan@1.10.0(transitive)
+ Addedon-finished@2.3.0(transitive)
+ Addedon-headers@1.0.2(transitive)
+ Addedsafe-buffer@5.1.2(transitive)
- Removedaxios@^1.4.0
- Removeddotenv@^16.3.1
- Removedexpress@^4.18.2
- Removedaccepts@1.3.8(transitive)
- Removedarray-flatten@1.1.1(transitive)
- Removedasynckit@0.4.0(transitive)
- Removedaxios@1.7.7(transitive)
- Removedbody-parser@1.20.3(transitive)
- Removedbytes@3.1.2(transitive)
- Removedcall-bind@1.0.7(transitive)
- Removedcombined-stream@1.0.8(transitive)
- Removedcontent-disposition@0.5.4(transitive)
- Removedcontent-type@1.0.5(transitive)
- Removedcookie@0.7.1(transitive)
- Removedcookie-signature@1.0.6(transitive)
- Removeddefine-data-property@1.1.4(transitive)
- Removeddelayed-stream@1.0.0(transitive)
- Removeddestroy@1.2.0(transitive)
- Removeddotenv@16.4.5(transitive)
- Removedencodeurl@1.0.22.0.0(transitive)
- Removedes-define-property@1.0.0(transitive)
- Removedes-errors@1.3.0(transitive)
- Removedescape-html@1.0.3(transitive)
- Removedetag@1.8.1(transitive)
- Removedexpress@4.21.1(transitive)
- Removedfinalhandler@1.3.1(transitive)
- Removedfollow-redirects@1.15.9(transitive)
- Removedform-data@4.0.1(transitive)
- Removedforwarded@0.2.0(transitive)
- Removedfresh@0.5.2(transitive)
- Removedfunction-bind@1.1.2(transitive)
- Removedget-intrinsic@1.2.4(transitive)
- Removedgopd@1.0.1(transitive)
- Removedhas-property-descriptors@1.0.2(transitive)
- Removedhas-proto@1.0.3(transitive)
- Removedhas-symbols@1.0.3(transitive)
- Removedhasown@2.0.2(transitive)
- Removedhttp-errors@2.0.0(transitive)
- Removediconv-lite@0.4.24(transitive)
- Removedinherits@2.0.4(transitive)
- Removedipaddr.js@1.9.1(transitive)
- Removedmedia-typer@0.3.0(transitive)
- Removedmerge-descriptors@1.0.3(transitive)
- Removedmethods@1.1.2(transitive)
- Removedmime@1.6.0(transitive)
- Removedmime-db@1.52.0(transitive)
- Removedmime-types@2.1.35(transitive)
- Removedms@2.1.3(transitive)
- Removednegotiator@0.6.3(transitive)
- Removedobject-inspect@1.13.3(transitive)
- Removedon-finished@2.4.1(transitive)
- Removedparseurl@1.3.3(transitive)
- Removedpath-to-regexp@0.1.10(transitive)
- Removedproxy-addr@2.0.7(transitive)
- Removedproxy-from-env@1.1.0(transitive)
- Removedqs@6.13.0(transitive)
- Removedrange-parser@1.2.1(transitive)
- Removedraw-body@2.5.2(transitive)
- Removedsafe-buffer@5.2.1(transitive)
- Removedsafer-buffer@2.1.2(transitive)
- Removedsend@0.19.0(transitive)
- Removedserve-static@1.16.2(transitive)
- Removedset-function-length@1.2.2(transitive)
- Removedsetprototypeof@1.2.0(transitive)
- Removedside-channel@1.0.6(transitive)
- Removedstatuses@2.0.1(transitive)
- Removedtoidentifier@1.0.1(transitive)
- Removedtype-is@1.6.18(transitive)
- Removedunpipe@1.0.0(transitive)
- Removedutils-merge@1.0.1(transitive)
- Removedvary@1.1.2(transitive)