devicemap-dev mailing list archives

Hello,
In the context of discussion "how do we handle HTTP clients", I would like
to vote for treating them as bots. Further, I want to propose adding a thin
layer above DeviceMapClient.classify() to make a shortcut for handling of
the bots as follows.
private final static Map<String, String> botAttributes =
Collections.singletonMap("is_bot", "true");
public Map<String, String> classify(String userAgent) {
if (isBot(userAgent)) return botAttributes;
}
The motivation for this change is as follows:
- Almost all of the attributes are making no sense for a bot and we are
losing time to match it against the whole DDR.
- Bot database will be able to evolve independently.
- We can come up with a single compiled j.u.regex.Pattern to check bots.
(I am pretty sure Reza knows a lot better performing approaches, but maybe
for a future release.)
If the development team is ok with that, I want to implement this feature.
Best.