Why we are not using php in Hadoop framework? [closed] - php

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
Any specific reason we are not using php in Hadoop framework?

There's nothing stopping you from using PHP for Hadoop Streaming MapReduce (assuming PHP can read from standard input and write to standard output).
And there's also not much preventing PHP from being able to query HBase or Hive or Spark Thrift Server assuming a driver exists that allows for that.
The only main issue is that you cannot use the core Java libraries very easily and most services would need exposed via REST, for example.
Any Hadoop web UI could probably be rewritten in PHP, if needed, but it's too much context switching, in my opinion.
A libhdfs C extension does exists, I've not seen it widely used. If you did want to interact directly with HDFS, that's probably the most performant way. Webhdfs would be an alternative
But you'd have to ask the core Hadoop developers why PHP isn't used.

Related

SNMP monitoring & Web interface [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I have read many articles, forums and informations about SNMP.
Even though I struggle with my project.
The goal of my project is to display data that I get from SNMP on a web page. (Nice designed interface). SNMP protocol is compulsory. And it should run on linux server (I want to add more devices in a final part of project e.g. router, switch.)
Could anyone tell me some quick info what has to be done (step by step review)?
I would be glad for every help. I am confused about what is the best way.
Ajax/database/websockets/traps?
I would like to use PHP or Node.js if it possible.
I'm doing a similar project for my internship :
I'm using Perl script for back-end with Net::SNMP for snmp request,
Perl CGI for front-end,
and JSON for DB.
I suggest using a framework to create the web interface, for example Django (https://www.djangoproject.com/) in python.
Then you could use a python library (pysnmp will be great) to retrieve the SNMP data, and create a custom View to show this data in a web page.
If you want to stick with PHP, you can use the functions described here http://php.net/manual/en/ref.snmp.php to access the SNMP server, and again using a framework will be great (Laravel, Symfony ...)

Server side language for an Ajax interface? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
There's a website with an Ajax interface. My goal is to open up the page with Ajax components locally, in a browser, to let the Ajax interface fetch data (in a text file) from my local server. What is a good server-side language for this? i.e. having a competent library for Ajax interfaces. I want something lightweight so Java is kind of out of the question.
I'm currently thinking PHP, NodeJS or Python. Thanks for the help!
NodeJS is great for this. It has its own http module to make requests as well as tons and tons of user-created libraries to help or provide additional info. The http module will give a response that you can easily pipe to a file how you wish. Plus, if you already know Javascript, learning Node is relatively easy.

How does PHP (mysqli or pdo) run MySQL commands? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
When using mysqli or PDO in a PHP script what are the mechanics that take place for the sql query to run?
Does the mysqli module run shell_exec() with a mysql command? I'm sure there is something more here.
Edit
More specifically what I wanted to know was what is the process that PHP takes to actually make a MySQL call, what are the mechanics involved for PHP to have access to the database.
There is a thing called Mysql C API.
Both PHP extensions are written by implementing low-level C functions from this API.
It connects directly over a socket to the server. There is no way to have connection pooling if you're just doing shell_exec(), which you may have noticed is an option. Not only that, but running another executable for every single query is insanely slow. As the other answer has mentioned, PHP uses C-bindings for Mysql which do all the hard work reading/writing sockets.

Framework for storing settings in a database (PHP and MySQL) [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
So after considering my options, I've opted to go with a database storage system to store applications settings. Given the fact that these settings will ultimately be changed every so often by the user, I decided implementing them into a database versus a config file (e.g. .ini file). What we're thinking of doing is storing these settings in a key/pair manner. The only trouble I'm having is finding an efficient way to access and write settings into the database.
My question is, are there any frameworks that you may use/heard of that helps to deal with this type of scenario? The only thing I've managed to find is endless discussions about the storage methods along with their pros and cons but nothing related to implementation of these methods.
Every framework. But. Why do you even need entire FRAMEWORK to just connect to database? Use native PDO included to every PHP installation. Use SQL libraries or plugins. Or consider using XML/CSV/INI files.
Still wanna frameworks that help with database? Here you go:
Yii
Zend
Symfony
Codeigniter
Laravel
Fat-Free
Kohana
CakePHP
Joomla
etc
"Full" list

How can I create complex reports with PHP / Symfony2? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I need to create large and complex reports (with graphs, images, pagination, headers and footers, etc) from my Symfony 2 application.
I've been searching the web, looking for Symfony or PHP complete report generators (like Crystal Reports, Report Builder or JasperReports), but I haven't found anything. The only thing I've found are some libraries to generate PDF's from PHP, and the wkhtml2pdf tool.
Is there any reporting tool for Symfony 2 or, at least, for PHP? Or must I use JasperReports and search or write any plugin to call Jasper from Symfony? I haven't deployment constraints because I have my own VPS (no shared server), so I have root access.
For a "pure" PHP solution, you can use PHPJasperXML, which renders Jasper Reports natively into PHP, so you don't need to setup Java and a bridge for PHP, there are some limitations as this is not an official implementation, but it's pretty useful nonetheless.
By the way, the reports can be created with IReport, and then simply used on PHPJasperXML.

Categories