What are the main web server types, and the documentation on the files and programs to configure them? - webserver

I already know enough about the Apache HTTP Server, but what are the other most popular web server types? And where I can get the programs and documentation on how to set them up?

that depends on which OS you are using.
in Linux the apache http in all his forms ( tomcat/catalina/httpd ) is the most common , afterwards the nginx is also quite common.
I am less familiar with windows but I think IIS is the most common in windows.

Related

REST Server without GUI

I've started working with delphi quite some while ago but I would say I'm still a newbie in all this.
So basically I tried creating REST Server, which can validate license keys. I got in working with Indy, but one thing bothers me. The GUI. The Server shouldn't have any kind of gui so it can work on any OS (Win, Linux, etc). Is there a way to make a REST Server without any GUI/FMX/VCL?
BTW: Working in Delphi 10.2.3 Professional.
Any advice is appreciated.
EDIT: I forgot to mention one thing: the server is supposed to run on an independent Data Center away from any user.
You can create the WebServer as a Windows Service.
You can use DelphiMVCFramework or any other Framework to create it.
With DMVC you can create console application, Windows Service, Linux daemon, Apache module (Windows and Linux) and IIS ISAPI (Windows).
With Intraweb you can also create Services.
Take a look at our mORMot Open Source REST framework, which works on Delphi but also on FPC/Lazarus.
FPC support ensures that you can target Linux with this free compiler. No need to upgrade to a newer version of Delphi Architect, which supports Linux, and is very pricey - and less stable (to my knowledge) since Linux support is quite new.
As you requested, the mORMot REST server has no UI part. You define your services as interface and class - like you do e.g. with DotNet - and you will have full JSON/REST support generated.
mORMot is used on production since years for very high performance and stability, hosted on both Windows and Linux. A version 2 is on its way, which would be even easier to use for new projects.
And you can create a Windows service or Linux daemon without using any third party framework. Delphi include everything you need. However, it is possible that third party framework will facilitate your programming. Don't forget you'll have to learn those third party framework.
Creating a Linux daemon service in Delphi
Creating a Windows Service in Delphi
In both cases, you can use the sample code you've found that make use of TIdTCPServer.

How to sequence an webserver like nodejs or kestrel in app-v?

i need to have a webserver in an app-v container.
I could not find examples how to sequence and configure a webserver with app-v.
Are there examples available for sequencing e.g. nodejs or even .net core webserver kestrel?
Thank you for the help.
Simon
Never seen a web server packaged with app-v, but I've used app-v seldom, so I may be wrong.
Solutions like Docker are much more suitable for web apps virtualization.

Create a Virtual Machine from php, perl, or python? Is it possible or has it been done?

I had this thought experiment of installing an OS on a php server over http.
So, what I am asking: Would it be possible to build a VM player (using the server's resources) from a server language like perl, php, or python? Or is my understanding of servers and security lacking in a way that would show this to be impossible?
It's not as outlandish as you might think.
UeberHacker Fabrice Bellard (the guy who created QEMU, among many other notable achievements) recently did precisely that. He created a VM in Javascript. That runs a virtual Linux system in your Web browser:
http://linuxhelp.blogspot.com/2011/05/pc-emulator-in-javascript-run-linux-in.html

GWT server part?

I'm thinking about an application where in some cases both client and server would run on customer's computer. Concerning the client's resource usage I've found this question, concerning the general disadvantages of GWT I've found this, but I can't find anything about the overhead of the server part. I need no application server there, anything capable of running the server part of GWT would do.
What is needed to run the server part of GWT and how many resources it consumes?
If you use a ServiceImpl w/ your GWT app, you need to deploy it into a servlet container, like Tomcat or Jetty (or many others). Otherwise, it can be deployed on any web server, as it will only consist of javascript, HTML, and CSS.

Communicating with Java web app from non-java app through TCP/IP socket

Hosting an application on a web application server e.g. JBoss automatically brings in lots of app server specific functionalities with it e.g. security, clustering & load balancing etc. I have a situation where I have to develop a server app with which, legacy apps can talk to over TCP/IP socket as well as be highly available. Initially, I had though of using JBoss app server to leverage its clustering support for HA. However, I am not sure whether it would be possible to connect to a JBoss web app using pure TCP/IP sockets from both java and non-java apps.
What is the best way to achieve this without using web service or Http approach?
UPDATE: I am specially interested to know how legacy apps will connect to the hosted web app through TCP/IP socket.
A really simple solution to bridge the two worlds would be to add a simple Java server which maps the old TCP/IP requests to HTTP requests. This is probably a pretty braindead task, so this "server" will be simple to write and maintain. Also, this server won't need as much power since it just accepts and forwards connections (no business logic or DB code).
On the JBoss server, you develop like you normally would. The legacy apps connect to the little bridge server which passes the requests on to JBoss and translate the result back.
This ensures that you're building for the future: When new apps are developed, they can connect directly to JBoss and use all the great HTTP features.
There's no reason why you can't open up a normal socket in (say) a servlet application hosted in JBoss.
You can then get a byte stream from this. The headache is then to decide on a platform-independent representation of your messages, such that your client end can format and send such that the JBoss-hosted end can read. But it's all perfectly feasible.
I would implement a very simple http (1.0) client.