HTML5 Websocket + Node.js Realtime Notification System [closed] - html

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
in the last weeks I have built a small notification system using HTML5 Websockets and node.js with socket.io.
There are still some things that I haven´t solved, yet.
I have read that realtime notification using node.js should be the best performance solution vs long polling etc because of non blocking i/o operations.
Now assume we have to notify friends of this user. Something like "I have bought a new iphone". How do I teach node.js to realtime notify specific user 1:n? Till know I have only got sending and receiving message 1-1 communication.
This means I have to go check against facebook api friendlist first and find out which facebook_id is connected with which socket_id somehow. Then check the users privacy settings, if he would like to receive notifications and then send and save it into the database.
So to me this somehow seems not to be the most effective solution...
At the moment I would use mongo-db native driver for node.js and have db operations done by serversided javascript.
I still need to implement facebooks javascript sdk to get the friendslist, but I would have trouble with the users privacy settings. Doesn´t this destroy all the advantages of non-blocking I/O?
How do you actually solve this. To me, it seems very complex.
Thank you very much.

You shouldn't go to Facebook to check friends list and such..
you should cache them, i assume the users are logged in if so the solution
seems to be very easy.
Get the user.
check if the sender is his friend
check if the recipient want to receive the message.
btw, redis is a lot faster.
Edit:
if you are worried that the user data won't be updated
and that's why you do not cache you should check Real-time Updates.

Related

Windows8 Push Notifications in Metro Application using HTML5 [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I have a metro application in which am trying to display notifications whenever my service get updated.I tried to read Metro App push notification concepts overview from microsoft website and I observed Push Notifications sample but I did not get proper idea to implement push-notifications in Metro-apps?
Can anyone give me a sample example to implement push notifications in metro apps using HTML5 & JavaScript,really it will helpful to me?
Thank you in advance.
For push notifications, you need a server side component to perform the actual push of the notification. This is performed by your server sending a request to a specific URL -- that URL is obtained from your application which registers with your service. Clearly doing this in a pre-canned way is marginally non-trivial, although the process itself is not.
Details on how to obtain the URL, and how to send a notification to it:
http://msdn.microsoft.com/en-us/library/windows/apps/hh465412.aspx (Getting the URL)
http://msdn.microsoft.com/en-us/library/windows/apps/hh465450.aspx (Sending a notification to the URI)
If, however, you just want to update the tile for your application when it does something when the user is using it:
http://msdn.microsoft.com/en-us/library/windows/apps/hh465439.aspx is a good starting point.
The above links have snippets. There is a fully worked through sample for tiles/notifications on MSDN also:
http://code.msdn.microsoft.com/windowsapps/Push-and-periodic-de225603 (Push)
http://code.msdn.microsoft.com/windowsapps/App-tiles-and-badges-sample-5fc49148 (Local)
I'm also working on the same. Here I'm sharing few links below which might be useful to you.
Prior to this, once read the Guidelines and Checklist for implementing push notifications.
Go through this link for Implementing Windows 8 Push Notifications.
Hope it Helps.

Vb.NET Client Server Push Notification [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I am a an amateur in Vb.NET programming, or in this case any programming language that needs push server notification.
I am currently making an application which requires the server to send a notification if Client A is making a task assigned to Client B.
I can only imagine to create another application on the server which up all the time and listens to any changes happening on the database, and then if there any changes send a notification to assigned user.
Is there any better approach?
Can someone point me to a good resource?
Any help will be greatly appreciated.
Thank you.
This has been covered already here [asp.net http server push to client], which should give you some good info about adding a push service to your project.
On a related question, John Saunders, says:
"Unfortunately, that's just not the way the web is designed. Rather,
it's set up so that a user asks for a specific resource and the web
server provides it if it can. One request always returns exactly one
response.
This means that you need to simulate the push service by creating a
heartbeat between a rendered browser page and your server. The web
page will have javascript that tells the browser to periodically ask
the server, "Do you have any changes for me?" You can implement that
in ASP.Net AJAX using the timer control, but it can be tricky to get
it right. There are lots of little gotchas you need to watch out for."
Some other realted websites & questions:
http://www.strathweb.com/2012/05/native-html5-push-notifications-with-asp-net-web-api-and-knockout-js/
Instant notifications like Facebook
Server-Push Technology (aka. "COMET", "http server push", "websockets")
AJAX Server Push
One thing I know about push services, is that it uses a lot of resource. Also look at Reverse AJAX.

IOS Development: Game application creating user accounts [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I am looking to create a game application and have done a lot of video tutorials and read a lot of books on IOS.
I would like to know more information on techniques and common practices for game applications. I do not want to setup a game using GK/Game Center. Ideally I would like the user to have the option to enter some basic fields like Username/Password or to login with Facebook to create a user account.
The game will be peer-to-peer and played by one user completing a move that sending to the other and vice versa.
I have had a look at the Facebook SDK and the Hackbook sample application and that part is all fine.
I would like to know if someone can provide more information, video tutorial, eBooks and/or sample code for applications that create user accounts. What methods do they use to create these for multi player games, how these are then managed in terms of multiple users being created and playing the game, how these are scalable etc.
Thanks
You'll need to have a server to store user accounts and game data. If you don't want to create the server yourself, I'd recommend using a backend-as-a-service platform. I've had good luck with Parse
https://www.parse.com/
They have some samples and SDK functionality for user accounts and Facebook integration. That should get you started. Your game data will be saved in an object that acts very similar to an NSDictionary that you can persist on their servers.
If you want a different provider, just search for "backend-as-a-service"

3rd party mail sending service [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I'm currently running a web-app that will send emails to users when they sign-up, invite friends, and want to reset password. I also will be sending out general marketing email. I have a postfix server set up, but I don't have reverse DNS set up (due to hosting provider limitations). I'm afraid my emails to users will not be delivered. I've tested it and some mail go straight to the Spam box for Gmail.
Instead of this DIY approach, are there good emailing providers out there that can guarantee high deliverability of my emails? I'd rather not have to deal with this myself so I can concentrate on building my app. I looked into Mailchimp but they seem to be a service for bulk mailing and not for individualized emails (in the case of user sign up validation, friend invitation, and reset password). Or am I getting this wrong?
Mailchimp does have a service for transactional mail which they built on top of Amazon SES, you can check that out here.
You can also check out PostageApp, where I am the Product Manager. We specialize in transactional emails and we make it real easy to design, send, and manage all of your emails.
Happy to answer any questions you may have!
Ended up using SendGrid. They take care of all the deliverability issues and can do transactional email sending.

Rabbitmq or Gearman - choosing a jobs queue [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
At work, we need to build a jobs server for things like sending emails, building PDFs, crunching some data, etc. Obviously, we'd like to build on some sort of generic queueing system. I'm familiar with Gearman, and that this is exact problem that it tries to solve: putting jobs on a queue where workers come to pick them up. However, I'm seeing lots of mentions of Rabbitmq and am unclear how it's used in this scenario.
Is Rabbitmq a good framework to build a distributed jobs system on top of?
I would say that Gearman is better for queuing "jobs" and RabbitMQ is better for queuing "data". Of course, they are both really the same thing, but the way it works out for me is that if you are trying to "fan out" work to be done, and the workers can work independently, Gearman is the better way to do it. But if you are trying to feed data from a lot of sources down into fewer data consumers, RabbitMQ is the better solution.
The history of RabbitMQ, as something that allowed Twitter to take bursty loads of messages, and feed them into crusty old SMS gateways that could keep only one connection open, were rate limited, and didnt have retries, is illustrative of the kind of problems that RabbitMQ is good at solving.
It all depends what semantics you want to expose. It's really easy to do what Gearman does on top of RabbitMQ, which can certainly 'fan out' messages to independent workers.
But Gearman is built for purpose. IIUC, Gearman is a framework for processing jobs and not a messaging system as such. There are other such frameworks such as Celery that use RabbitMQ under the hood for that. Here is an article about Celery that is worth reading.