Valid Tube Names

304 views
Skip to first unread message

Gurunandan

unread,
Aug 26, 2009, 1:18:09 AM8/26/09
to beanstalk-talk
Is there a list of allowed characters for tube names? Whenever I use
an underscore, colon or a hyphen, I get a BAD FORMAT error.

Thanks

Andrew Gomilko

unread,
Aug 26, 2009, 8:38:42 AM8/26/09
to beansta...@googlegroups.com
From the protocol reference:
% Names, in this protocol, are ASCII strings. They may contain letters (A-Z and
% a-z), numerals (0-9), hyphen ("-"), plus ("+"), slash ("/"), semicolon (";"),
% dot ("."), dollar-sign ("$"), and parentheses ("(" and ")"), but they may not
% begin with a hyphen. They are terminated by white space (either a
space char or
% end of line). Each name must be at least one character long.

I tried tube name "a-b+1/;.c.$()/()", and it worked for me :

telnet 127.0.0.1 11300
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
use a-b+1/;.c.$()/()
USING a-b+1/;.c.$()/()

Gurunandan

unread,
Aug 26, 2009, 11:51:24 AM8/26/09
to beanstalk-talk
Thanks. Works as predicted.

On Aug 26, 5:38 pm, Andrew Gomilko <andrew.gomi...@gmail.com> wrote:
> From the protocol reference:
> %  Names, in this protocol, are ASCII strings. They may contain letters (A-Z and
> %  a-z), numerals (0-9), hyphen ("-"), plus ("+"), slash ("/"), semicolon (";"),
> %  dot ("."), dollar-sign ("$"), and parentheses ("(" and ")"), but they may not
> %  begin with a hyphen. They are terminated by white space (either a
> space char or
> %  end of line). Each name must be at least one character long.
>
> I tried tube name "a-b+1/;.c.$()/()", and it worked for me :
>
> telnet 127.0.0.1 11300
> Trying 127.0.0.1...
> Connected to localhost.
> Escape character is '^]'.
> use a-b+1/;.c.$()/()
> USING a-b+1/;.c.$()/()
>

sebest

unread,
Oct 13, 2009, 10:56:05 AM10/13/09
to beanstalk-talk
is there any reason not to accept _ ?

Keith Rarick

unread,
Oct 16, 2009, 4:45:06 AM10/16/09
to beansta...@googlegroups.com
On Tue, Oct 13, 2009 at 7:56 AM, sebest <sebastien...@gmail.com> wrote:
> is there any reason not to accept _ ?

The list of allowed characters is arbitrary. I figured it would be
good to keep a bunch reserved for future expansion. For example,
mailbox tubes will have a special prefix that is currently forbidden
in tube names.

Is there demand for allowing underscore in tube names?

kr

sebest

unread,
Oct 24, 2009, 8:08:22 AM10/24/09
to beanstalk-talk
I think it's quite common to consider _ as a valid character for
words.
I faced this issue because we use this character is our encoding
presets name eg: mp4_h264_aac.
Would be great if it could be added to valid caracters.
I understand that caracters like $*#|;! could be reserved as prefix
but '_' is really quite common.
I think that any valid character for variables and functions name
should be valid for tube names.

what do you think?

On 16 oct, 10:45, Keith Rarick <k...@xph.us> wrote:

Martyn Loughran

unread,
Oct 25, 2009, 11:59:23 AM10/25/09
to beansta...@googlegroups.com
I would agree with this. Being in ruby land, _'s are used all the time
and it would be nice to be able to use the same conventions for method
names and tube names.

Martyn

2009/10/24 sebest <sebastien...@gmail.com>:
--
Martyn Loughran

Lead Developer, Now+ Content Sharing

http://www.new-bamboo.co.uk

sebest

unread,
Oct 27, 2009, 11:17:16 AM10/27/09
to beanstalk-talk
The same in python land ;)

keith, could you add '_' to the valid caracters list?

thanx

On 25 oct, 16:59, Martyn Loughran <mar...@new-bamboo.co.uk> wrote:
> I would agree with this. Being in ruby land, _'s are used all the time
> and it would be nice to be able to use the same conventions for method
> names and tube names.
>
> Martyn
>
> 2009/10/24 sebest <sebastien.estie...@gmail.com>:

Keith Rarick

unread,
Oct 27, 2009, 7:46:59 PM10/27/09
to beansta...@googlegroups.com
On Tue, Oct 27, 2009 at 8:17 AM, sebest <sebastien...@gmail.com> wrote:
> The same in python land ;)
>
> keith, could you add '_' to the valid caracters list?

Yeah, it seems like everyone would be happy about that.

http://github.com/kr/beanstalkd/issues#issue/24

kr

Reply all
Reply to author
Forward
0 new messages