Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Introduction

Accela APO records must be kept synchronized with EAS addresses in near real time. Regardless of how we build this it is convenient to think of this as a sort of custom replication service. We've already done this successfully with DBIs AVS as described here and here. That implementation has been used in production since February 15 2012. 

Implementation

As of November 4, we have a working Accela implementation which uses the ArcGIS rest API. We use addFeatures for inserts, and we use query and updateFeatures for updates. You can see the code here and it should be running now on our DEV instance. You can also get some sense of how this works by examining the insert and update log file output.

After some discussion, Mike and Paul have decided to try the simplest thing that could possibly work. In this case, this means using a flattened representation of EAS addresses. This should allow us to better understand Accela and how addresses work in Accela. We expect that we'll make some changes as we learn.

Next Steps

The issue list for this feature is here.

...

  •  design review
  •  code review
  •  discuss strategy for production cut-over from AVS to Accela (see this line) (currently hard coding timestamp)

Anchor
insert_example
insert_example
Log File Output (Insert)

Code Block
2012-11-04 20:32:02,494 - XMIT_ACCELA - INFO - posting JSON
2012-11-04 20:32:02,494 - XMIT_ACCELA - INFO - path:/ArcGIS/rest/services/EAS_Accela_Test/FeatureServer/2/addFeatures
2012-11-04 20:32:02,494 - XMIT_ACCELA - INFO - connectionString :10.19.51.238:80
2012-11-04 20:32:02,494 - XMIT_ACCELA - INFO - json features: [
    {
        "GEOMETRY": {
            "Y": 2106429.8391464953,
            "X": 6000111.418789571
        },
        "attributes": {
            "EAS_UNIT_ADDRESS_ID": 725576,
            "BASE_ADDRESS_NUM": 10000,
            "OBJECTID": null,
            "UNIT_ADDRESS": null,
            "ADDRESS_X_PARCEL_CREATE_TMS": 1352061116477.258,
            "STREET_NAME": "ROOSEVELT",
            "UNIT_ADDRESS_CREATE_TMS": 1352061116477.258,
            "ADDRESS_X_PARCEL_RETIRE_TMS": null,
            "LONGITUDE": -122.44280195814189,
            "PARCEL_BLOCK_LOT": "2618029",
            "UNIT_ADDRESS_BASE_FLG": true,
            "STREET_CNN": 11145000,
            "BASE_ADDRESS_RETIRE_TMS": null,
            "STREET_TYPE": "WAY",
            "EAS_ADDRESS_X_PARCEL_ID": 563580,
            "BASE_ADDRESS_SUFFIX": null,
            "LATITUDE": 37.763860355079515,
            "UNIT_ADDRESS_RETIRE_TMS": null,
            "EAS_ADDRESS_BASE_ID": 483702,
            "BASE_ADDRESS_CREATE_TMS": 1352044837254.029,
            "ZIPCODE": "94114"
        }
    }
]
2012-11-04 20:32:02,790 - XMIT_ACCELA - INFO - response meta data: status: 200
reason: OK
version: 11
headers
        date: Mon, 05 Nov 2012 04:30:51 GMT
        content-length: 121
        x-powered-by: ASP.NET
        content-type: text/plain;charset=utf-8
        server: Microsoft-IIS/7.5
2012-11-04 20:32:02,790 - XMIT_ACCELA - INFO - response content: {^M
  "addResults" : [^M
    {^M
      "objectId" : 273623, ^M
      "globalId" : null, ^M
      "success" : true^M
    }^M
  ]}

 

Anchor
update_example
update_example
Log File Output (Update/Retire)

Code Block
2012-11-04 21:21:27,184 - XMIT_ACCELA - INFO - connectionString: 10.19.51.238:80
2012-11-04 21:21:27,184 - XMIT_ACCELA - INFO - urlString: /ArcGIS/rest/services/EAS_Accela_Test/FeatureServer/2/query?where=eas_address_x_parcel_id=563580&returnIdsOnly=true&f=pjson
2012-11-04 21:21:28,726 - XMIT_ACCELA - INFO - posting JSON
2012-11-04 21:21:28,726 - XMIT_ACCELA - INFO - path:/ArcGIS/rest/services/EAS_Accela_Test/FeatureServer/2/updateFeatures
2012-11-04 21:21:28,726 - XMIT_ACCELA - INFO - connectionString :10.19.51.238:80
2012-11-04 21:21:28,727 - XMIT_ACCELA - INFO - json features: [
    {
        "GEOMETRY": {
            "Y": 2106429.8391464953,
            "X": 6000111.418789571
        },
        "attributes": {
            "EAS_UNIT_ADDRESS_ID": 725576,
            "BASE_ADDRESS_NUM": 10000,
            "OBJECTID": 273623,
            "UNIT_ADDRESS": null,
            "ADDRESS_X_PARCEL_CREATE_TMS": 1352061116477.258,
            "STREET_NAME": "ROOSEVELT",
            "UNIT_ADDRESS_CREATE_TMS": 1352061116477.258,
            "ADDRESS_X_PARCEL_RETIRE_TMS": 1352064082020.226,
            "LONGITUDE": -122.44280195814189,
            "PARCEL_BLOCK_LOT": "2618029",
            "UNIT_ADDRESS_BASE_FLG": true,
            "STREET_CNN": 11145000,
            "BASE_ADDRESS_RETIRE_TMS": 1352064082020.226,
            "STREET_TYPE": "WAY",
            "EAS_ADDRESS_X_PARCEL_ID": 563580,
            "BASE_ADDRESS_SUFFIX": null,
            "LATITUDE": 37.763860355079515,
            "UNIT_ADDRESS_RETIRE_TMS": 1352064082020.226,
            "EAS_ADDRESS_BASE_ID": 483702,
            "BASE_ADDRESS_CREATE_TMS": 1352044837254.029,
            "ZIPCODE": "94114"
        }
    }
]
2012-11-04 21:21:28,922 - XMIT_ACCELA - INFO - response meta data: status: 200
reason: OK
version: 11
headers
        date: Mon, 05 Nov 2012 05:20:17 GMT
        content-length: 124
        x-powered-by: ASP.NET
        content-type: text/plain;charset=utf-8
        server: Microsoft-IIS/7.5
2012-11-04 21:21:28,922 - XMIT_ACCELA - INFO - response content: {^M
  "updateResults" : [^M
    {^M
      "objectId" : 273623, ^M
      "globalId" : null, ^M
      "success" : true^M
    }^M