Coding skills help geeks get top tables
If you want a good table at a top restaurant in Silicon Valley you had better be a good programmer.
Coders in San Francisco are using custom written programs, or bots, to grab the good tables leaving other diners frustrated.
The bots watch restaurant websites to spot when tables become available then reserve them before humans can react.
The use of bots has made it almost impossible to get good tables at some of the most popular Valley eateries.Dinner mix
The growing use of bots was uncovered by programmer Diogo Monica who wrote a small programme to help him spot free tables at his favourite San Francisco restaurant State Bird Provisions (SBP).
The code emailed Mr Monica when other diners cancelled reservations or SBP released more tables. While the code helped him get a table now and then it quickly became ineffective. Close scrutiny of the SBP website revealed why.
"I found myself looking at it and noticed that as soon as reservations became available on the website (at 04:00), all the good times were immediately taken and were gone by 04:01," he wrote.
"It quickly became obvious that these were reservation bots at work," he said. This was making it all but impossible for anyone to get a table at SBP which is almost always fully booked, up to 60 days ahead.
In retaliation, Mr Monica wrote his own reservation bot and has started to regularly get a table at SBP.
He told the BBC that he knew of other programmers using bots to snap up tables at many restaurants in and around the Valley and added that there were also websites, such as Hacker Table, that let anyone automate the process of grabbing a table.
"It is a big problem in SF, yes, but only for the 'hip' restaurants," he told the BBC.
London was likely to have less of a problem with such bots, said Frances Dore, a spokeswoman for Caprice Holdings which runs restaurants such as The Ivy, Scott's and Le Caprice.
Ms Dore said regulars at its restaurants typically knew the maitre d' well enough to ensure that they got a table at very short notice. Few regulars would have to rely on software to secure a spot.
While online reservations were important to a lot of restaurants now, none would rely on them to entirely fill their tables, she said.
"No restaurant worth its salt will have a booking mechanism that is all online," she said. "It would be suicidal to do it all that way."
Better restaurants took seriously the mix of people in their establishment, she said, and on any night the clientele would be made up of regulars, reservations and walk-ins who were happy to wait for a table to become free.
"You try to manage the mix as much as possible rather than opening it up to complete strangers every night," she said.Bot wars
Mr Monica's blog post about his bot prompted many people to confess in emails to him and via Twitter that they had written their own code to do a similar job. Mr Monica has also published the core code for his reservations programme which may also prompt others to create their own version.
Security expert Martin Zetterlund from Sentor which helps websites defeat bots and related attack tools called scrapers said machines could be hard to beat.
"When competing for any type of scarce resource a bot will always be better than a human," he said. "It will never sleep and it reacts in a microsecond."
While bots could be easy to spot because they act far faster than people, many good bot writers worked hard to conceal who was snapping up tickets or stealing data, he said.
Mr Monica said he expected to see a reaction from other bot writers and he was prepared to up the stakes. The next step might be to locate his server closer to that running the SBP website to give his bots a micro-second advantage.
"As for tactics, think of this war like high-frequency trading," he said. "The people with the best algorithms/optimisations will have an edge over everyone else."