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 2 years ago.
Improve this question
I am a newbie and trying to create a CGI server. The server will get request from different clients (the server will have to open chrome and do something, so different chrome profiles for every client). I will receive requests using PHP. What is the best practice to do so? Is docker to be used in this case?
As was stated in the comment, there are lots of possibilities and the best practice could vary quite a bit by company, architecture, and tech stack.
But all things being equal, I can say that this is typically a good use case for Docker. And it'd be a good place to start.
Other options:
Going with a non-containerized approach... Run the CGI server directly on a host (could be physical for virtual). One tradoff here is that the host's environment must be configured to support the server vs. the just the container's environment.
Doubling down on a containerzied approach... If you plan on running multiple workloads across different containers (i.e. beyond a single CGI server), you may look at utilizing a container orchestrator, the defacto being Kubernetes.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I am working with a PHP web application that has a MS SQL back end. The development copy is hosted on a Windows server.
There will be a few developers joining me on the project, and I need some sort of source control so that (obviously) we don't over-write each other's work. But since a PHP/SQL project has to be run from the server, we can't each work with local copies and then push the updates to the server...we all have to be working on the server itself.
So I have three questions:
My initial thought was a simple check-in, check-out system, which should be ok for our small team of 3-4 programmers. So, what is (currently) a good program for that?
I also thought about each developer having his own folder in the wwwroot folder, his own full copy of the program, then pushing updates to a master copy, also on the same server. Is there a good program for doing that (file merging and conflict management)?
Which method do you think would be better?
Run servers all your local machines. There’s lots of ways of doing this. If you’re using Laravel, it has a server built in php artsian serve. PHP 7 also has its own server built in.
Use a version control system like Git. You can learn here
Do this as soon as you can!
Sadly however, this question is not a suitable Stack Overflow question, so will be likely be closed soon. Good luck!
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 5 years ago.
Improve this question
Let's say I want to implement storage server, which would be used as a place to store files, images, etc. from different websites. Something like S3, but only for my projects.
I thought about some API/Gateway on PHP, which would save files from those websites to appropriate server, but is it a good way? And should I use Webdav or maybe NFS/SMB, which protocol is more secure and fast?
Can you please give me advice how to create my own storage server? Especially I want to hear about appropriate stack for that, thank you.
There are a number of projects for building your own NAS or SAN (I think that is what you're looking for). Look at the FreeNAS project for example. It does require quite a bit of memory though (depending on the size of your storage and the demands you put on it).
When you want to build your own NAS, you will not need very powerful CPU's, unless you want to run apps on the NAS (FreeNAS provides a system for runnning containerized applications on the NAS, using it's storage) but you will need memory and of course plenty of disks, again depending on what your exact requirements are.
However, if you're simply looking for a place to store your own files and they are not extremely large or a huge number of files, then you could simply build a Linux server and push (or pull) the files using SFTP, it only uses OpenSSH and a single port, fully encrypted with minimal overhead.
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
What are the pros and cons of building your own web server, and the difference between building your own versus installing a 'pre-configured' web servers (such as: LAMP, WAMP, XAMPP, and other else). Is there any good benifits of building your own web server?
If you're gonna have your own server, would you rather build it on your own, or just download one from the internet? and Why?
Building your own web-server
Pros:
It will work exactly according to your taste
It will use the technologies of your choice
At the end you will know virtually everything about it, while with other webservers sometimes that is not possible
You will be famous if you implement something fantastic
Cons:
You will have to do a lot of complicated stuff which will delay the start of the task you wanted to work on in the first place
You on your own will not be capable to be even close to other webservers, developed by many programmers. You are one, they are legion
As times are changing, modern techniques will pour up and you will need to do a lot of work to adapt to the changes
Other webservers are free in many cases, while developing your webserver is very expensive: you pay with your sweat and tears
But the most important point is that before you start implementing your webserver try out others. Even if you reach to the conclusion that you want to write your own your experience with other webservers will help you a lot in planning yours.
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
I want to build a server that will listen to a custom port and talk with my web application through a custom protocol. The server will have a dispatcher and workers that will undertake a task and complete it.
Is Laravel up for the job or should I go with something more specific ?
EDIT:
I would like to clarify that it's not an API. Basically a php script will run on loop in CLI mode (meaning no Apache or NGINX involved here). The script will open a socket and listen on a certain port for connections from clients. Once a client connects, the server will start some jobs and send the answer. It also involves a job queue to which the server will connect(probably a database), get the jobs and fork new processes that will complete the jobs.
EDIT:
It seems that you don't need much of a framework at all (except maybe for the database operations part. since you if you use sockets you will (probably) not use much of the framework's functionality like routing, view templating...) Depending on the complexity of your database I'd use a framework or not. If it's very complex, features like Eloqent might help... I think you should think on how much of the framework you will use and if you can only take the stuff you need trough Composer instead.
END EDIT
Should you use Laravel/PHP to build a server - it will be probably too slow for that purpose.
1) If you want to make your own server (not website or API) I'd much rather go for Node.js or something along those lines (ruby, python, C#..)
2) By "custom protocol" I assume you don't mean something different than HTTP/ TCP/IP ? Then what do you mean by a "custom protocol" ?
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
I'm searching for a means to overpass the need for a web server when using a local web application. Why aren't there browser extensions or special browsers to do so? It seems very easy to code to me. The browser or extension would call a php interpreter to compose web pages from php files. Local urls (file:///) would be used. No web service or port would be necessary. Is this just nonsense? Or am I the first person to think about this? In fact, this does already work with static html files.
First edit: I was looking for a server for testing purposes, being able to compose output from php files, without the need to communicate through network ports. Maybe I should have started from here, but Stackoverflow does not allow this kind of posts.
That sounds nice, please go ahead and build that technology. I will also use it. But oh, for now that has nothing to do with SO.
Why web servers are needed even for local web application
Because they are web applications. Technically you don't need a web server for local stuff if all your application code relies on client side programming. You can just go ahead open your html files in browser.
Browsers know how to interpret client side code already, so why re-invent the wheel? If you ever wish to write 1 line of server side code then obviously you'd need a web server at that point.