Skip to content
This repository was archived by the owner on Aug 29, 2018. It is now read-only.

Any chance for socket.io-p2p support? #37

Closed
mishoboss opened this issue Sep 12, 2016 · 14 comments
Closed

Any chance for socket.io-p2p support? #37

mishoboss opened this issue Sep 12, 2016 · 14 comments

Comments

@mishoboss
Copy link

I tried to make it work with https://github.com/socketio/socket.io-p2p, but socket.io-p2p creates another kind of object inside app.io object and feathers is unable to send/receive anything. Any chance for feathers-socketio to support socket.io-p2p too?

@daffl
Copy link
Member

daffl commented Sep 13, 2016

Can you post your setup that didn't work? I didn't try it but from the documentation it seems something like

const socketio = require('feathers-socketio');
const p2p = require('socket.io-p2p-server').Server;

const app = feathers().configure(socketio(function(io) {
  io.use(p2p)
}));

On the server and on the client:

const P2P = require('socket.io-p2p');
const io = require('socket.io-client');
const socket = io();
const p2p = new P2P(socket);

const app = feathers()
  .configure(feathers.socketio(p2p));

Should work.

@mishoboss
Copy link
Author

mishoboss commented Sep 13, 2016

Tried it exactly as you described and it works. Thank you! However server doesn't return responses. This is still websockets, haven't tried webrtc yet.

client.js?13cc:87 Uncaught (in promise) Error: Timeout of 5000ms exceeded calling properties::find(…)

image

@mishoboss
Copy link
Author

WebRTC works, but feathers services don't return responses again.

@daffl
Copy link
Member

daffl commented Sep 19, 2016

Can you share your app setup, maybe in a GitHub repository?

@ekryski
Copy link
Member

ekryski commented Oct 16, 2016

@mishoboss yes please. I would be keen to see if we can get this working. 😁

@marshallswain
Copy link
Member

Hey yeah. Nice. We could grow our family of supported providers.

@mishoboss
Copy link
Author

Hi guys, my setup is pretty complex and still not fully working. The effort to make something reproducible by you is not small. But you don't need exactly my setup to reproduce it. Just try to use socket.io-p2p instead of socket.io on a clean feathers and you will see what I mean.

@mishoboss
Copy link
Author

Hi, did you managed to reproduce it? Its really simple - just try to use socket.io-p2p instead of socket.io.

@frank-dspeed
Copy link
Member

@mishoboss please prepare that simple repo for us i think we are doing enought work help is much wanted.

@daffl
Copy link
Member

daffl commented Aug 14, 2017

Although I really like the idea, this issue has been open for a while and I don't think we'll be able to look into it more any time soon.

@daffl daffl closed this as completed Aug 14, 2017
@frank-dspeed
Copy link
Member

@daffl i think you should reopen that as its easy to reproduce that demo and its a nice feature.

@mishoboss
Copy link
Author

Hi guys. I also think this feature is not only a nice one, but also a very important one. It opens so much more use cases where Feathers could fit.

BTW, I really can't understand why you need a simple example to reproduce it. Just set an empty feathers project and put socket.io-p2p in it the way it is described in its docs. Thats it. You will see the issue right after you do that. :)

@frank-dspeed
Copy link
Member

@mishoboss the problem is why don't you do that :)

@marshallswain
Copy link
Member

Hi guys. I also think this feature is not only a nice one, but also a very important one. It opens so much more use cases where Feathers could fit.

I completely agree.

BTW, I really can't understand why you need a simple example to reproduce it. Just set an empty feathers project and put socket.io-p2p in it the way it is described in its docs. Thats it. You will see the issue right after you do that. :)

It's mostly because of my schedule. It's absolutely freaking packed like I never thought it could be. I don't know what I expected with my life choices. There are seven wild animals running around my house. Five of them are my kids, and the other two are their parents. We also run our own business, are employed full time and at the moment get to deal with the aftermath of what happens when houses flood. ;)

Ok. Joking aside, the little demo apps go a long way to save us time looking up things we've not yet experienced. Each one of us has worked on Feathers on a 100% volunteer basis, and we bring our talents to the table and make cool stuff with it. We're all also working on cool stuff in our spare time (which is unfortunately scarce) that will benefit the community in ways that each of us sees fit. So far, our schedules don't interfere with doing amazing work when you look at the big picture. We have each individually donated thousands of personal hours to the community. And we definitely all try to foster a community where everyone's ideas are valued, encouraged, and where everybody feels like they have the support they need to work on their ideas.

In short, if you want to champion this feature, we've got your back. But we have to take a supporting role at the moment, and not the lead. If you want to take the lead at making this work, feel free to reopen and hit us up in chat with questions you have while you're figuring out how to make this feature work. We've got your back, but you've gotta be in front.

By the way, we love you guys and the contributions you've already made in the community.

❤️💯

Again, I think this is a sweet idea.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants