What are good application servers for LAMP stacks? - monitoring

I need recommendations for good application servers for monitoring and debugging PHP and Mysql running on linux. It should have a GUI, query profiling (log slow queries etc.) and capture PHP errors with environment coniditions.
I am aware only of the Zend Platform that provides those features and I'm looking for alternatives.

I don't have a good answer for you, but as far as I know Zend Platform really is the only PHP app server that does everything you list, with an integrated reporting GUI. My background is doing pretty serious enterprise PHP stuff (clustered app and DB stacks) for nearly a decade, following the space closely, and running an Alexa top-1000 site.
Now I'll waste a paragraph pointlessly stating what you probably already know. :) You can do all the things you list -- log PHP errors with request/environment data, do MySQL slow query logging, and do analysis and application profiling -- relatively easily without Zend Platform from the CLI, and I've always done it by building logging hooks into the application, and then things like shell scripts, Mon and Monit for alerts/status GUI. But that's because my experience with really high-demand applications is scaling/clustering a single app or stack -- versus running servers where there are lots of random apps/scripts running, which is where I would think Zend Platform would really shine. If you're into SNMP, you can set that up then use a GUI client to do a lot of what you're talking about, but again, that's not the same level of "out of the box" that Zend provides, either.
I modded your question up and will be really interested if you get a better answer about a Zend Platform alternative, but I don't think there's an integrated server product that comes close.

Related

Is there any module for ejabberd like MongooseIm mod_inbox?

PLEASE! I've been trying to find some inbox module for ejabberd like MongooseIm's but without success
I would like to know if there are any, and if not, can I adapt MongooseIm's mod_inbox in ejabberd or is it better to switch to MongooseIm?
EDITED:
or how can I create a similar implementation on the client with 0313 - MAM and 0013 - Offline messages that give me the same or approximate result. Please help, I'm breaking my head, I don't want to change the ejabberd but if necessary, no problem
Disclaimer: I'm on MongooseIM core team.
It's not clear how much you've invested in deploying and integrating ejabberd. If the integration is only on XMPP level, then MongooseIM is mostly a drop-in replacement. You can just grab a MongooseIM container or a prebuilt package and be done with it.
If you have, on the other hand, invested in metrics gathering, deployment pipelines, infrastructure as code, etc, then switching might cost you a bit more effort due to some differences in how the projects are built from source, report stats, format logs. The switch is still relatively easy, but there's some overhead involved.
If you're comfortable programming in Erlang, then porting mod_inbox won't be a big problem (it's a matter of a few days at most). If you don't have Erlang experience and hiring is not an option, then better stick to prebuilt MongooseIM container images / packages.

Developing Ruby and Rails in Windows? Or Linux VM

I've been doing front end web work for a while. I maintain several company websites and etc, mostly on Joomla. I'm getting bored with it and I really want to expand in to development. I have a few web app ideas for the company and some personal stuff I'd like to do.
Ive decided I want to learn Ruby and Rails and have been pursuing it for about a month now. I read a lot of tutorials and work through stuff I find online. I'm also diving in to git and trying to use it more.
I feel like Windows is not going to be conducive to me getting efficient at this. I know that you can, and some do, develop in Windows but I'm wondering if its time for me to move past it.
I picked Ruby to be my first real programming language because of the simplicity I read about. For both Ruby and RoR and I want to be able to learn a language that will let me build apps and web apps that are cross platform.
On to the problem, I can't immerse myself completely in a linux world. I have to have photoshop and indesign for part of my job. So I'm thinking maybe I should just do a live usb key install and take it back and forth between work and home. Is that a better solution than dual booting for what I want to do? I also realize that a mac would give me the best of both worlds, but I am budget constrained and I can't make that leap yet.
Also, is there a good place to hang out to learn more? I have paid codeschool and tutsplus accounts. Should I be back on IRC? What do you think? I'm looking for guidance more than anything I guess. I feel kind of lost on where to go how to not waste time and start developing real skills. Thanks.
You should also checkout the vagrant project which creates headless (non-gui) VMs and makes it easier to work with your files, etc in Windows while the code actually gets run on the Vagrant VM. Also, since its headless, the graphical UI isn't eating up resources and has less impact on your host machine.
Check out these resources:
http://www.vagrantup.com/
http://blog.dcxn.com/2013/07/12/introduction-to-vagrant-for-rails-developers/
http://railscasts.com/episodes/292-virtual-machines-with-vagrant
*Also if you're learning Rails, you MUST checkout Railscasts http://railscasts.com/
The last thing I knew about this is that:
In Linux you can use RVM which handles pretty well everything about your Ruby environment. In Windows I tried pik, but it does not have support to install newer Rubies.
Also, Linux console is much friendlier than Windows one, regarding appearance and functionality. I have explored console2 for Windows, but it did not feel so comfortable that time.
In Linux you have plugins like oh-my-zsh which allows you to speed up your development. But maybe there are kind of this plugin for Windows.
Other than those, I don't know why you should choose Linux VM.
I've developed a Rails app under Windows, and it turned out to be a huge mistake. Near the end of the development, I had to make my webapp multithreaded. The default Rails server does not allow multithreading, and all the alternative servers are either Linux-only, or I couldn't get them to work.
I also considered using JRuby(because Java threads), but by then my app was too big to convert to JRuby(there are some syntax differences that I couldn't track, and I relayed on some gems that don't work on JRuby). However, if you go for JRuby from the beginning, you might be able to pull it off.

Server Environment

I am trying to develop an iOS application that stores and loads data to and from a server. The data needs of the client can be pretty much narrowed down to REST. MY question is, is REST something widely used for data/server driven iOS applications? is there a paradigm proven better or more suitable for iOS apps?
if REST is the way to go, what server environment would you choose? what server side Technology? PHP? Java? something else? We'd set up a test/dev environment at first, but eventually we are going to deploy on services like Amazon cloud or any other hosting/cloud service.
Any insight will be most welcome.
So are you writing the backend too?
Most projects that I've worked with in the past few years use REST. It's made little difference in the implementation of the iOS app (I think...). I'm more concerned about the type of data I'm consuming, which is usually JSON - and ensuring that it is as lean as possible. People writing web services should be concerned about REST.
I've also worked with projects this year that use different technologies on the backend. Java on one, and Ruby on Rails on the other.
I know another guy who uses PHP on one project, and Ruby on another.
If I was to do a backend, I'd probably use Java - solely because I know it. Not the best excuse to pick a technology - but as a full time iOS developer, I don't have time to learn something new that I won't use very often.
If you are going to deploy on a cloud based service, see what technologies they support. Maybe picking the common denominator would be a wise choice to keep your options open. Some languages tend to have more expensive server hosting costs. Java is usually more expensive than PHP to host, I guess due to the complexities of running shared java VM's instead of PHP interpreter.

Choice of platform for running web site on Amazon EC2 Linux instance using Solr

I'm a Microsoft guy feeling pretty confident building ASP.Net sites running on Windows. That's basically what I do for a living.
Now I'm considering building a Facebook web app on my own and started looking for hosting solutions. I found the Amazon Web Services Free Usage Tier offer pretty compelling. And having the web site in the cloud also seems like a good idea if it becomes popular.
The problem with the offer is that it's only for Linux instances and I don't know squat about that platform.
I've planned to use Solr as my search engine (and perhaps the only data store) since I'm familiar with it and it's just great from a performance and feature standpoint.
Right now I can see two alternatives that both have pros and cons.
Ruby on Rails
I don't know the platform or language but it seems to have pretty good integration with Solr. It would be fun to try something completely different and RoR seems very popular right now.
Mono
I would be familiar with the platform and the language but it seems to lack in Solr integration.
Any thoughts or pointers to resources would be great. Like I said, I feel a bit lost stepping outside of my comfort zone.
It's really hard to advise someone with completely different background. First you have to forget for a minute all that you know about Linux :)
I would try heroku.com
You don't need to know Linux to deploy to heroku. They have a free plan and they have a Solr add-on, $20/month though.
Be warned: If you go RoR route you may never come back to ASP.NET again. No kidding.

What is your experience with Nitrogen on Erlang?

I've been checking out the Nitrogen Project which is supposed to be the most mature web development framework for Erlang.
Erlang, as a language, is extremely impressive. However, with regards to Nitrogen, what I am not too keen about is using Erlang's rather uncommon syntax (unless you're native in PROLOG) to build UIs.
What is your experience with it as opposed to other mainstream web frameworks such as Django or Rails?
I've done very little with Nitrogen so far, but I've been monitoring the mailing list for months, so I think I have something useful to say about it.
To your concern about the syntax of Erlang and the Nitrogen framework, I'd respond that that sounds like a pure case of unfamiliarity, rather than unsuitability. Objectively, HTML is not a beautiful language, and it has plenty of quirks. You're used to this now, so it doesn't seem so bad. Give Nitrogen/Erlang a chance and you may find that you get used to it soon enough, too.
To your question about comparison to other languages and frameworks, I'd say the biggest difference is that with Nitrogen, the entire web site is being served directly by the Erlang runtime. Ruby on Rails has such a mode, but it's intended only for testing. Many other frameworks don't even offer the option of running everything within a single long-running process.
Running the entire web application and its underlying infrastructure within a single long-running process has significant implications on how the site runs:
With Apache, each child gets killed off every N connections, where N=500 or so, and you can't say whether a given child will always handle all of a given client's requests. Because HTTP is stateless but web apps almost always require some client state, an Apache child must rebuild its view of client state as part of handling a new connection. By default, this means going back to disk for persistent data stored about that client. There are alternatives like memcached, but these aren't built into the core of a LAMP type stack. With Erlang, nothing is killed off periodically, and Erlang offers standard facilities like Mnesia which provide disk-backed in-memory DBs.
Incidentally, if you're familiar with nginx, it's built on the same principles as Erlang, and it's fast for the same reason. The main difference between nginx and an Erlang instance running a web server is that nginx isn't a programming environment, so it still has to delegate a lot of processing to outside code. That means it shares the same IPC and persistent state problems as Apache.
Because the runtime stays up continuously and is a fully-functional programming environment, you can probably build more parts of your system in Erlang than with a lashed-together LAMP type stack. This magnifies the above benefits. The various parts of your system can coordinate via message passing and Mnesia instead of heavyweight IPC and MySQL, and all the pieces stay up and running continually, leading to less time-consuming state reconstruction.
A dozen or so Apache children all accessing the persistent client state data store is a lock-based hairball. The frameworks all handle locking and such for you transparently, but what they can't hide is the time it takes to do all this correctly.
Erlang is an impure functional language, which implies but does not require data purity; it is also built with multiprocessing in mind, going clear down to the core of the runtime design. These two facts mean you're less likely to spend time waiting on locks in an Erlang based server than one naively built on one of the other frameworks. It is certainly possible to optimize away lock delays in the other systems, but is that really what you want to be doing? Do you want to be on the thousandth team that has to learn how to optimize its web stack after the service becomes popular, or would you rather leave it all up to the tooling so you can spend your time doing something no one else has done yet?
I, too, was once concerned about clunky Erlang syntax. I've built a couple of tools to alleviate its annoyances for everyday web programming, and perhaps you will find one or both of them helpful:
ErlyDTL is an Erlang implementation of the Django Template Language; it's not available in Nitrogen, but it is available in other frameworks, such as Zotonic, Erlang Web, BeepBeep, and Chicago Boss
Chicago Boss is a full-stack Erlang framework that does a lot of code generation so that you can access data fields with function calls instead of Erlang's rather verbose record syntax (e.g. Person:name() instead of Person#person.name)
Note that Nitrogen does not include a database layer, so it's not really comparable to Rails or Django. For a comprehensive comparison of the database-driven frameworks, check out my answer to this StackOverflow question:
https://stackoverflow.com/questions/1822518/current-state-of-erlang-web-development-frameworks-template-languages/2898271#2898271
I would check out Webmachine if I were you. It is quite simple, fast, and leaves the interface up to you.
Erlang Web should also be considered mature. It is an MVC framework, whereas Nitrogen is more event based. It's a matter of preference.
I haven't used the other tools mentioned here except Webmachine, which I think it's a wonderful tool, but it is not a web framework like the others. It is as HTTP processor, and is ideal for building a restful interfaces.
I would also suggest you give the Erlang syntax a chance. Erlang is one of my favourite languages to use.

Resources