Is there a socket.io port to Dart? - websocket

I've taken a look at the basic websocket capabilities in Dart, using this simple example:
https://github.com/financeCoding/chat-websocket-dart
But I was wondering if there's a nice library I could use to build a realtime online game using websockets. I've had experience in this using node.js with socket.io, which worked out quite well. I need to be able to have "rooms", join rooms, leave rooms, broadcast to clients in a room, etc. as well as some nice notion of connection "health", reconnection etc. So what I'm asking is if there's a nice library for dart that has similar functionality? Even cooler would be a library on top of that library that could enable nice RPC functionality with variable syncing etc. such as http://nowjs.com/ which achieves this using socket.io. But I guess that might be too ambitious.
If anyone's had any experience or found a project which is similar to what I'm talking about, let me know :)

Duct is clone of Socket.IO in Dart which aims to be protocol-level compatible with the original implementation.
https://github.com/petrhosek/duct

Sorry, at the time of this writing, I'm not aware of a socket.io port for Dart. socket.io is nice because it has a bunch of implementation options for browsers that don't support Web sockets.
Sounds like a good idea for a hackathon project!

Related

How to implement SignalR using websockets

I am trying mostly for learning purposes to implement a module similar to SignalR(still a beginner in SignalR) using raw websockets. (I am already very familiar with websockets)
Is there any guide or something that explains what functionality does SignalR have on top of websockets? (so that i know what features i need to implement) ? .
From what i understood it keeps a persistent connection , and can fallback to other protocols if websockets are not supported (long polling ...etc).
I have already checked this video but i need something more in detail.
I had written one article regarding SignalR one year back. It contains SignalR basic information and code example.
Following is the link of it -
https://medium.com/#aparnagadgil/real-time-web-functionality-using-signalr-ba483efcb959
Hope this helps you!

What are the differences between using a websocket based technology versus a realtime database like RethinkDB?

Recently, I found myself wanting to develop a web application using real-time technologies. As far as I see, I have two ideal solutions.
Use WebSockets. (in my case Socket.io)
use a real-time database like RethinkDB (I guess stuff like Pusher and PubNub also fall into this category too)
I am lost, however. What are the technical differences between these two solutions? When should I prefer one over the other?
They actually work really well together. Using RethinkDB changefeeds to watch for changes in the database and then using socket.io to pass those changes to the client(s) is a good way to use them in tandem. I'd recommend taking a look at Jorge Silva's answer to this similar question.
socket.io vs RethinkDB changefeed
I was only familiar with this because of a tutorial I did with an interesting tech stack of React, Redux, RethinkDB, Express, & Socket.io. I'm not sure what you're using for your front-end/view layer but this might be helpful for learning how to integrate RethinkDB+Socket.io
http://webapplog.com/reactive-web-stack/
Good Luck!

Titanium Mobile Sockt programming

I had Mobile project using Titanium which need Chatting functionality so i found two way to do that...like using socket programming and by using Web services so which way is better and what are the Requirements for Sockets Based programming .....plz Help me.....
i had got reference for code
https://github.com/appcelerator-modules/ti.cloud/tree/master/commonjs/example/windows/chats
but i confuse which way i have to fellow ...
Dilip
If you want to implement chat application you have more option to do that.
I have already do that with socket.io that is really fine for me and also helps me a lot. And its very speedy .
And i have also experience with cloud that is also good but as per i say that socket.io is good compare to webservices.
Socket.io In Appcelerator
Prefer this it really helps you to you to understand socket.io
Socket.io
Thanks,
Dharmik

How to set up a computer network with ruby

I would like to set up a network with some computers I have, where they can connect to one main source, then receive and send messages back to it. I have never done any network programming before, so I'm just wondering what are the best tutorials using Ruby that I could use.
Thanks in advance.
There are about a billion ways you could do this. Could you post more about what the problem is you're trying to solve, or what the content/purpose/size/format/etc. of the messages is to be? Are you building something "for real" or just trying to learn network programming?
Also, do you already have the lower layer stuff figured out? You have networking infrastructure setup, IP addresses assigned, etc? If not, you'll need to get through that. Once you have that, you could start with a tutorial on basic socket programming in Ruby, but - depending on the answers to the questions above - you might not want to "roll your own" solution at that level. The answer might be to use an XMPP (Jabber) server, and use an XMPP client library, or you might want to deploy something like ActiveMQ, HornetQ, etc. and use a library for interfacing with that. Or maybe you want to use HTTP and pass messages around in JSON, or XML or $WHATEVER. In short, there are a LOT of options in this area.

How to structure a client-server application with 'push' notifications

EDIT: I forgot to include the prime candidate for web applications: JSON over HTTP/REST + Comet. It combines the best features of the others (below)
Persevere basically bundles everything I need in a server
The focus for Java and such is definitely on Comet servers, but it can't be too hard to use/write a client.
I'm embarking on an application with a server holding data, and clients executing operations which would affect this data, and thus require some sort of notification across all interested/subscribed clients.
The first client will probably be written in WPF, but we'll probably need to add clients written in other languages, e.g. a Java (Swing?) client, and possibly, a web client.
The actual question(s): What protocol should I use to implement this? How easy would it be to integrate with JS, Java and .NET (precisely, C#) clients?
I could use several interfaces/protocols, but it'd be easier overall to use one that is interoperable. Given that interoperability is important, I have researched a few options:
JSON-RPC
lightweight
supports notifications
The only .NET lib I could find, Jayrock doesn't support notifications
works well with JS
also true of XML-based stuff (and possibly, even binary protocols) BUT this would probably be more efficient, thanks to native support
Protobuf/Thrift
IDL makes it easy to spit out model classes in each language
doesn't seem to support notifications
Thrift comes with RPC out of the box, but protobufs don't
not sure about JS
XML-RPC
simple enough, but doesn't support notifications
SOAP: I'm not even sure about this one; I haven't grokked this yet.
seems rather complex
Message Queues/PubSub approach: Not strictly a protocol, but might be fitting
I hardly know anything about them, and got lost amongst the buzzwords`-- JMS? **MQ?
Perhaps combined with some RPC mechanism above, although that might not be strictly necessary, and possibly, overkill.
Other options are, of course, welcome.
I am partial to the pub/sub design you've suggested. I'd take a look at ZeroMQ. It has bindings to C#, Java, and many other platforms.
Bindings list: http://www.zeromq.org/bindings:clr
I also found this conversation on the ZeroMQ dev listing that may answer some questions you have about multiple clients and ZeroMQ: http://lists.zeromq.org/pipermail/zeromq-dev/2010-February/002146.html
As XMPP was mentioned, SIP has a similar functionality. This might be more accessible for you.
We use Servoy for this. It does automatic data broadcasting to web-clients and java-clients. I'm not sure if broadcasts can be sent to other platforms, you might be able to find an answer to that on their forum.
If you want to easily publish events to clients across networks, you may wish to look at a the XMPP standard. (Used by, amongst other things, Jabber and Google Talk.)
See the extension for publish-subscribe functionality.
There are a number of libraries in different languages including C#, Java and Javascript.
You can use SOAP over HTTP to modify the data on the server and SOAP over SMTP to notify the subscribed clients.
OR
The server doesn't know anything about the subscription and the clients call the server by timeout to track updates they are interested in, using XML-RPC, SOAP (generated using WSDL), or simply HTTP GET if there is no need to pass back complex data on tracking.

Resources