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

Integrated sync backend #27

Open
19 tasks
Tracked by #4
juliushaertl opened this issue Jun 10, 2024 · 2 comments
Open
19 tasks
Tracked by #4

Integrated sync backend #27

juliushaertl opened this issue Jun 10, 2024 · 2 comments
Labels
backend: php enhancement New feature or request
Milestone

Comments

@juliushaertl
Copy link
Member

juliushaertl commented Jun 10, 2024

Now that we have the basic sync running with the websocket_server, we should look into how we can mirror the behaviour with a PHP-only backend.

socket.io supports long polling https://socket.io/docs/v3/how-it-works/#http-long-polling which we could make use of

  • provide php endpoints for GET and POST requests
  • Think about way to store/distribute and handle the messages
    • server-to-client
      • init-room
      • joined-data
      • first-in-room
      • room-user-change
      • client-broadcast
      • user-follow-room-change
      • room-user-change
      • broadcast-unfollow
    • client-to-server
      • connection init
      • join-room
      • server-broadcast
      • server-volatile-broadcast
      • user-follow
      • disconnecting
      • disconnect

We could potentially require redis with https://github.com/phpredis/phpredis?tab=readme-ov-file#publish or just use a db backend if that is not present.

Required protocols to implement
https://github.com/socketio/engine.io-protocol
https://socket.io/docs/v4/socket-io-protocol#introduction

Additional resources
https://github.com/socketIo-php
https://github.com/socketIo-php/engine.io-parser
https://github.com/socketIo-php/socket.io-parser

@juliushaertl juliushaertl mentioned this issue Jun 10, 2024
14 tasks
@juliushaertl juliushaertl added backend: php enhancement New feature or request labels Jun 10, 2024
@juliushaertl juliushaertl changed the title Embedded sync backend Integrated sync backend Jun 10, 2024
@juliushaertl juliushaertl added this to the 1.0 milestone Jul 18, 2024
@juliushaertl
Copy link
Member Author

We might go with just using https://github.com/cloud-py-api/app_api for easy deployment of the node backend.

@juliushaertl
Copy link
Member Author

Removing assignment for now as this is not planned yet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend: php enhancement New feature or request
Projects
Status: 🛑 On hold
Development

No branches or pull requests

2 participants