UA Matchers, without lookahead asserts.

General question about two step analysis, matchers and other general API questions
slawomir.pryczek
Posts: 3
Joined: Mon Dec 15, 2014 10:41 am

UA Matchers, without lookahead asserts.

Postby slawomir.pryczek » Mon Dec 15, 2014 11:45 am

Would it be possible for you to convert the regex code used by APIs to not include "?!" (lookahead assertion), as that would allow to reimplement the API in some languages that are not using PCRE but RE2 engine (rust, golang)?

Elliotfehr

Re: UA Matchers, without lookahead asserts.

Postby Elliotfehr » Mon Dec 15, 2014 12:53 pm

Slawomir,

I will have to discuss with the engineering team to see the possibility of this. However, it may not be possible. Are you able to let me know which API you are currently testing?

Thank you,

Elliot

oddbear
Posts: 1
Joined: Mon Dec 15, 2014 10:33 am

Re: UA Matchers, without lookahead asserts.

Postby oddbear » Mon Dec 15, 2014 2:50 pm

Hi Elliot, we're porting the PHP API to golang...

Would be much easier if we could just port the regexes 1:1

luca.passani
Posts: 65
Joined: Thu May 19, 2011 2:49 pm

Re: UA Matchers, without lookahead asserts.

Postby luca.passani » Mon Dec 15, 2014 6:28 pm

Limiting the expressiveness of the WURFL API across all the major platforms to make space for ports to less known programming languages does not sound like a very wise strategy for the API future. In other words, it is unlikely that those changes will ever happen in the official WURFL API

Thanks

slawomir.pryczek
Posts: 3
Joined: Mon Dec 15, 2014 10:41 am

Re: UA Matchers, without lookahead asserts.

Postby slawomir.pryczek » Tue Dec 16, 2014 2:10 pm

Hey Luca,
sorry for using multiple accounts, actually i have forgotten to logout from company account. We ported that already (to golang), it was finished yesterday and passed our tests... results compared with php in single threaded benchmarks are very nice (queries are 10x faster on average). These regexes were some issue but not so severe. Why does it matter? Because of cold cache problem. We can actually aggregate queries in go... while in php it isn't possible and slow performance adds to the problem...

Actually i was hoping that over time you'll be dropping usage of these complex regexes (by not creating new ones), for the platform to be more compatible with new web languages that are gaining mass currently, and are very fast because of simplified implementation of many things...

So if you'll be forced to pick between 2 solutions when adding UA's in the future (simple regex or lookahead) pls keep in mind that simplified regexes would be probably much easier for more people to deal with ;)


Who is online

Users browsing this forum: No registered users and 12 guests