PerfectlySoft / Perfect

Server-side Swift. The Perfect core toolset and framework for Swift Developers. (For mobile back-end development, website and API development, and more…)
https://www.perfect.org
Apache License 2.0
13.84k stars 945 forks source link

support for web sockets and socket.io planned? #28

Open cwoloszynski opened 8 years ago

cwoloszynski commented 8 years ago

We use socket.io in our current Swift iOS app and would love to move from Node.js to perfect.

Please consider adding socket.io support into your plans. A roadmap of features (and a place to vote for your favorite) would be a great addition to this project.

tranhieutt commented 8 years ago

goog idea. I hope perfect'll develop soon.

SeanStephens commented 8 years ago

We do have a list of features (and unpublished functions). Any suggestions on a voting mechanism? (Please don't say Reddit - not that we don't love Reddit, but something more succinct and manageable would be nice).

cwoloszynski commented 8 years ago

I have looked around a bit on the site and I don't see the list of planned features anywhere public. Is it out there yet or are you still working on how to present it and get feedback from the community?

I don't have a specific suggestion on the voting process. I recently used one where each user account got a number of stars (10 initially) and then they could allocate 1..3 stars to any suggestion and they could also create new suggested changes. I think that the site (I am having a moment where I cannot remember this site, ugh!) also periodically grants new stars to accounts to allow continued involvement in the process.

I'll see if I can find the site/voting mechanism they used.

Keep up the great work with this project and site! Once there is a place for voting for features, I'd like to add the following items to the list:

I am coming from Node.js/Sails and want to bring some of the best of that to Swift

cwoloszynski commented 8 years ago

Ah, found it. You might want to consider the tool used by good notes (http://feedback.goodnotesapp.com/forums/191274-goodnotes-ideas)

It is called UserVoice (http://www.uservoice.com/), specifically the SmartVote under Product Management. Sadly, it is not cheap. Perhaps they would be willing to offer some discount for GPL projects.

dominik-hadl commented 8 years ago

Socket.io + URL routing would be awesome. :+1:

alexzielenski commented 8 years ago

Is an express-like GET/POST/PUT/UPDATE/DELETE etc. HTTP request handling yet possible? As in

Perfect.get("/users", { (request, response) in ... return response.Status(.OK) })
Perfect.get("/users", { (request, response) in ... return response.Status(.OK) })
Perfect.get("/users/{id}", { (request, response) in ... return response.Status(.OK) })
Perfect.post("/users", { (request, response) in ... return response.Status(.OK) })
...

Possibly with support for middleware? I think that would really get the ball rolling.

narup commented 8 years ago

I think it's better to have core websocket support in Perfect library, and have socket.io protocol implementation as a plugin or extension. That will open up Perfect for other websocket based subprotocol implementations