Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

New Carmen Sandiego (GeoIP) Plugin

2»

Comments

  • Options
    businessdadbusinessdad Stealth contributor MVP

    @dericdd said:
    Well the discussion thread is a clear example of needing multiple queries at a time. If we have 20-30 comments and we query them one at a time it takes forever. So at the beginning of the discussion thread we tie into "discussionController_beforeDiscussionDisplay_Handler" hook to pre-query all the IPs from the discussion and comments. Then we use the "base_authorInfo_Handler" to display flag using pre-loaded geoip info.

    Of course, that would take ages if you do it every time the page loads.

    You made a good point that we should perhaps record the geoIP data while posting discussion/comment.

    This is the key: I assumed it was already done that way! Post -> Record IP -> Store data -> Show it next time. For this process, the standard library works perfectly, it's a single, once-off lookup.

  • Options
    dericdddericdd Montreal New

    @businessdad Why would i use the standalone binary now that I have all that data loading automatically into a MySQL table? Querying from a database is really not as tough as you make it out to be. Perhaps read that part of my code and you will see how easy it is.

  • Options
    businessdadbusinessdad Stealth contributor MVP

    I never said that you should change what you have done. I just pointed out that, based on how I envisioned a solution (which, as I explained, is different from your approach), the standalone binary would have been sufficient. Now that you have your code in place, it's a good idea to keep it.

    As for the "querying from the database" part, x00 called me "the SQL guy" for a reason. :) I've been a DBA for longer than I like to think, and I know the advantages and disadvantages of delegating some type of tasks to the database servers.

  • Options
    dericdddericdd Montreal New
    edited July 2015

    I understand... Been at this for 15+ years as well, lol. Remember portability and having it work on old data were main concerns.

  • Options
    businessdadbusinessdad Stealth contributor MVP

    @dericdd said:
    I understand... Been at this for 15+ years as well, lol. Remember portability and having it work on old data were main concerns.

    Very often they still are. So far, most of the projects I worked on required a solution that could work with any RDBMS. The funniest moment I had was to develop a brand new version of an application, from scratch and improve its performance (the original one took one second to show the details of a single customer. If a page contained 50 customers, it took almost a minute to render). The requirements were:

    1. 100% brand new code, written from scratch.
    2. 100% backward compatibility, out of the box.
    3. Within a month.

    This was 2009, they are still working on it. :lol:

  • Options
    dericdddericdd Montreal New

    Yeah I have had those issues, lol.

Sign In or Register to comment.