Hello again,
I hope you have enjoyed your easter days.
As you know we use the source.url feature to switch between different stations
by setting the url of a http.input stream dynamically.
This is done by an external scheduler, which reads an external schedule and
triggers telnet commands to change the URL at the right time.
Furthermore I use an additional http source to set an URL for the fallback
source.
In the last months the amount of collaborating radio groups still increased
so we hope we can use the url setting command in production mode in near
feature.
My questions are partially related to dynamically setting the source URL with
source.url feature and LS-475, "clean handling of errornous URLs":
1) reseting an source URL
Not all stations have a fallback source (e.g. due to lack of a secondary DSL
provider).
How could I reset the secondary URL empty in this case?
All I tried e.g. url ['',nil,undef,null,[]] results into LS-475:
station2.url ''
Thread "http polling" failed: Invalid URL "'' "!!
Thread 4 killed on uncaught exception Failure("Invalid URL "undef"!")
Raised at file "pervasives.ml", line 22, characters 22-33
Called from file "sources/http_source.ml", line 144, characters 6-53
Called from file "sources/http_source.ml", line 270, characters 31-44
Called from file "sources/http_source.ml", line 425, characters 6-34
Called from file "tools/tutils.ml", line 136, characters 15-18
Re-raised at file "tools/tutils.ml", line 161, characters 39-40
Called from file "thread.ml", line 38, characters 8-14
2011/04/26 12:18:33 [main:3] Shutdown started!
using no parameter returns the URL itself, which is very useful.
2) checking source URL status
I think a simple URL check will ease but not basically solve the problem with
wrong URLs.
How could I check if a source set by URL is really alive?
I could read the current URL by
station1.url
but I do not know how to get the current status, like "connected" or "not
connected"
(or any HTTP error codes 4xx which could give a hint what is going wrong like
(not found, unauthorized)
seesection 10.4 Client Error 4xx at
http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html )
It would be a great help if there was a status command or something similar.
This could help to make switching more robust, since most errors still occur
due to wrong URLs
and we currently have no chance to get an alarm in this case.
If we have an stable solution I would like to publish the scheduler, but up to
know its still under development.
Please let me know If I can support you on this questions.
3) HTTP authorization
How could I request URLs that are protected by authorization, like .htaccess
user@password:http://domain.com
This one is low priorized since we did not need it up to now, but I think its
jut a matter of time.
BR, Peter
Am 07.02.2011 03:32, schrieb peter retep:
> Hi David,
>
> First of all: many many thanks to you!
> This is exactly what I was searching for.
> From now it is possible to switch between all these streams that easily!
>
> I like the idea to return the currently set URL by the function same
> function you call to set it.
> Furthermore I like that setting the URL is possible, while the stream
> currently plays another URL, so switch can be triggered by stop/play only.
> Its even possible to use spaces within URLs.
> Switching works very fast, so I think about just setting the new URL
> without switching to a second http.input instance.
>
> Only case I found not working, is that wrong typed URLs like
> http:/localhost:2345/radio (one / missing after http:/
> makes liquidsoap shutdown.
> Unfortunately stopping the process cannot be avoided by using fallback
> method.
>
> I assume this comes from prior URL handling,
> where source URLs were checked at start to find out errors before
> running the show?
> How do you think about making the source fallable? This could give the
> operator the possibilty to fix a wrong URL by server interface.
>
> 2011/02/07 03:10:57 [threads:1] Thread "http polling" failed: Invalid
> URL "http:/localhost:2345/radio"!!
> Thread 4 killed on uncaught exception Failure("Invalid URL
> "http:/localhost:2345/radio"!")
> Raised at file "pervasives.ml", line 22, characters 22-33
> 2011/02/07 03:10:57 [main:3] Shutdown started!
> 2011/02/07 03:10:57 [main:3] Waiting for threads to terminate...
>
> out(mksafe(
> fallback([
> input.http(id="h1","http://localhost:2345/radio"),
> single("say:fallback")
> ])
> ))
>
> h1.url http:/localhost:2345/radio
> h1.stop
> h1.start
>
> BR, Peter
>
> ------------------------------------------------------------------------------
> The modern datacenter depends on network connectivity to access resources
> and provide services. The best practices for maximizing a physical server's
> connectivity to a physical network are well understood - see how these
> rules translate into the virtual world?
> http://p.sf.net/sfu/oracle-sfdevnlfb
> _______________________________________________
> Savonet-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/savonet-users
>
------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network
management toolset available today. Delivers lowest initial
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users