Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

netget

Package Overview
Dependencies
Maintainers
1
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

netget - npm Package Compare versions

Comparing version 2.2.7 to 2.2.8

docs/index.html

43

package.json
{
"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"
}

@@ -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).

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc