Basically i would like to have some kind of server statistics on my dashboard. Is there any package out there that does this out of the box.
I know finding the health of the server is pretty simple, by checking the status code for 200. But what about other stats? Stats like, no of db queries, load on the server & db, no of visitors on the site right now etc. I know most of them are pretty simple, but is there any way of getting this information in realtime without slowing down the server.
Can we benifit from services like NewRelic Lite. We could use the api to get the information from NewRelic and just display them on the dashboard. Will that be a good idea?
EDIT:
I am also looking into nagios, which looks like an opensource alternative to NewRelic.
Any suggestions?
I guess it Laravel Server monitor could help you. I've never used but it could give you some "light".
New relic seems to be a very complex and complete service, you could benefit from it a lot. Display every type of information that they can give you, its basically one of the most complete services i've seem.
I think antonioribeiro/tracker is the best, Here is the link to the repo.
I have used it in many projects, Its well maintained and well updated. Good Luck.
Related
I want to create a tracking platform but am in need of some advice. What it has to do is the following:
Someone visits a link e.g. http://click.track.com/redirect?campaign=1&partnet_id=2
When visiting this link a user get's redirect to e.g. http://google.com/?xx=xx
I'm going to use redis since it's really fast and considering the following two options since I have the knowledge to build it in that way.
PHP
NodeJS
I'm thinking that NodeJS is going to be faster but would like to know opinions of other people. Maybe I just have to learn something else to make it work even better :)
I would look into HAPI server - this is a BATTLE tested node server that gives you SO many options. Express may work too but i put my trust in the HAPI server stack. Plus they have alot of great add ons and plugins.
https://hapijs.com/
Redis is also a great key value store as well - Look into CASSANDRA too
http://cassandra.apache.org/
https://redis.io/
You need to have a good hosting service provider like digitalocean, amazon cloud etc. for faster redirection. PHP or NodeJS it doesn't matter much when you have a faster hosting.
i am working on an iOS app, it will use some real time messaging, as i see it, i have 2 options here:
Socket connection to the server, so it can respond when there is a message, or constantly quering the database for updates.
The only requirement is that i am writing it in ObjC and not Appcelerator or phonegap.
Id like to know which backend provider you believe i should choose, and which language i should use for the backend.
I have done a fair amount of research my self, and i have tried a custom server solution running PHP, i have also tried Parse, which i really liked, but the price is horrible when scaling. I have also heard alot of great things about google App Engine, while i have not tried it, i have tried their mobile kickstarter, which seems bad, considering that their sample project has multiple errors that have been sitting on their git for months without getting fixed.
Anyway what i am asking is, should i write my own custom backend? Or should i use Google app engine / Parse or something else? Should i use Node.js, PHP or Python?
Id like to save as much time as possible, and i have alot of experience with symfony, the PHP framework, and i have minor experience with phyton. I have little to no experience with node.js, dont mind learning it tho.
Thanks a bunch for your time :)
I believe Parse is great place to start. You can get a free account (with up to 1 mil api calls) and also send push notifications extremely easily (for your messaging). There are also tons of analytics as well.
I've done a LOT of research on my following problem, but it all ends up pointing to Websockets which I can't use because my host doesn't allow command line or ssh. I've also tried the postMessage(data, targetDomain) technique, but that's not entirely where I want to go either.
Here's what I want to do:
Execute javascript from one person to the other users that are on that page without reloading it or anything.
Example: A user clicks a button on the page and it sends a javascript code that automatically executes a function on every other listeners page. Kind of like a chat feature you could say, but less dense maybe?
This is my first time exploring this field so I'm a bit confused over the concepts. I've read multiple documentations of programs that offer socket like usage, but not really any luck here. (Like I said, I can't really use sockets because of my host).
Any help is appreciated, thanks!
If you are on a hosting platform that doesn't allow WebSockets then you can outsource the realtime communications layer to a hosted realtime service (I work for Pusher which is one such service).
Hosted services tend to have a free tier so depending on what you are trying to achieve that may be enough. If not, then contact them, explain your app and your situation and they may be able to help.
If you want to use a self hosted solution then you may need to go with something HTTP-based. But, again, if you are on a small shared hosting platform this may be quite resource intensive and your hosting provide may tell you off.
If updates aren't all that frequent they you could use standard AJAX polling at reasonably long intervals. It sounds like you'd like to avoid this though.
Personally, I'd recommend using a hosted service as what you are trying to achieve is inherently difficult with PHP as it was built with request/response in mind.
Related: Realtime websocket-like behavior possible on Heroku?
Apologize if this particular problem has been answered already (a search didn't turn anything directly relevant up).
We are developers of a web app that is used to provide community commenting and "social" to our partners websites. Our app uses Javascript and HTML on the front end, PHP and mySQL on the back.
Currently we are running everything through our own servers, which is getting very expensive.
We would like to ask our partners if we can host the app through their servers, with them getting a discount to our monthly charge due to the bandwidth/cpu load they would help us share.
My question is, is there a way to host our app through our partner's web servers in such a way that we can offload most of the CPU time and bandwidth without exposing our source code?
I would greatly appreciate any ideas/help!!
Thank you very much all!
If you also serve static or rarely changing content your clients could run a caching reverse proxy to remove some load from your servers without giving them any source code at all. But you need to implement caching headers for this to work properly.
You may want to look into nginx.
On second thought: Did you try to compile your scripts using facebooks Hip-Hop for PHP? First of all the script should perform way better, second of all, if you still had to outsource the hosting, you deploy a compiled program, no source code involved.
If you put the code on their server they can find out. So that won't be 100% working. Though you can make it difficult but it's still not great.
Most doable solution might be to separate parts of the application and share them. So: You give away a process (so source and other needed data) but it's only part of the total. That way no partner has your total solution but you do outsource the parts.
I am interested in a really good way of doing instant messaging like meebo and facebook and myspace all have, also for notifications on a page. Example on my site now, when a user receives a new mail message, photo comment, profile comment, friend request, some other things, they will receive a notification message and link on the page they are on using jQuery and AJAX.
I believe on a large scale that this is not the best way to do it though as my jquery code will have to basically run a PHP script to query the mysql table every 30 seconds or so for every user who has the page open with this script running. I would like to eventually add in some sort of instant messaging like facebook has in a chat bar at the bottom of the screen if I can find out an efficient way of doing it.
I have heard the terms Comet and HTML5 WebSockets but I am not sure if these are the solutions I should be looking at for such a feature? I would like to keep bandwidth at a minimum and running a query every few seconds does not seem very efficient on a high traffic site.
If you know some good solutions, please explain how they work a little bit please
You're looking for a "comet" server. Since you're talking PHP, your best solution would be a SaaS solution, such as WebSync On-Demand, since PHP has issues with scaling when it comes to large numbers of concurrent connections being held open. See also this question.
I think Facebook uses XMPP for their chat, so have a look at it.
XMPP is
an open technology for real-time communication, which powers a wide range of applications including instant messaging, presence, multi-party chat, voice and video calls, collaboration, lightweight middleware, content syndication, and generalized routing of XML data.
You'd install a separate server to handle messaging and in your app you'd implement a client with one of the available libraries.
Could you have a shared message queue that ajax can query? Maybe its a php script that stores a majority of the message in memcached (and possibly write to db in case of failure).
Not sure, but curious to hear other solutions ...
The basic problem is that you need to implement a Comet server (ie implement Server Push). The standard web hosts and apache don't readily allow you to do this easily. Another hosted solution (apart from Web Sync) is Goldfish Server. Currently free.