Re: The meaning of life, Perl and SML
by Util (Priest) on Nov 25, 2008 at 01:45 UTC
|
You should be able to run it on your own server (Linux or Mac); your DSL connection will only be a factor if your application ever reaches high traffic.
- Get a "Free Dynamic DNS" account from DynDNS.com (who have been big-time Perl supporter, BTW), and configure your server to update your account whenever it detects a change in its IP address.
- Install and configure Apache. You should not need ModPerl for low-traffic development; CGI will do fine.
- Get a simple "Hello World" CGI Perl program running, that you can run via your web browser.
- Extend the "Hello World" program to exchange some of its data with a simple SML program via system, qx, or some other IPC method.
- Keep modifying the "Hello World" Perl/SML pair of programs, until you reach your research Nirvana.
- Come back here with any *specific* problems you have with the Perl parts of the development
(See I know what I mean. Why don't you? and How (Not) To Ask A Question when the time comes.)
- Come back and tell us all about your success!
| [reply] |
|
|
Dear Util,
I just added you to the list of my seven favorite utilities. Thank you!
Almut pointed me to the VPS options, I consider to do that and I am busy studying the details and comparing the offers.
But running my own server at home is something I regularly think about every now and then, too. When the first "Mac mini" came out, I purchased one, hoping I could use it as a permanent, silent and economical web machine. But the promised built-in server never worked for me.
I installed the Xampp suite from apachefriends.org and the I didn't explore CGI and SML on it yet, but HTML and PHP documents work fine under http://localhost. But when I try to reach it from outside, I receive an error message. There must be some mistake in my thinking about the mechanics, maybe you can give me a hint:
Well, suppose Xampp is running fine and http://localhost works locally, i.e. in the mac mini browser itself. I go to whatismyip.com and see that my current IP is say 77.250.13.83. I don't have a permanent IP, but that one should be my IP as long as I am online, right?
But when I take my laptop and type http://77.250.13.83 into the firefox, it returns an error message. The one it just gave me was: The server under 77.250.13.83 takes too long to post an answer. I guess, this also has to do with the setup of my home environment. The ADSL line from the (tv-cable) modem goes into a wireless router, one line from there enters the mac mini and my laptop is connected wireless.
Sorry Util, of course you are not my personal utility and you shouldn't feel obliged.
Thank you again for your kind reply.
| [reply] |
|
|
When you go to whatismyip.com it will give you the IP of your ADSL connection, not your computers. You will get the same address for both your laptop and your mini if you try that. To see a computer's local ip you will have to look in your Control Panel, or type ifconfig in a command line terminal (the command is ifconfig on Mac/Linux and ipconfig in Windows). Then you will have the local network address for your computer. Sorry if I'm just telling you stuff you already know, but I wanted to make sure.
You will need to configure the firewall on your router to allow http access from outside connections. Use NAT (network address translation) to put HTTP traffic (port 80) through to the local address of your mac mini. You should set it up so that the mini is always assigned the same IP address, it should be under DHCP settings on your router configuration. Once you configure the firewall properly you may be able to use the 77.250.13.83 address to reach your mini's website even from within your network, but I can't remember the exact router option that is needed to do that kind of thing. I think it may just be called loopback.
I can't remember what the default firewall options were on my own mac (I'm now running Ubuntu on it anyway), but you should also try to access the mini from your laptop while connected to the same network to make sure that the mini is allowing HTTP connections through its own firewall. There are options to allow different kinds of networking through the Mac's firewall in the Control Panel, you should have a look at them.
| [reply] |
|
|
|
|
|
|
Make sure to read the Terms of Service for your provider. Few of them, if any, allow users to run websites from their home machines/connections. If they don't, you could probably do it ethically if your bandwidth was going to be low or the usage was chiefly personal but if your account got suspended you might be out a lot of time and effort and have to start over with a new provider or a VPS.
These guys are in the US but I had a very good 2-year experience with them on a VPS account: JohnCompanies. If I needed one again, I'd go back to them in a second.
| [reply] |
Re: The meaning of life, Perl and SML
by almut (Canon) on Nov 25, 2008 at 00:32 UTC
|
Don't know how much you can/want to afford, but the easiest way
would probably be to rent a Virtual Private Server (VPS). As you'll
have root access, you can install essentially anything you want. VPSs
have gotten rather cheap these days. For example, where I live you
can get one for around 10 Euros per month...
| [reply] |
|
|
Thank you, almut!
I knew of the "dedicated server" mode for millionairs, but didn't know that this VPS is an option, too, nowadays.
I live in Holland, and the last time I did a serious search, each host server I found here had a serious flaw, most of them were far too expensive. My current host is in Germany and in fact offers "managed servers", too, but way to expensive. There are two big providers in Germany and they both have offers around 10-20 euros/month, as you said. I will check the details. ... Thank you very much indeed!
(It probably is a sign of disrespect to ask a monk - but do you know a nice provider here or anywhere else in this universe?)
| [reply] |
|
|
do you know a nice provider
Personally I'm using a VPS (for about two years now) of
one of the big providers in
Germany, and I can say that all in all I'm very satisfied. (I can't say
much about the quality of their support, though, in case you'd want a
human being at the other end — I've so far never had the need.) Performance-wise, even the smallest option would seem more than sufficient for what you're planning to realize...
| [reply] |
|
|
Re: The meaning of life, Perl and SML
by herveus (Prior) on Nov 25, 2008 at 17:02 UTC
|
Howdy!
I've been using http://nearlyfreespeech.net for a while now and have been
satisfied with the services and facilities. I don't know if they have SML tools
available, but you may be able to stand them up in your space. The price is
pretty good, too, but it is aimed at the geekier side of the market. Frankly,
that was a positive point for me.
| [reply] |
|
|
Thank you, Michael!
NearlyFreeSpeech.net seems to have a very nice philosophy and approach. But among the 12 CGI languages they support is no ML, although OCaml and Haskell come very close already.
At the moment I am very excited about all these new possibilities that suddenly appear since my post yesterday. I'd fancy the total freedom of an own server to mess around, but I am afraid for the limitations of my hardware and knowledge. So I might actually make a deal with this virtual server thing.
Thank you again, you have all been very helpful!
| [reply] |
|
|
| [reply] |