Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Alright so I have a C++ game server which I wanna connect to via UDP and Javascript, but I'm not sure how to do that.
WebSockets don't seem to work as they only supports TCP and
WebRTC doesn't seem to work either for this kind undertaking (at least from what I've read).
I wouldn't mind using technologies that are in beta-stage and therefore not available on all platforms, as as long as they are available in Chrome (Canary).
You won't be able to use UDP directly. That's a fundamental property of the web sandbox. See Can I use WebRTC to open a UDP connection?
If you want to talk directly, you can with data channels, but that is going to need a bunch of things over and above UDP on the server side. ICE, DTLS and SCTP are needed, see https://datatracker.ietf.org/doc/html/draft-ietf-rtcweb-transports. The standards are still somewhat in flux there, so I'm not sure that you want to dive into that morass right away.
You can also built Javascript+Flash bridge and use Adobe Flash Player RTMFP protocol which based on UDP. If you need raw UDP or similar, you should better use WebRTC data channel.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I have a small internal web system designed in `ASP.NET MVC 5. Max 50 users.
I am trying to implement something along the lines of this:
The idea is to display who is currently online (logged in on the website) to all the other users.
How would I go about implementing this in .net.
I have two issues:
Knowing / Managing the users login status
The transport mechanism / technology
For issue 1, I have looked into the SessionData property in .net i'm just not 100% sure on which mechanism within the MVC framework to use.
Could I use some sort of session linked variable?
For issue 2, do I need to have a JavaScript Function fire off every 30 seconds to say, "hey i'm still here" and then store that in memory or db and query it every 30 seconds.
Yes, it's very easy by using SignalR:
ASP.NET SignalR is a new library for ASP.NET developers that makes
developing real-time web functionality easy. SignalR allows
bi-directional communication between server and client. Servers can
now push content to connected clients instantly as it becomes
available. SignalR supports Web Sockets, and falls back to other
compatible techniques for older browsers. SignalR includes APIs for
connection management (for instance, connect and disconnect events),
grouping connections, and authorization.
I did it myself, you can look at my site SignalRTC to check how it works.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I want to make an web chat system with PHP and AJAX with jQuery library, but if I do an XMLHttpRequest with a delay of 0~50ms to update the messages, I don't know if it'll work. I searched over the web trying to find a system to do this, and I found the websocket system that works great with PHP and can solve my problem, but it doesn't work on certain web browsers like IE9-.
Other question, maybe I'd have about ~300 rooms running with 5~20 users online on each room, and I want to keep all the messages on my DB. Can MySQL do it fine? And how about the CPU and RAM usage?
There are a thousand ways to do this, I'll give you the "proper" way: XMPP. The protocol has been designed exactly for the purpose of chats and is extremely flexible and extensible. Set up an XMPP server, such as ejabberd or any other one. For a web client, there's XMPP over BOSH, a reliable protocol over HTTP to interface with an XMPP server. Strophe for example implements it.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Recently I have come across datachannel. I would like to integrate two infrastructure to enable webrtc interoperability.
Lync server will provide signalling and presence to help locate lync client and other peer is connected to a IMS application server. The other peer is not a lync client and its a webrtc enabled browser. how will I transfer data by integrating this two infrastructure(Lync and IMS)?
Would be great to have some information on which application layer protocols can be used for transferring datastreams thru the peers that are interoperable?
Unless you're prepared to do a lot of low-level coding and/or high-level hair-pulling, my suspicion is that WebRTC isn't quite ready for a scenario like this one quite yet. There are some folks who have managed to get it working with some servers like Asterisk, and there's supposedly a general purpose SIP client available here: https://code.google.com/p/sipml5/. But from what I hear hanging out on the WebRTC mailing list, folks are having a fair bit of trouble with these integration scenarios. There's certainly nothing that just works out-of-the-box. Lync supports SDP and SIP, but I expect that you'd need to spend a lot of time figuring out how you need to transform the SDP that WebRTC generates before it ever gets to the Lync server.
[Edit 1/28/2013] - Beyond the issues above, the real problem maybe with the codecs that are supported by each platform. Currently, I believe that the only codec supported by WebRTC is Google's VP8, which doesn't appear to be supported natively by Lync. So you'd need a realtime gateway/transcoder sitting between them, translating between H.264 (or whatever protocol Microsoft Lync settles on) and VP8. Assuming you can find a gateway to do that - they may very well exist - I can't imagine it's going to scale very well.
Just to complement Ken Smith's answer, check out MCU Media Server by Medooze.
They claim to have transcoding and conferencing and they support WebRTC.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Is it possible to implement webRTC at server side? ie., I want my browser to connect to a http server(tomcat which runs a java based app to stream a video) using webRTC protocol and get the streem from the server?
I think compiling webRTC api and access it through JNI will help. Any other easy directions to do this?
There is now a server-side implementation of WebRTC in Asterisk that should enable that: https://wiki.asterisk.org/wiki/display/AST/Asterisk+WebRTC+Support
I haven't yet looked into it that much so I can't say for sure that it does what you want.
Take a look at Lynckia's Licode Project. It is however, Node.js serverside.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
Browsing official available clients for Redis (https://redis.io/clients) it seems that there is no current client for JavaScript/TypeScript client library.
Am I right?
Is such a client simply missing or there is a reason why it cannot/should not exist?
There's a Redis binding for Node.js on Github:
http://github.com/fictorial/redis-node-client
and you can try node.js without any need for persistence.
If you have questions, right now it's best to show up on Freenode #node.js or the mailing list on Google Groups.
Unfortunately javascript can only communicate via HTTP or Websockets.
Here's an idea:
Embed a .swf in your page and write javascript callbacks for an actionscript redis client.
https://github.com/claus/as3redis
This would have less network overhead than implementing something like http://webd.is/ or any other server-side redis client.
You should be reducing network overhead everywhere possible. While the following may be fast, we may still be able to do better.
step 1 ajax call -> php -> redis
step 2 redis -> php -> ajax return
....that's at least two separate tcp connections if your redis server is not on the same server as your backend application.
Why not cut out the middle-man and write javascript callbacks to actionscript redis calls?
Here's why:
-You may not want to expose your redis server to the internet.
-A client-side dependency on flash for your data retrieval may not be the best solution in terms of robustness.
I'd like to code this up someday and see how it performs. Let me know if you try it out!
I see http://github.com/fictorial/redis-node-client has been abandoned, rather use this
http://github.com/mranney/node_redis, it's got good documentation, if combined with the redis commands http://redis.io/commands.