Skip to content

soketi/monorepo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

soketipfs — Real-Time 🤝 Web3

Discord CI

soketipfs is a framework for building distributed applications using Websockets. It is built on top of uWebSockets.js and uses the IPFS networking protocol with Helia.

Use it in both public or private networks, where you can control the nodes that are part of the network — you have a fully private and secure network for your real-time application.

Read more about Interstellar ✨🪐

🤝 Sponsors

Logos from Sponsors

Features

SRF (🌍 Scalable | ✨ Resilient | 🏎️ Fast)

soketipfs is built with the SRF principles in mind. It is designed to be scalable, resilient and fast by nature, leveraging the power of uWebSockets.js and the IPFS networking.

While IPFS is public, soketipfs is designed to be used in private networks, where you can control the nodes that are part of the network — you have a fully private and secure network for your real-time application. 🚀

The server is built on top of uWebSockets.js - a C application ported to Node.js. uWebSockets.js is demonstrated to perform at levels 8.5x that of Fastify and at least 10x that of Socket.IO. (source)

Cheaper 🤑

For a $49 plan on Pusher, you get a limited amount of connections (500) and messages (30M).

With soketipfs, for the price of an instance on Vultr or DigitalOcean ($5-$10), you get virtually unlimited connections, messages, and some more!

soketipfs is capable to hold thousands of active connections with high traffic on less than 1 GB and 1 CPU in the cloud. You can also get free $100 on Vultr to try out soketipfs →

Pusher Protocol 📡

soketipfs implements the Pusher Protocol v7. Your existing projects that connect to Pusher requires minimal code change to make it work with soketipfs - you just add the host and port and swap the credentials.

Coming Soon 🚀✨

AI & LLMs 🤖: Leverage the market game within the real-time context — protect your customers with built-in AI models for sentiment analysis and much more.

Function as a Service 🚀: The network will have your code and it will run it for you. Zero knowledge required, and you use the languages you love.

Storage-as-a-Service 🪣: Your files will be safe. The network stores it for you, either it is public or private. No disruptions, no data loss.

🚀 Getting Started

Get started by using the new soketi CLI to start the server:

npx @soketi/cli ipfs start --port=7001

The CLI replaces the soketi project.

If you wish to install the command as global, make sure to uninstall the old soketi package before installing the new one:

npm uninstall -g @soketi/soketi
npm install -g @soketi/cli
# Now you can use the IPFS server
soketi ipfs start --port=7001

For the legacy server, see the soketi/soketi repository.

🔀 Roadmap

🧑‍💻 = currently in development
👉 = upcoming for development
⏳ = planned, but not yet scheduled
👀 = not sure, maybe in the future
  • Deployment
    • 🧑‍💻 New Soketi CLI
    • 🧑‍💻 Docker
    • 👉 Kubernetes
    • 👉 Railway
  • Protocols
    • 👉 Pusher Protocol
    • 👉 Ably Protocol
    • 👉 AWS API Gateway Protocol (compatibility)
    • ⏳ MQTT Protocol
    • ⏳ PubNub Protocol
    • ⏳ SockJS Protocol
    • ⏳ Socket.IO / Engine.IO Protocol
    • 👀 AMQP Protocol
    • 👀 Centrifugo Protocol
    • 👀 STOMP Protocol
  • Discovery Mechanisms
    • 🧑‍💻 IPFS
    • ⏳ Redis Pubsub
    • ⏳ NATS
  • Sprinkles
    • 👉 Function as a Service
    • 👉 AI & LLMs
    • ⏳ Storage as a Service
  • Databases
    • 👉 Redis Stack
    • 👉 SQL via Knex
    • 👀 MongoDB

⁉ Ideas or Discussions?

Have any ideas that can make into the project? Perhaps you have questions? Jump into the discussions board or join the Discord channel

🔒 Security

If you discover any security related issues, please email alex@thecodefather.co instead of using the issue tracker.

🎉 Credits

Thank you to Bunny! 🌸

🤝 Contributing

This workspace has been generated by Nx, a Smart, fast and extensible build system.

Learn more

Install dependencies

Run npm install to install all dependencies.

npm install

Packages

Each abstraction has its own place in the soketipfs ecosystem, and they can be used independently or together.

soketipfs is a monorepo, and it's composed of the following packages:

  • brain: Used to cache data in memory
  • cli: the CLI took for soketi that supports both legacy and IPFS, plus possibly many more integratins
  • connections: Base implementation for Websocket connections handling
  • gossiper: Integration for the Gossip protocol, used to broadcast messages to all nodes in the network
  • p2p: libp2p networking implementation using Helia
  • server: Ready-to-go & customizable server implemenations for soketipfs
  • utils: Utility functions used across the packages

Protocol: Pusher

The Pusher protocol is implemented in the following packages:

  • pusher-apps: Pusher Apps implementation to juggle with the apps definitions
  • pusher-channels: Pusher Channels implementation to handle channels and events