
|
View Full Version : Creation of HostGUI/Cpanel/Plesk/Ensim
Choppy 02-21-2002, 09:44 PM I was just wondering how do the makers of control panels actually create the control panels...
Like what language is it in? I dont admin our box at all, im more sales and marketing, but i would not mind knowing what scripts server side stuff do developers use to create control panels?
Thanks for people that reply!
Regards
MCHost-Marc 02-21-2002, 10:28 PM I guess they are written in the language preferred by the developers, but most are in C or/and PHP.
iseletsk 02-22-2002, 12:52 AM H-Sphere is java based core, with perl/shell scriptiong for actual system configuration on unix servers, and asp/c++ on win2000.
It uses ssh to communicate to all the unix servers in the cluster, and http/https to communicate with win2000 server.
Database hosting configurations done directly from java. Java was chosen as a high productivity language, and allowed us to create good and very flexible framework. We use XML to configure it, and it is allows us to do pretty nice things.
Perl/shell scripting - allows us fast integartion of new services, and allows end clients to customize it to their needs. Same goes for ASP - but on windows it is harder to do.
Ahmad 02-25-2002, 03:36 PM You can use any language and there are many ways. If I was going to write my own control panel, I would use PHP as the frontend and Python as the backend, have PHP update a PostgreSQL (or MySQL) database and Python run by cron to detect those changes, update config files, run any commands, restart daemons, .. etc.
I've put a full design for a system that can solve most of the problems of todays control panels, but as always, I'm too busy to implement it.
iseletsk 02-25-2002, 03:38 PM I like people that knows how to solve all problems, that some one else is having :)
microsol 02-25-2002, 05:52 PM Originally posted by iseletsk
I like people that knows how to solve all problems, that some one else is having :)
Aren't these forums to help each other? :rolleyes:
You always will get some help here... hopefully. :) yeah, ok, sometimes :rolleyes:
JustinH 02-28-2002, 04:07 AM I won't get to deep here, but just saying that the front-end is written in "PHP" and the backend is written in "C" really is an understatement. There is a LOT to consider when developing a CP, for example, you have to use Bash, understand server configurations as well as the front-end language.
I find it funny when programmers say "PHP/C" or "Perl" when there is SO much more to it then that.
I'm helping with work on a control panel and I hate how people (including people that actually develop control panels!) downplay the work required hehe :).
Ahmad - Pretty interesting language mix, I always think it's cool when people would develop something like this in Python... I don't think I could handle it though :eek:
vselvara 02-28-2002, 04:37 AM comphosting:
I am working on a control panel which is written fully in java (almost). It does not matter what language is used. The language used is the developer's preference.
Ahmad:
I am against the idea of checking the database for changes and updating the system accordingly. Many problems can arise. Suppose a user deletes a site and goes back and recreates the site, many problems can occur. It also makes it almost impossible to do decent error checking.
iseletsk 02-28-2002, 11:17 AM Originally posted by vselvara
comphosting:
I am working on a control panel which is written fully in java (almost). It does not matter what language is used. The language used is the developer's preference.
Ahmad:
I am against the idea of checking the database for changes and updating the system accordingly. Many problems can arise. Suppose a user deletes a site and goes back and recreates the site, many problems can occur. It also makes it almost impossible to do decent error checking.
I have to agree. One of our first control panels was using the idea of checking databases for changes. First of all you are loosing
intant updates - this means that your clients will be calling you all the times "I changed something and it did not worked". Message "all you changes will be activated in 15 minutes" simply
doesn't work - users don't read messages.
There is huge number of other problems - one of the control panels we developed 4 years ago, was using that design. It proved to be too unflexible, and too dependent on validitiy of data in database. It is sounds simply to keep db valid, but once you have 200 sub-systems - it is not. So additional level of roll-backs have to be implemented...
On the other thing I cannot say that language doesn't matter. We selected java for rapid development, and maintanence.
What we are missing - easy ability for clients to extand. While we have the framework, most of our clients prefer perl/php - so language does matter.
On the other hand, project of that size in php sounds simply unmaintanable (as well as in perl). Once you pass the 250,000
lines of code - you are better off with java or c++ types of languages.
bobcares 03-03-2002, 05:13 PM Hi!
Here are my choices...
1) PHP
2) C++
3) Zope (python)
4) Perl
Perl is quick to develop and error free.. It is very slow when it comes to execution.
C is very fast in execution .... but adds up to a lot of bugs.... C is not made for the web ( I know there a lot of libraries out there ).... can not be easily ported to multiple platforms...
PHP is my best choice.. Made for the web... Fast execution, less errors and generally very cool... can be ported to multiple platforms...
I never like Java personally.... So I can't comment on it ..... can be ported to multiple platforms...
If the stude is done properly and the work is highly modularised then it is not a very tough work....... :)
Have a great day :)
regards
Amar
JustinH 03-04-2002, 02:12 AM I am working on a control panel which is written fully in java (almost). It does not matter what language is used. The language used is the developer's preference.
I disagree, in fact, bobcares gave VERY good reasons why language does matter. For example, Perl VS. PHP execution times.
No matter what your writing language choice is one of the most important choices.
iseletsk 03-04-2002, 11:21 AM I have to say that "speed" of the language is not a "constant". I would not say that php is faster than perl.
perl cgis are slower then php, but it has nothing to do with perl. It has to do with how cgi scripts work, and the need to create new process and load libraries. If you would do server in perl - and connect it using mod_perl - I am pretty sure you can get speed higher than with php.
I think the most important thing in selecting language is how the features of the language work
for the project you select, libraries available, as well how good your developers are in the language.
I remmember the story about Yahoo Shops being done completly in Lisp. And it was highly sucessful project.
Keypoints for selecting lisp:
It is very high level language (so you can develop new features very fast)
It is perfect programming bussines logic
People who did the project knew it extensively
They were maintaining their own servers, and knew that they don't have to create distribution of it for multiple platforms - which might be hard to do with lisp.
ScottD 03-04-2002, 12:00 PM I'd have to say the perfect environment for a control panel would consist of the following:
- SOAP server to handle remote requests (HTTPS)
- Java Servlet / J2EE back end
- XML output for services (Bind, Httpd, MTA, etc.)
- XSLT to translate XML to native config files (Bind = Bind8 or DJBDNS, Httpd = Apache, Thttpd, or IIS, MTA = Sendmail, Qmail, Exim, etc.)
The SOAP (or XML-RPC) server could sit on C++ objects accepting requests from the J2EE controlers for high speed execution with transaction capabilities. Obviously each OS would depend on a different implementation of specific C++ objects, for example creating a user in Unix is obviously different than Windows 2000. Likely users and such should be decoupled into a directory service accessible via LDAP.
I would love to design such a system and do the C++ portions for FreeBSD and Windows but unfortunately time isn't really available and I'd need someone to do the other stuff as well as SME's for the configuration of various services. It would be fun.
priyadi 03-04-2002, 12:47 PM Actually, perl is much faster than php. Perl is a compiler, it compiles most of the code before execution. PHP on the other hand is an interpreter, it reads code line by line and interpret it.
What makes perl look slow is how it operates. In most environment, perl web scripts run as CGI. It slows it down because the way CGI scripts are running. Perl execution can be speeded up by using mod_perl. It operates just like mod_php. But for creating a control panel, using mod_perl and mod_php is not a good idea, especially for end user control panel.
iseletsk 03-04-2002, 12:57 PM Being a developer of control panel, I would be really interested in knowing:
Why it is not a good idea. I think simply stating that someghint is not a good idea - really not enough
bobcares 03-04-2002, 01:06 PM Hi!
The mods are not good because of security concerns... (especially true for mod_perl).
As far as perl and php comparision goes.. Personally I would not agree on the perl speed. We have developed control panels in both perl and C and now in php. We know from that experience that php is the best.... :)
http://php.weblogs.com/php_versus_perl
You'll see many such documents on the web.
Perl is good. Infact for prototyping it is the best. Also for dirty and quick coding it is a class apart.. . The first net language I used was perl and I like it but for applications like control panels php is my first choice.
(BTW I think perl is actually interpreted code and not compiled code..... not sure )
It is just a personal thought but I strongly feel it is correct.... :)
Have a great day :)
Regards
Amar
iseletsk 03-04-2002, 01:16 PM If you are running control panel - you will be running it in secure, closed env. in a separate process from generic webhosting. So the security
problem does not relate to that.
If you will be running it in the same webserver as you use for shared hosting - well - start counting exploits right now. You will never get rid of htem.
Speed of the control panel & language you chose:
It depends more on your design / implementation than on the language. If it is a cgi - you are bound to get overhead of process creation. Plus,
you have to aquire db connection over and over again.
If you are duing php without data cashing - you
will get stuck on database.
Yet - it has nothing to do with the language - just how you use it, and how well it is fit for the job.
Also, there is tools that allow you to compile java into native code, and I have seen performance increase of 50 times (not that I am not happy with java 1.3). Yet, often you don't need that.
Given good cashing - you can output pages from java with FASTER than static page speed - just because you don't have to do any IO operations.
Basically, my point is - design is more important than language. Make sure that language can implement the desing. Make sure you know about posible botlenecks.
BTW: Perl is interpreted. It is first compiled into some variation of perl "pcode". After that it
is interpreted by perl interpreter. Pretty much like java, the only difference - compilation is done each time file is executed. This is additional reason why perl_mod is so much faster - it does compiling only once.
ScottD 03-04-2002, 01:56 PM I offer a potentially biased benchmark:
http://www.caucho.com/articles/benchmark.xtp
Notice that the mod_perl and mod_php are almost neck and neck. You can also see that as things begin to scale, the Resin JSP server destroys them both and IIS/ASP is barely even a contender.
Also note that this was done by the Caucho folks, so the numbers are not necessarily reliable when comparing Resin to mod_perl and mod_php. I believe that they did their best to provide accurate results though because these benchmarks show where they may need improvement and the goal for Resin has always been speed.
That said, I fail to understand why anyone would even want to use a crude language like PHP to build something as extensive as a good control panel. Perhaps I just don't know any better.
vselvara 03-06-2002, 06:57 PM Java is the way to go! I am writing a control panel in entirely java. I am not too comfortable with JSP. I prefer servlets over JSP. JSP makes it look too much like PHP or ASP.. I hate mixing html with code.. gets too confusing.
Java is great because its simple, elegant, and fast. People have myths that java is slow, probably because of loading a large java applet. Java is probably the next fastest language to C++. Its also a pleasure to program in. Perl code just looks too messy. PHP does have 'C' like syntax but is still not great.
|