чт, 13 июн. 2019 г. в 17:09, Ben Shillito <b...@51degrees.com>:
> In Travis the contrib version would be fine. But if you are testing > something which will later be deployed to production, I would suggest using > cloning the actual GitHub repo instead to be safe. > this is how I enable it on travis-ci https://github.com/chipitsine/haproxy/blob/master/.travis.yml#L8 (you may see USE_51DEGREES=1 51DEGREES_SRC=contrib/51d/src/pattern ) here's build https://travis-ci.com/chipitsine/haproxy/jobs/207722666#L306-L310 > > > In answer to your other question, yes, Pattern and Trie in HAProxy are > mutually exclusive. Which one you choose depends on your needs. Trie > provides the maximum performance, and Pattern takes slightly more time in > order to give you better metrics indicating the quality of match. Unless > you are handling upwards of a million requests per second, Pattern will be > enough. > > > > For more details on the differences between Pattern and Trie you can take > a look at our “how device detection works” page here: > https://51degrees.com/support/documentation/how-device-detection-works > ok, we'll test both not clear, why one might need "maximum performance" algorithm and ... "not so fast another algorithm" from my point of view, I would use the fastest algorithm all the time > > > And for the performance figures you can expect to see from both in > HAProxy, see our benchmarks page here: > https://51degrees.com/Support/Documentation/APIs/C-V32/Benchmarks > > > > If you need any more information, or help setting up, do let me know. > > > > Regards, > > > > Ben Shillito > Developer > > [image: 51Degrees] <https://51degrees.com/> > > O: +44 1183 287152 <callto:441183287152> > E: b...@51degrees.com <b...@51degrees.com?subject=Your%20Email> > @51Degrees <http://twitter.com/51Degreesmobi> > 51Degrees <https://www.linkedin.com/company/2171864> > > [image: Find out More] <https://51degrees.com/emailsig.aspx> > > > > *From:* Илья Шипицин [mailto:chipits...@gmail.com] > *Sent:* 13 June 2019 11:31 > *To:* Ben Shillito <b...@51degrees.com> > *Cc:* Willy Tarreau <w...@1wt.eu>; Christopher Faulet <cfau...@haproxy.com>; > HAProxy <haproxy@formilux.org> > *Subject:* Re: [PATCH] wurfl device detection build fixes and dummy > library > > > > > > > > чт, 13 июн. 2019 г. в 15:25, Ben Shillito <b...@51degrees.com>: > > Hi, > > > > The docs are correct. However, the 51Degrees source in the “contrib” > directory should only be used for testing changes to the HAProxy source. > The code contained in here does not contain any 51Degrees functionality, > just method stubs to enable compilation and testing. > > > > it's what I meant actually. > > I added "USE_51DEGREES=1 51DEGREES_SRC=contrib/51d/src/pattern" to > travis-ci job in order to see whether it will build or not. > > > > or do I need to clone github repo anyway ? > > > > > > another question is "what should be added to travis-ci?" I see > "src/pattern" and "src/trie" alternatives. Are they mutually exclusiive ? > So, should we test either of them ? > > > > > > You should use the 51Degrees source located at > https://github.com/51degrees/device-detection.git. Then point > 51DEGREES_SRC to either device-detection/src/pattern or > device-detection/src/trie. > > > > Perhaps if the documentation is not clear enough we should modify it, or > even add a warning to the compilation. > > > > Let me know if this gets you up and running. > > > > Regards, > > > > Ben Shillito > Developer > > [image: Image removed by sender. 51Degrees] <https://51degrees.com/> > > O: +44 1183 287152 <callto:441183287152> > E: b...@51degrees.com <b...@51degrees.com?subject=Your%20Email> > [image: Image removed by sender.] @51Degrees > <http://twitter.com/51Degreesmobi> > [image: Image removed by sender.] 51Degrees > <https://www.linkedin.com/company/2171864> > > [image: Image removed by sender. Find out More] > <https://51degrees.com/emailsig.aspx> > > > > *From:* Илья Шипицин [mailto:chipits...@gmail.com] > *Sent:* 13 June 2019 11:07 > *To:* Ben Shillito <b...@51degrees.com> > *Cc:* Willy Tarreau <w...@1wt.eu>; Christopher Faulet <cfau...@haproxy.com>; > HAProxy <haproxy@formilux.org> > *Subject:* Re: [PATCH] wurfl device detection build fixes and dummy > library > > > > Ben, > > > > what is the proper way of building 51degree ? > > > > I added "USE_51DEGREES=1 51DEGREES_SRC=contrib/51d/src/pattern" (as I seen > in documentation) > > > > gcc -Iinclude -Iebtree -Wall -Wextra -O2 -fno-strict-aliasing > -Wdeclaration-after-statement -fwrapv -Wno-unused-label -Wno-sign-compare > -Wno-unused-parameter -Wno-old-style-declaration -Wno-ignored-qualifiers > -Wno-clobbered -Wno-missing-field-initializers -Wtype-limits > -DUSE_EPOLL -DUSE_NETFILTER -DUSE_PCRE -DUSE_PCRE_JIT -DUSE_POLL > -DUSE_THREAD -DUSE_TPROXY -DUSE_LINUX_TPROXY -DUSE_LINUX_SPLICE > -DUSE_LIBCRYPT -DUSE_CRYPT_H -DUSE_GETADDRINFO -DUSE_OPENSSL -DUSE_LUA > -DUSE_FUTEX -DUSE_ACCEPT4 -DUSE_ZLIB -DUSE_CPU_AFFINITY -DUSE_TFO -DUSE_DL > -DUSE_RT -DUSE_DEVICEATLAS -DUSE_51DEGREES -DUSE_WURFL -DUSE_SYSTEMD > -DUSE_PRCTL -DUSE_THREAD_DUMP -I/home/travis/opt/include > -I/usr/include/lua5.3 -I/usr/include/lua5.3 -Icontrib/deviceatlas > -Icontrib/src/trie -Icontrib/wurfl -DUSE_PCRE -I/usr/include > -DCONFIG_HAPROXY_VERSION=\"2.0-dev7\" -DCONFIG_HAPROXY_DATE=\"2019/06/11\" -c > -o src/da.o src/da.c > > make: *** No rule to make target 'contrib/src/trie/../cityhash/city.o', > needed by 'haproxy'. Stop. > > make: *** Waiting for unfinished jobs.... > > is documentation correct ? or I should use some different way to build > > > > ср, 12 июн. 2019 г. в 22:01, Ben Shillito <b...@51degrees.com>: > > Hi Willy, > > Great, thanks for those changes, and good spot. > > I agree that this is a significant step forward, and having the entire > codebase testable in CI will certainly make everything that bit smoother. > > Thanks, > > Ben Shillito > Developer > O: +44 1183 287152 > E: b...@51degrees.com > T: @51Degrees > > -----Original Message----- > From: Willy Tarreau [mailto:w...@1wt.eu] > Sent: 12 June 2019 17:07 > To: Ben Shillito <b...@51degrees.com> > Cc: Christopher Faulet <cfau...@haproxy.com>; HAProxy < > haproxy@formilux.org> > Subject: Re: [PATCH] wurfl device detection build fixes and dummy library > > On Wed, Jun 12, 2019 at 02:49:37PM +0000, Ben Shillito wrote: > > While I was working on the HTX changes, I thought it was probably a > > good time to also implement the dummy library as I had my brain in > 'HAProxy mode'. > > Ah, excellent, thank you : > > $./haproxy -vv|grep -i 51d > Feature list : +EPOLL -KQUEUE -MY_EPOLL -MY_SPLICE +NETFILTER +PCRE > -PCRE_JIT -PCRE2 -PCRE2_JIT +POLL -PRIVATE_CACHE +THREAD -PTHREAD_PSHARED > -REGPARM -STATIC_PCRE -STATIC_PCRE2 +TPROXY +LINUX_TPROXY +LINUX_SPLICE > +LIBCRYPT +CRYPT_H -VSYSCALL -GETADDRINFO +OPENSSL +LUA +FUTEX +ACCEPT4 > -MY_ACCEPT4 -ZLIB +SLZ +CPU_AFFINITY -TFO +NS +DL +RT -DEVICEATLAS > -51DEGREES -WURFL -SYSTEMD -OBSOLETE_LINKER +PRCTL +THREAD_DUMP -EVPORTS > Built with 51Degrees support. > > :-) > > Ilya will likely be happy to see that we can now build 100% of our > codebase in the CI, this is a significant step forward! > > I performed very minor changes to your patches, for the first one I marked > it "BUG/MINOR" so that we backport it to 1.9 (since it's still broken > there) and for the second I fixed the doc where you accidently dropped > "51d" after "contrib/" in the build command :-) > > Thanks a lot for your responsiveness, > Willy > This email and any attachments are confidential and may also be > privileged. If you are not the named recipient, please notify the sender > immediately and do not disclose, use, store or copy the information > contained herein. This is an email from 51Degrees.mobi Limited, 5 Charlotte > Close, Reading. RG47BY. T: +44 118 328 7152; E: i...@51degrees.com; > 51Degrees.mobi Limited t/as 51Degrees. > > This email and any attachments are confidential and may also be > privileged. If you are not the named recipient, please notify the sender > immediately and do not disclose, use, store or copy the information > contained herein. This is an email from 51Degrees.mobi Limited, 5 Charlotte > Close, Reading. RG47BY. T: +44 118 328 7152; E: i...@51degrees.com; > 51Degrees.mobi Limited t/as 51Degrees. > > This email and any attachments are confidential and may also be > privileged. If you are not the named recipient, please notify the sender > immediately and do not disclose, use, store or copy the information > contained herein. This is an email from 51Degrees.mobi Limited, 5 Charlotte > Close, Reading. RG47BY. T: +44 118 328 7152; E: i...@51degrees.com; > 51Degrees.mobi Limited t/as 51Degrees. >