Coder Social home page Coder Social logo

ov-studio / vital.network Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 0.0 1.07 MB

Vital.network ━ Vital.js' Networker (Lightweight yet Reliable)

License: GNU General Public License v3.0

JavaScript 100.00%
client js library module networking ov rest server socket v-engine

vital.network's People

Contributors

anisa-nur avatar aviril avatar ovileamriam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

vital.network's Issues

[FEATURE REQUEST] SOCKET - Client connection without specifying a port

This is probably an edge case, but might be worthwhile considering:

For some hosted code environments (codesandbox, reply.it, etc), one cannot connect to the environment externally, by specifying a port, i.e. the URL pointing to the environment, will connect using the default/main port of the environment.

At present when doing a vNetworkify.connect() from a client, the port is a mandatory argument.

It would be great if this argument could be optional. Then instead of ALWAYS building the socket server url as {{protocol}}://{{hostname}}:{{port}}, it could also allow for {{protocol}}://{{hostname}}.

[FEATURE REQUEST] SOCKET - Utility Functions

The following utility functions would be great to build a management tool for the socket server:

  • vNetworkify.fetchSockets(): Retrieve an array of the sockets
  • socket.fetchNetworks(): Retrieve an array of the networks for the provided socket instance
  • socket.fetchRooms(): Retrieve an array of the rooms for the provided socket instance
  • socket.fetchClients(): Retrieve an array of the clients connected to the provided socket instance
  • socket.fetchClients(): Retrieve an array of the clients connected to the provided room instance

Client - REST APIs

Support for invoking & fetching REST APIs directly on client side w/o utilizing external libraries

[FEATURE REQUEST] SOCKET - Connection Error Events

Include events to trap connection errors for sockets on both server and client. It would be great if this could include a reason (similar to socket.io) to allow for different strategies (throw exception, manual reconnection, etc), based on the reason for disconnection.

[FEATURE REQUEST] - Version Identifier

Add helper functions to get module's version. Forward this version to server when client tries to connect.
POV: User can then utilize which clients should be able to connect or major version changes will automatically be rejected

[ENHANCEMENT REQUEST] SOCKET - Custom Socket Instances

Native instances such as socket and client should be safe & shouldn't be exposed on functions like socket.onClientConnect & socket.onClientDisconnect as such. Clients can explicitly control otherwise which is not great.

Consideration:

  • Make a new reference for socket instances (Using custom classes)
  • Whitelist the methods only that client/server should be able to control

[FEATURE REQUEST] SOCKET - Auto Reconnection

Allow clients to auto-reconnect after a break in connection.

This should include:

  • Ping/Heartbeats
  • Events for: ping, reconnect_attempt, reconnect and reconnect_error (similar to how socket.io implements this)
  • Configuration of number reconnection attempts and time between attempts

[FEATURE REQUEST] - HTTPS + SSL-Cert support

  • Add support to automatically read sslcert.env during startup incase of existence.
  • Based on availability of SSL cert prefer https connection over http.
  • Apply same methodology over websocket protocols as well prefer wss over ws.
  • Incase if ws is used encode all socket messages (tea encode, perhaps??); Key should be sent to client only once during the initialization of connection as suggested by @Anisa-Nur.

Removal of `uuid` dependency

Possibly there is no need of 3rd party uuid library since Crypto.randomUUID() can be used along w/ our own identifier appended to it etc.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.