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

Adding Socket.IO to the Advanced Seed #43

Closed
OscarAgreda opened this issue Apr 9, 2016 · 16 comments
Closed

Adding Socket.IO to the Advanced Seed #43

OscarAgreda opened this issue Apr 9, 2016 · 16 comments

Comments

@OscarAgreda
Copy link

I don't want to sound as if the Advanced Seed needs anything to be better, because is already a great blessing for us developer.

But, have you considered to include Socket.IO and can that works across multi platforms.

for example, on a CRM app, User A who is running the CRM on an IPhone, updates the "Customer Information" , and at the same time the information is also updated "Socket.IO Real time" for User B who is running the CRM on a windows 10 device and looking at the same "Customer Information" screen for the same customer.

Obviously if a third person User C comes after the update operation described above, Socket.IO will not be involved with User C, because this third user will update the screen from the database.

@OscarAgreda
Copy link
Author

Currently, we achieve the above using the Microsoft Stack on the backed and of course Angular 1.5 (could be lower) on the front end.

By using AngularJs $emit in conjunction with the SignalR jQuery plugin proxy.invoke on the front end to send messages to the SignalR server Hub, do some server stuff here if we need to, then the server broadcasts back to the specified clients on the front end (could be a group, one particular user, to others or to all). the signalR jquery plugin is listening to the server, captures the message sent by the server with proxy.on at that time yields at the angular $emit method, which talks to the angular $on listening somewhere in the angular app. Pretty simple workflow yet powerful.

So i was wondering if your awesome seed that already uses Electron for 3 desktops and NativeScript for mobiles; could make use of Socket.IO to rule the world on all devices from one code base.

@NathanWalker
Copy link
Owner

Hi @OscarAgreda I'd be open to this. Would you want to try a PR?

@khuongduybui
Copy link

Have you all considered PubNub?
https://www.pubnub.com/docs/web-javascript/pubnub-javascript-sdk

@mrgoos
Copy link

mrgoos commented Apr 14, 2016

You should consider primus instead. This way, everybody will use their favorite websocket technology.

@khuongduybui
Copy link

@mrgoos primus is not a bad choice as a client-side library, though it requires us developers to host our own websocket server. In the case of PubNub, they host the server (with cdn) for us.

@mrgoos
Copy link

mrgoos commented Apr 14, 2016

@khuongduybui - you can host it wherever you like without being forced to use a freemium service.

@khuongduybui
Copy link

@mrgoos uhm, you're right, I can write a PubNub engine for primus if I need to. That's more convenient.

@mrgoos
Copy link

mrgoos commented Apr 15, 2016

No need to write anything related to PubNub. Just to use primus on the server side.
It's free and works great with ANY websockets technology.

@NathanWalker
Copy link
Owner

PubNub would be interesting. PR's are definitely welcome!

@joshwiens
Copy link
Collaborator

@NathanWalker - Things like this start getting into the realm of opinion. Would it not be a better approach to not "muddy the waters" and just go the route of the base seed which runs extended forks & docs?

IMO You have crossed from "example of extending the seed" to a repo that people are forking to extend.

Implementing technologies that have numerous options ends up limiting peoples options or making them gut a bunch of stuff thus complicating pulling from upstream. So while the same could be said for NativeScript, it's more like the "Angular" of hybrid mobile.

You quickly end up with something like ...
Let's add socket.io! But what about deepstream.io but I want PubNub .... the list goes on.

Just my $0.02

@mrgoos
Copy link

mrgoos commented Apr 17, 2016

^^Exactly my thoughts.
This is why I suggested primus so user could use whatever websocket technology that he/she wishes like socket.io, engine.io etc.

@NathanWalker
Copy link
Owner

I agree with @d3viant0ne here. It's definitely leaning towards a heavy opinion based implementation. May be best to do something like this on a branch perhaps? If anyone wanted to submit a PR, I'd be happy to place on a branch and mention it.

@joshwiens
Copy link
Collaborator

@NathanWalker - I was trying to get Minko to go that route. Pick a few "supported extensions" and then run them as branches thus simplifying the validation process for things landing in #master.

Just rebase them up and the CI takes care of the rest.

@OscarAgreda
Copy link
Author

OscarAgreda commented Apr 19, 2016

Agree 100%.
While for me asp.net core 1.0 is where the sun shines right now, and where i will push entity framework core with LinQ under the webapi controllers. For other people mongo and mongoose make more sense .
So i guess for me the route is signalR 3 (next from Microsoft ).
nevertheless all of the server stuff is nothing compared to the awesome angular2 advanced seed. because of the outstanding angular2 best Code Practices from the people that knows ..

@NathanWalker
Copy link
Owner

I'm going to close this, thanks again for the suggestion and kind words @OscarAgreda, just to conclude if a PR were submitted with such functionality, it could be merged to a feature branch for future reference.

@OscarAgreda
Copy link
Author

What about using Angular Firebase 2

literally can build a chat for no more than 200 lines of code.

I think realtime applications are part of modern apps, and the Angular Firebase 2 is an example of it.

https://github.com/angular/angularfire2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants