LAMP vs Compiled Binary

I would really appreciate some quick advice.

I'm going to start a project where we will be storing a lot of property data.

We intend to create a RESTful application so that different clients can connect. those. web app, iphone app, third party api, etc.

We really want the app / api to be fast, responsive, reliable.

However, realistically, we only have a certain amount of inner skill and we want our thought process to move in the right direction.

Our core knowledge is PHP, so our initial idea is a LAMP stack (possibly replacing mysql Postgres) with Memcached. We will most likely be using the Laravel framework.

However, we are playing with the idea of ​​writing software in RealBasic (similar to VB, but proper OOP) and generating bytecode. This will also include an HTTP server - everything will be simple compared to apache.

Is the latter overkill? We make this harder in the long run, as our own HTTP server will probably never match apache's speed.

I would really appreciate some thoughts.

+3


source to share


5 answers


The only way you'll want to use a REALbasic HTTP server is with an application server sitting behind Apache - it would be insane madness to run a public website on some HTTP server with a dropped connection, written in any language - - so have you will be Apache (or Nginx) in the mix.

REALbasic can work well in this role. It compiles to machine language, not bytecode, and your HTTP server will be built on its asynchronous single threaded server socket infrastructure, so performance is generally excellent.

However, I doubt it will perform better than PHP supported by caching (Memcached, etc.), and PHP is a much more mature technology for web development than REALbasic, without any hurdles or that you will most likely come across if you try to find a solution based on REALbasic.



I would say PHP is the safer and better choice for you in this case.

(Caveat: I wrote this answer after taking a break from writing a web application based on the REALbasic HTTP server, which was nothing short of a pleasure to develop - REALbasic is a wonderful language.)

+4


source


I would stick with PHP if that's the skillset you have.

It is always possible to compile PHP code with HipHop if it really suits that kind of performance.



Writing your own web server sounds like a crazy idea - if you have some standalone program on your system where it's nice to have something that's well tested and secure, it's a web server. Writing your own is unlikely to work the same way as Apache or nginx, even if you write it as lightweight as possible, and will almost certainly have serious security holes.

+3


source


Building a web server with Real Studio isn't all that crazy as you have several ways to get around this and you don't need Apache or IIS to do this. You can create a console application whose sole purpose is to provide an API to your applications, or you can create a web application that can serve web pages as well. It really depends on what you want to accomplish with the webpage. We did both for a few clients and it worked for them.

But since you are already familiar with PHP, I would say stick with what you know. Learning Real Studio isn't terribly hard, but it's still a new skill set with all the necessary hurdles to get to things you don't know (yet).

+3


source


Do you have a good reason for writing your own web server? If you don't need all the Apache bells and whistles, perhaps you can go with something smaller, for example. Nginx. Also, if you want to go with Linux, I would say Basic (or any dialect) is not the best idea. If you need bytecode, Java is probably your best bet.

+2


source


This is definitely not in your own skill set, but for fast and lightweight RESTful APIs, I highly recommend Erlang and Cowboy

Erlang is a functional language used by telecommunications companies to operate phone hardware. He is very guilty and, in my opinion, very expressive. It's optimized for concurrency, so you get all the headache-free multithreading benefits.

Cowboy is a web server written for erlang. It is extremely lightweight, efficient and easy to use. I use a cowboy to service roughly 25,000 RPS per datacenter (~ 1200 RPS per car) and he has never let me down.

If you are not going to use erlang then you are better off using apache or nginx. I would use RealBasic unless you wrote your own HTTP server (just handlers) for it.

0


source







All Articles