I am developing a multi-user chatting system in php.
I know about push and pull, reverse ajax, comet etc. but mostly we have to configure over our server.
However, I can't access my server to install those scripts because I have shared hosting provider.
So after some research I came to know that pusher, pubnub provides api to have push data on browser.
The question is about pubnub, that they are providing channels to send data to clients, but problem is I want to develop multi-user chat in which the data will sent to only one user not like multicasting chat.
As I think one solution is that to make a unique channel per user, so that data will only sent to that user, but this doesn't seems to be efficient. so any other way to implement multi-user chat system with pubnub ?
or any other suggestions that are better ?
Multi-user Chat System with PubNub
Get Started - PubNub best practice: How to manage private rooms?
You are asking about a Multi-user Chat system with PubNub where the communication style is one-to-one between two users with parallel conversations. Great news! PubNub has a service called PubNub PULSE - provides One-to-One style communication ideal for your Multi-user Chat - http://www.pubnub.com/price (see PULSE section).
PubNub Best Practice - How to manage Private Rooms
Also there is a conversation started here which Mikita mentioned on how to create Multiroom Chat Service, likely similar to Facebook Chat, where you are able to join and sit in on multiple chat rooms - PubNub best practice: How to manage private rooms?
EDIT - UPDATED INFO - MARCH 2018
You use of one channel per user is not inefficient. Use as many channels as you like. They cost you nothing more (or less) with respect to how many channels you use.
The pricing plans mentioned above are obsolete. Please review the PubNub Pricing and the Move Away from Device Counting.
Related
There is project which have chat feature which is been done by using PubNub. I had gone through the tutorial provided by PubNub and had integrated the pubnub.framework and CocoaLumberjack in my project. And had added the coded as shown in this tutorial
My questions are:
Do i have to create different channel to chat with the different friends? Or how the channel in the PubNub will work? I want to do only one-one chat. I don't want to implement any group chats. As per my study from using PubNub for multi users chatting every user have their own channel. But in that case how can I load the unread message count or messages when I am offline.
What is the process to install the PubNub server in my backend server? I am using backend as PHP Laravel.
you are free to create an unlimited number of channels, so for 1-1 chats, every user is subscribed to their own private channel. to chat with you, I publish a message to your private channel. here is a write-up that outlines this in more detail. for short periods of being offline (less than 10 mins), you can rely on the catch-up mechanism (make sure you configure this). for retrieving the actual messages while you were offline, you can use the history() function of Storage & Playback. retrieving only the count of unread messages requires logic on your end... perhaps keeping count of the number of messages published for each channel in your backend database, and then clients can make a REST call to your backend to retrieve this count.
PubNub has a PHP SDK you can use... what do you plan on having your backend server do?
#Alex is right and here is some more clarity on that:
Every user should have an inbound channel that they subscribe to and anyone that wants to invite them to a private chat publishes an invite message with the name of the new 1-1 chat channel, in that message. If the invited users accepts, that user will subscribe to the new 1-1 channel, else a decline message can be returned on the inviter user's inbound channel.
For any channel that a user needs to know the number of messages missed while offline (or just not actively subscribed to a channel), you need to call history on those channels with the timetoken of the last received message on that channel. This will retrieve the messages and you can just get the size of the array of returned messages to display that unread message count.
There is no PubNub server to install. Your PHP server app/script will use the PubNub network in much the same way that your iOS client apps use it. There is just the PHP SDK that you have to download and requre:
PubNub PHP Composer
PubNub PHP (non-Composer)
PubNub PHP Larvel (NOTE: third party - PubNub cannot provide support for this but it might provide some insights into using PubNub with Laravel)
You can think of both your server and your client apps as clients of the PubNub Network. Your PHP app will likely on publish messages on channel but not subscribe to channels, though. If you are thinking you need to subscribe to channels from your PHP app, please contact PubNub Support with details about your use case.
I am building an iOS/Android app using Laravel as backend and now I need a push service.
I need to push out two types of notifications, when the app is running/background and one when its closed.
I dont mind using two types of services, I mostly want one that is easy to implement into Laravel.
I have already looked at Urban airship, but it seems hard to implement this with Laravel - Might just be my mad skills.
Pusher, looks easy to implement with laravel, and can only handle in-app/background pushes. But their smallest plan only support 100 connections which seems a little. - 100 logged in users?
Parse seems to work, but if I understand their api I also need to log users into parse's API.
So please share your experiences on push services using Laravel.
in-app
Pusher allows 100 users connected simultaneously. So if you unbind the channel on appstate going to background, you should be fine up to 400-500 users (in my case, I had 2000+ users before I had to upgrade my account to startup). You can find out more about their pricing plans here: Pricing Plans
background
Parse: as of writing this, their status is "service is now shut down".
Urban Airship: I found their library the easiest to implement, and they have a ton of customization that you can apply to your notification (including notification actions).
All that being said, I had a hard time finding a library to for laravel to push the notification for Urban Airship. The only one I found is php-library2, but it's not supported any more, so use with caution.
I need for a project to build a live chat with:
group chat room
private chat (user-user);
web site interface;
mobile interface;
others information (profile etc).
I want to start obviously from the server: any PHP framework or tutorial to do this ?
Otherwise, any full-solution (but customizable) with web site + mobile compatible ?
Use XMPP Server (XMPP server uses Socket programming, so once a connection will be establish, then it uses that connection each and everytime, you no need to create connection everytime, like HTTP).
Or Use GCM (Using Push Notification you can send and receive messages as well).
Here are some Source Code - Github
Source from google
Hope it helps.
http://vidorsolutions.blogspot.pt/2011/01/writing-xmppjabber-chat-application-for.html
This would be the best place to start!
Have fun building the app!
Also if you really want to get deep into it, Xabber source code will prove of great help.
XMPP is a communication protocol for message-oriented middleware based on XML (Extensible Markup Language). In plain words it is a protocol used for instant messaging.
While APNS and GCM are services used to set up push notifications for your apps.
So, it's a bit different.
I believe building a chat app from scratch is not an easy task for you.
So, I'd recommend using a ready backend and concentrate on client-side implementation of your app.
For backend you need to choose a provider with the set of features most suitable for your project and then start app development with the API provided by your backend provider. You might find this article useful when choosing.
It seems you are looking to get going fast on your chat implementation...the xmpp implementation is one way. Firebase provides another. Having implemented messaging via xmpp as well as firebase, I can offer up this tip: stable connectivity and auto-reconnect logic in an openfire+SMACK implementation is not particularly reliable. I have had recurring troubles maintaining connection in the face of drop offs; updates in Openfire that may or may not conform to the older SMACK library versions are not helpful (no one guarantees for conformity - you are on your own). Others with more xmpp-based experience may attest to these difficulties. Firebase is not without its own challenges but I found them manageable. I also recommend you checkout at least one opensource chat library implementation via firebase (github link being one such). With firebase the connectivity issue largely goes away and a host of new options open up. I prefer if the backend is fully taken care of by the library provider so we only need to focus on UI. Hope this is helpful.
I am using Google Cloud Messaging for Android (GCM) to send data from server to Android Devices. It is working properly , Now i have to do same for Blackberry devices .
I have already googled a lot, but not getting solution.
I am working with PHP code in this project, Need some Suggestions to complete this task.
BlackBerry Push Services may be the solution that you are seeking as it provides a seamless connection between content providers and push-enabled BlackBerry devices.
For server side development, there is first the "Standalone option" that provides control and flexibility to making push messages. It is an agnostic back-end system solution therefore can integrate into existing systems that are using either PHP,.NET,JAVA, etc technologies. With this approach, Push Access Protocol (PAP) will need to be implemented along with other items such as subscription management.
There is also the secondary approach using the "Push Service SDK" which provides two types of options that include client/server side samples to reduce complexity.
"Push Essentials" tier in the Push Service SDK option allows for user subscription, user management, push message validation, and managing result notifications. While the "Push Plus" tier in the Push Service SDK option encompasses "Push Essential" features, it also allows storing push requests so if your push solution receives a result notification, it can then perform status queries locally. "Push Plus" as well allows knowledge of if an end user has received a push message. Both tiers of the Push Service SDK require a JAVA implementation as java encapsulates PAP API thus removing the need to implement a PAP protocol.
Depending on your requirements and how you want to design your application you can use either the Standalone or Push Service SDKs approach.
Hope these suggestions help!
I'm working on a Software-as-a-service (SAAS) application that allows companies to manage supplier information.
What are the providers / vendors that can offer Billing services, including managing invoices, subscription, renewal and reminder for payment dues?
I find that building this from scratch will take a lot of time.
In addition to the billing, what other major components / considerations that I should look into in order to publish this application succesfully?
I have the following notes and welcome any suggestions:
1) Infrastructure : for scalability and maintenance, I use cloud computing so that I'm free from managing infra, especially for scaling up should the demand increase.
2) Security : I find that if I use dedicated server, I have to pay a lot more for security, such as Firewall. So using cloud computing will enable my application to 'ride' on the secure platform.
regards
We just came across this which looks pretty good - http://chargify.com/.
The biggest challenge with a lot of the billing systems is that you either end up with a lot of coding to do or they come up short with one or more critical features. Systems such as PayPal can't handle externally driven recurring billing for security reasons; you as a customer can agree to a subscription from a seller, but PayPal has to handle everything. Also, everyone having to have a PayPal or GoogleCheckout account to conduct business may be a non-starter depending on your audience. The traditional e-commerce merchant systems like AuthorizeNet and LinkPoint give you more flexibility, but you might have a lot of coding to do to push the transactions through the way you want, depending on your platform, not to mention more overhead in setting up the account in the first place. Amazon Flexible Payments Service stands somewhere in the middle, offering more flexibility than PayPal/Google Checkout, but still having the third party account limitation. Since you're doing a tool that manages customers' relationships to their suppliers, you may benefit from Amazon's ability to facilitate transactions between two external parties.
I've done development in this space using Java or Ruby on Rails. Ruby on Rails has a wonderful gem built by the people at Shopify called ActiveMerchant that makes credit card processing pretty simple once you have opened your merchant account with one of the AuthorizeNet/LinkPoint type of providers. Most of the merchant providers have decent Java APIs as well. You may want to look at something like Blinksale for invoicing, since it lets you put together pretty invoices and has an API.
Regarding cloud computing: I'm a big fan and it lets you manage the costs of scaling more easily. However, it does require in many cases that you solve problems of clustering and failover more quickly. For tasks such as batch billing that can be run through something like Amazon MapReduce, this isn't an issue; you bring up what you need, throw it in the black box, and get the result out. For something that requires continuous uptime, such as the web interface, you will want to evaluate whether it'll be cheaper to run a cluster of webapp servers in the cloud or just run 1 or 2 boxes at a managed data center such as The Planet or Rackspace. The right answer for you depends in part on the expertise you have available and the languages/platforms you're using. For the continuous uptime side, you may also want to look at a provider such as Morph that will host a Rails app in the cloud.
Please reply if anything I said requires further clarification.
Mosso (which is Rackspace's cloud subsidiary) has some basic billing capabilities built in - I am just in the process of moving my sites over, and client billing was one of the reasons I did. They only do CC billing, at least for now.