Facebook Like Chat Messenger/phonegap and its requirements - ajax

Please I need venerable expert contribution on this only:
1.) Am trying to get insight on how to build a Facebook like chat Messenger using Ajax,Jquery,html5 and Phonegap as a Wrapper(For cross multiple platform). Is this a good idea or
approach?
2.) For Chat application I want to use either Ejabbered Client with XMPP or Web sockets. The chat will be require to
periodically display typing status, instant notifications, Messaging sounds etc
Between this two technology Websocket and
Ejabbered/XMPP which one is the best in terms of performance, latency reduction,cpu and Bandwith consumption reduction and battery life
saver etc. Again between the Ejabbered Client/XMPP and Web Socket which of them is supported by phonegap.
3.) Does every hosting company supports Web sockets and Ejabbered Client/XMPP Server
4.) Please emphasize on the reason why one is prefered to the other.
Thanks

I just did an IM application using Jabber (XMPP) in native android, (not in phonegap); and it works like a charm.
Is it a good idea? - well, if you are good and quick at phonegap, then go for it.
For a comparison, this post might help you. I know XMPP better, it is a well-done IM protocol with lots of awesome extensions. Furthermore, this sample XMPP app on Phonegap might also give you good insight, if not anything more.
Many choices. Rent a cloud server. Begin with a free version Amazon EC2 server.
For my Jabber IM app, I installed the opensource OpenFire IM server quite easily on an Amazon EC2 Server where I quite simply run a Linux machine. This is a step-by-step tutorial on how to install and run a Linux OS up in Amazon with one click!

Related

CodenameOne plan for the cloud storage API

Since CodenameOne doesn't support "the cloud storage API" any more and the parse.com is going to retire soon as well. Does CodenameOne has any plan to release a new Cloud Storage API or provide suggestions/guidelines to help developers to deal with the parse4cn1 library code, cloud code, database structure and data in parse.com?
That is something you will have to figure out yourself as parse4cn1 was initially contributed by a community member and wasn't developed by Codenameone team.
You can use a simple webservices created in php, python or java, hosted along your content with any ISP.
You may also have a look at amazon aws which is promising, they provide a cloud solution but their SDKs is not yet integrated to Codenameone.
I made the parse4cn1 lib and I'm also wondering what's smartest to do. With the announcement of Parse.com's imminent shutdown, there's been a lot of discussion around alternatives. My feeling is that "the dust is yet to settle" as per what options are best and reliable for the longer term (it would be a pity to migrate to another service only for it to be shut down soon). So I personally plan to wait till sometime in Q2 to do a proper evaluation of the alternatives. Hopefully, there'll be more clarity then.
The option to host one's own Parse server (e.g. on AWS or Heroku) is getting interesting. They recently announced support for push notifications on iOS and Android. If (when?) they open source the Parse.com dashboard code, I think that option would be much more interesting.
At some point in the coming months, I plan to make a parse4cn1 release that exposes an option to set the server path. With that, anyone migrating to the Parse server option should, in principle, be able to continue to use the cn1lib. Of course, for features that are supported by the open source Parse server.
PS: Here are pointers to some of such discussions on Parse alternatives:
https://github.com/relatedcode/ParseAlternatives
http://www.slant.co/topics/5219/compare/~firebase_vs_kumulos_vs_kinvey

Is Parse an adequate solution here?

I'm contemplating to use Parse as a platform for my app, as I'm trying to avoid creating and managing the cloud infrastructure myself.
For the sake of simplicity let's say that my app will hook into an Exchange Server and will need to leverage some hosted Machine Learning service to categorize my e-mail and report on insights found.
I'm assuming that Parse would store my core data, while the hosted ML will store the "Big Data" associated with processing for insights.
I'm also expecting my app to receive push notifications generated by the hosted ML service.
Does this sound like a plausible way to go about it and leverage Parse, or am I better off developing the backend myself?
I think parse.com is the right place for you requirements, because they have everything you need like storage of core data, push notifications, cloud module which can be integrated with heroku, social integration, user management functionalities.
They also have large set of client libraries for desktop and mobile apps (node,java,.net etc...) also they have libraries of embedded devices.
The biggest advantage is that everything is setup, and you are focused on software development not on infrastructure things. This is my opinion.
I've been experimenting with the above stack and so far was really impressed. Seems like a viable path forward. The Cloud Code capability of Parse is very solid, and easy to work with. If you want to run services outside of Parse code this us also possible : just issue REST calls.

How to use Windows Azure in Indonesia?

I plan to implement my website (asp.net & sql2008) using windows azure, but I have difficulty to do it because windows azure has not released yet in my location (Indonesia).
Should someone like to share the solution the same with my problem would be appreciated.
The question was asked on MSDN and the answer is that it is not possible. The only solution is to wait for Windows Azure available in your country.
MSDN Forum
Just run your apps on HK or Singapore Windows Azure Public Data Centers, these are the APAC Data Centers for your region.
for testing reasons, I wanted to create an Azure account, and faced the same here in Egypt.
I've made it by remotely logging into one of our U.S-based servers, and registered from there :) If you can't do so, and need this account badly, and don't have such server, try using TOR.
Update: TOR is a proxy-like solution for your internet connection, it will redirect all requests/responses to a node on the TOR network, which consists of volunteers like you and me.
so my solution is simple, we gonna use tor to simulate that you are inside one of the permitted countries, and register your account with ease.
what you gonna need is to install TOR and configure your browser to use it, but my personal recommendation is to install TOR browser bundle, it's TOR+a Browser that is pre-configured to use it.
you gonna find a nice video on the TOR browser bundle page that will give you an overview about it.
give it a try, and tell me what happened.

NSServerNotificationCenter and a Linux server

In one of my Mac apps, I have the need of having PUSH notifications. Instead of using some custom solution, I thought I might as well give NSServerNotificationCenter a try. Apple's docs mention a notificationconf command, which my Ubuntu server does not have. The docs also mention that NSServerNotificationCenter uses XMPP.
My question is basically this - I have ejabberd running on my server, could I just connect to that from my code? How would I post a notification to a user using this? I also need a way to let my NSServerNotificationCenter know my user's credentials - I presume I would do this using an NSTask and run notificationconf setpass hostname username.
Does anyone know how I should go about setting this up? I also need to find a way to create a new ejabberd user when a user is registered through PHP, but that should be no problem.
Then again, if this isn't possible too easily, is there another way of doing push notifications on the Mac with an Ubuntu server running the server part?
Thanks for any responses, this topic is seriously confusing me.
My experience with this class suggests that it is really only meant to communicate with an OS X Server (i.e. Mac running the server package/version of the OS) and only meant to do push notifications for Mail and iCal. Very limited!
But XMPP is definitely the way to do push notifications here! I suggest you check out the XMPPframework project from the Deusty guys. It's a Cocoa implementation of XMPP and should work nicely with ejabberd (though I use OpenFire).
There are also a handful of PHP-XMPP frameworks. Check out xmpphp on Google Code.
Lot's more information for other frameworks and languages here.

What is the best solution for real-time bi-directional communication between a web application running on a mobile phone and a server?

I'm looking at having thousands of simultaneous connections from mobile phones to the server whereby anytime a user interacts with his cell phone, the data is sent and logged by the server. Also, anytime the server has new information for that user, the server can push that information without a browser refresh. I am wondering what is more stable and how you would build this?
A good real-time framework or infrastructure will have numerous APIs that should let you connect any device, no matter the technology, to the real-time server e.g. an iOS client library for iPhone and iPad, a JavaScript client library for numerous platforms including normal and mobile web, an Android compatible Java library and so on.
An interesting idea might be to choose which ever framework or real-time service suits your needs best and then using something like PhoneGap. But, as #rt2088 says, it depends if you need the notification app to be running as a service on the phone or as a standalone application.
The choice will also depend on whether you want to install, host, maintain and manage the scaling of your own real-time services or not. If not, there are a number of services out there who you could use so you can concentrate on building your application. If you do want to manage your own infrastructure then the Comet Maturity guide could be a good start. It's a little out of date but is still probably the best reference available.
the ability to push new content the
user based on his GPS location which
is "pinged" to our server. Based on
that, we deliver local content. What
frameworks are you talking about?
There are a number of real-time frameworks available at the moment. Some are hosted services and others require installation on your own hardware. The majority of them will come with a bunch of libraries in different technologies that make it easier to get up and running with them e.g. a JavaScript library that wraps the WebSocket object and also manages fallback for web browsers that don't support WebSockets.
I've just created a Real-Time Technologies Guide in which I've listed all the real-time technologies that I could think of and provided a bunch of tags associated with each.
wouldn't a javascript client library
cover all platforms if it is a web
appilcation?
If the application is a web application then yes, a JavaScript library would be all you need for the client application. The server side libraries that you require would depend on the real-time technology you choose.
Best solution to achieve this is to use the WebSocket communication. It is bidirectional asynchronous communication. Currently every browser supports this new standard and plenty of code snippets available. You just have to google it. There are many server and client side frameworks. choose the one best suits to your requirement.
The details of the WebSocket specification is available at -
Websocket specification
Do you need notification when user uses mobile browser of handset or the mobile handset itself (performing non-browser tasks)? Based on that, the framework to record user activity can be selected.

Resources