Best way to make Linux Web Services?
There are many ways to do this, but given your ASP.NET background why not give the MonoDevelop IDE a go, it has matured a lot and will continue to do so.
Another option is using Eclipse (Java or PHP).
Best approach to web service powered by a daemon
That's pretty much the best practice. You may be familiar with this pattern from other web applications: The daemon is frequently a database. :)
Linux web front-end best practices
Have the specialized service daemon running as a distinct user -- let's call it 'managerd'. Set up your /etc/sudoers file so that 'managerd' can execute the various commands you want it to be able to run, as root, without a password.
Have the web server drop "trigger" files containing the commands to run in a directory that is mode '770' with a group that only the web server user and 'managerd' are members of. Make sure that 'managerd' verifies that the files have the correct ownership before executing the command.
Make sure that the web interface side is locked down -- run it over HTTPS only, require authentication, and if all possible, put in IP-specific ACLs, so that you can only access it from known locations, in advance.
Web service server with SOAP on linux
You can write a soap server in any language you want, more or less:
- PHP, http://php.net/manual/en/class.soapserver.php
- Python, http://pypi.python.org/pypi/SOAPpy
- C#, using Mono.
- Java, http://oreilly.com/catalog/progwebsoap/chapter/ch03.html
- C++, http://www.cs.fsu.edu/~engelen/soap.html
- …
The best way is to pick a technology you already know.
How to make a Linux Service that Accepts Commands via Web Server?
Use the exec command in your PHP script to call shell files. The shell files can be setup with the "setuser" bit so it will run as its owner (instead of running with the web server's permissions).
Of course, you'll need to be very careful--lots of testing, monitoring, etc.
Finally, think about the service running as a dedicated user, not as root. Eg like apache and most other well done services do.
Added: Re: running a service in Linux. Depends on your flavor of Linux. If you want to be sure that your app service will be automatically re-started if it fails, plus logging, checkout Runit:
https://web.archive.org/web/1/http://blogs.techrepublic%2ecom%2ecom/opensource/?p=202
http://smarden.org/runit
Added: Instead of setuid bit, I think Frank's suggestion (in comment) of using sudo system is better.
Host a service written in linux and consume it through C# running in Windows 7
You can integrate Tomcat into Apache for hosting Java sites on Linux. Here is the site for Apache Tomcat: http://tomcat.apache.org/. Don't forget you will also need the JDK installed on the Linux server so that it can run Java programs.
Here's a site that can help you get started with it on a RedHat distribution of Linux: http://easylinuxtutorials.blogspot.com.au/2012/07/how-to-install-apache-tomcat-7-on.html
As long as it has an accessible URL, you can just make a call to the URL, then read the file either by saving it to a local directory and reading it off the downloaded file, or directly reading it into a file stream. Check How to read a file from internet?
How to implement web services on an embedded device?
You can define RESTful services the use HTTPS (which uses TCP/IP by definition) and is capable of transferring any amount of data.
The advantage of REST over SOAP is that REST is simpler. It can use JSON instead of XML which is simpler.
It has less overhead than the SOAP protocol.
Web service on Linux
Do you think that ServiceStack could be a good choice to fit my needs?
So ServiceStack runs on .NET Core and Mono but you shouldn't consider Mono for Web Apps as .NET Core is far more performant, resilient & better supported.
ServiceStack includes a code-first ORM in OrmLite that you can use to quickly develop DB Apps which supports MySql/MariaDB.
ServiceStack also supports AutoQuery where it can implement full Queryable Services for your OrmLite data models with just a simple Typed Request DTO declaration.
And in the pre-release version (now available from v5.8.1 on MyGet) it also supports AutoCrud and AutoGen AutoCrud Services which makes it possible to rapidly develop full CRUD APIs with declarative Request DTOs.
All these features are supported and perform even better on .NET Core thanks to its leaner & faster runtime & thanks to its cross-platform support you can take advantage of the simpler & superior tools and Services for hosting & deployment in the Linux ecosystem.
If so, what are the suggested steps to getting startet with it?
I'd recommend following the Getting Started section and reading the Background Concept docs if you're new to ServiceStack to get a background understanding on its design & goals.
Related Topics
Type Null Character in Terminal
How to Find List of Odbc Drivers Installed on Linux
Difference Between --Cap-Add=Net_Admin and Add Capabilities in .Yml
How to Convert a Linux Executable File (Binary) to Windows Exe File
How to Redirect Output of Echo Over Ssh to a File
Parsing Data from Ifconfig with Awk or Sed
Docker Oci Runtime Create Failed: Container_Linux.Go:349: Starting Container Process Caused
Installing Octave Package in Ubuntu
Building Opencv as Static Libraries
Bash Join Multiple Files with Empty Replacement (-E Option)
Linux/Module.H No Such File or Directory
How to Use Find -Exec in Cmake Execute_Process
How to Count Most Occuring Sequence of 3 Letters Within a Word with a Bash Script
How to Concatenate Files with the Same Prefix (And Many Prefixes)
How to Get Clearcase Stream Name by a Given View Path
How to Display the Output of a Linux Command on Stdout and Also Pipe It to Another Command
What Does Grep -Po '...\K...' Do? How Else Can That Effect Be Achieved