Battler45 / SierraMigrationToGitHub

Migration from unfuddle to GitHub
0 stars 0 forks source link

Convert Region 25 (MIBOR / Indy) to new updater #203

Open Battler45 opened 4 years ago

Battler45 commented 4 years ago

George,

The first project on which you'll be working will be to convert an existing MLS data feed to the new updater system.

Vihar will be able to provide you with the technical details for installing GitHub and downloading a local copy of the current code base.

Vihar, will you also please provide George with whatever server and / or database access he needs for this initial project? Please share with him any necessary logins and create any new users as necessary. Also, I think that converting region 25 will be a good place to start because it shares the same MLS data provider (Marketlinx) as the one you have already converted (SoCal MLS). You can find my existing code in:

C:\Inetpub\mls4.sierrainteractivemls.com\admin\mibor

on DEDQ61

The login credentials to the RETS server are:

  • UserID: 31041rets
  • Password: BENJ1001

  • UserAgent: sierrainteract

  • Password: h1ghplateau

RETS URL: http://inr.rets.interealty.com/Login.asmx/Login

As you'll see when you examine my existing code, I was using the sysid name for the database fields rather than the long names for the fields (which were being used for SoCal MLS). I did this because I had a lot of difficulty with the RETS Connector software that I was using to download the daily data files. To help translate between the two, I've attached a spreadsheet provided to me by MIBOR (which stands for Metropolitan Indianapolis Board of Realtors) that cross-references the long field names with their numeric IDs.

Please let me know if you have any questions.

Thanks.

Posted by Peskoe Ben(unfuddle username: bpeskoe)

Battler45 commented 4 years ago

George,

I've set you up so that you should be receiving updates on this task / thread -- please confirm. This thread contains the initial details you will need to get started on your first task, and Vihar can provide you with the background, technical details, etc. that you will need to get started.

Please let me know if you have any questions.

Thanks. Posted by Peskoe Ben(unfuddle username: bpeskoe)

Battler45 commented 4 years ago

George,

Forgot to add - you can check the database schema by remoting to the following machine:

IP: 75.103.119.195

User Name: vshah

Password: ViharShah$123

Pls note that this is development DB, and, has almost identical schema to the live DB. There are total five DBs on this server: sierrainteractive-1 to 4, and sierrainteractive-updater. Pls note that currently sierrainteractive-3 is being used by the live sites so pls make sure that you don't change anything in that database. Ideally, you would only be needing to refer to the sierrainteractive-4 and sierrainteractive-updater DBs.

Pls let me know in case of any issues.

Thanks. Posted by Shah Vihar(unfuddle username: vshah)

Battler45 commented 4 years ago

George,

To further clarify, the existing updater for mibor code will probably be confusing to you. It references the sys IDs of each database field, rather than the long field names, which is what you will be using when you query the RETS server using libRETS (I believe). You can use the T5 Field Info RETS Updated spreadsheet attached to the first comment in this thread to help you see which sys IDs match to which long field names.

In bringing any new data feed in line with the new updater system, the most difficult part will always be to determine how the fields from the host RETS database should be mapped into the fields of our own database.

In certain cases, such as when dealing with City, State, and Zip Code, these are straightforward.

However, in dealing with other types of listing data, such as interior and exterior features, lot features, etc., this can be more complicated. So, in working this out, referring to the existing SoCal MLS updater mappings (region 10) may also be quite helpful for you, because that region will (I believe) contain many of the same field names and will share many similar mappings.

Please let me know if you have any questions.

Thanks. Posted by Peskoe Ben(unfuddle username: bpeskoe)

Battler45 commented 4 years ago

George,

In implementing new updater system for region-25, you might want to refer to the existing updater system implementation (especially for field mappings). I've attached a zip file containing the source-code for the same. It contains the following folders:

mibor - contains code specific to updater-system for region 25. The "mls_autoupdates.asp" file contains the entry-point; that is, the programming in this file will initiate the updates for region-25. It will call appropriate functions like UpdateListings, RemoveOldListings, UpdatePhotos etc... for performing various update steps. Some of these functions could be defined in the mls_functions.asp file present under this folder. And, rest of the functions would be defined in the common code.

res/includes - contains code common to all updater-systems. The mls_functions.asp file for example defines InsertUpdateMLSListing function, which is called to add/update listing records.


I'm not sure if you had a chance to work with libRETS library. If you haven't, I would recommend first creating a sample project that uses the libRETS library. Pls use the above RETS credentials for connecting to the MIBOR RETS server. Ideally, you should first download the metadata from this server. That would help you in mapping listing fields.

Pls note that the MIBOR region data is stored in the sierrainteractive-1 database. You can copy the latest back up of the database (development) from the following FTP location:

Host: 75.103.116.57 User-name: george_dev_db Password: GeorgeM$123

Since the development DB is has restricted access, pls restore the above back-up on your local DB and configure the updater code to work with your local DB.

Pls let me know if you have any queries.

Thanks.

Posted by Shah Vihar(unfuddle username: vshah)

Battler45 commented 4 years ago

George,

Yes, the specified RETS servers are live. I think it should be ok to connect to those servers for testing purpose.

I understand that you want to test the new updater system - the SoCal updater system to be specific. To do so, you can run the WindowsServiceTest console application. The UpdateProcessor.cs file in this project contains the entry-point function, PerformUpdatesForRegion. This function will execute appropriate updater steps (depending on the steps supported for a region - as defined in the Updater_MLSRegionUpdateSteps table). If you want to test a specific step, pls comment out appropriate code in the PerformUpdatesForRegion function.

Also, you would need to change certain configuration parameters defined in the app.config file. Some of these parameters are:

Pls let me know if you need additional info.

Thanks.

Posted by Shah Vihar(unfuddle username: vshah)

Battler45 commented 4 years ago

Hi Vihar, Could you please explain more detailed how I can test the application? As I understand the specified RETS servers are live not "sandbox"? Is it ok to connect to servers for testing purposes? Thanks Posted by Molchanov George(unfuddle username: george)

Battler45 commented 4 years ago

George,

Yes, it's definitely okay to connect to live servers for testing purposes. Since the data feed only comes in one direction (from them to us), it's fine to query during the testing process.

Thanks Posted by Peskoe Ben(unfuddle username: bpeskoe)

Battler45 commented 4 years ago

Status of task: I'm able to get response from RETS server and going to parse it.

Ben, I have question about query for request: which date should be used in query to select only outstanding records? For example table "RES" has several date fields - "List Date", "Entry Date" and "Change Date". Do you know which is correct? Posted by Molchanov George(unfuddle username: george)

Battler45 commented 4 years ago

Vihar, Thanks for your help. I will check this listing. Regarding composite fields for Residental Property. Now I'm able to fill next composite fields with same headers as for SoCal:

For other composite fields (FeaturesCommunity, FeaturesCondo, FeaturesConstruction, FeaturesDocuments, FeaturesExterior, FeaturesFencing, FeaturesHOA, FeaturesParking, FeaturesRoof, FeaturesUtilities) I can not find MIBOR fields which could be assigned to SoCal headers. Probably some composite fields can be filled with MIBOR data with other headers (for example MIBOR contains "Garage description" field which can be placed into composite field FeaturesParking). But I'm not sure is it legal or not and who should make such decisions. Posted by Molchanov George(unfuddle username: george)

Battler45 commented 4 years ago

Ben,

I've modified the connection-string on the dev. version of search-tools to connect to dev. DB. The dev. hometoindy site now pulls data from the dev. DB.

Pls note that the contents are still pulled from the live DB as Vihang is working on setting up content-pages for new sites. He is however not able to work with property-search pages. Could you pls let me know if synchronizing the Sites table will fix such issues? Or, it would be good idea to restore the latest sierrainteractive-1 live DB on the dev. DB server.

As for data comparison - the live and dev. DB are accessible from the DEDN173 server so it can be used to perform side-by-side comparisons. I've set up a new user on this machine. When George has completed local testing and is ready to test the new updater on the dev. DB, I'll provide him the details for the same (and discuss possible approach to test the new updater). Pls let me know if this sounds good.

Thanks.

Posted by Shah Vihar(unfuddle username: vshah)

Battler45 commented 4 years ago

Vihar,

I think it is fine idea to host images on 3rd-party service.

Also I want to notice that MIBOR updater is not completed as I didn't test open-houses updating.

Thanks Posted by Molchanov George(unfuddle username: george)

Battler45 commented 4 years ago

Ben,

The only other open point is re. import of Open House details. As George had mentioned earlier, it looks like our MIBOR RETS account doesn't have access to open-house details. Pls let me know if the open-house step can be ignored for MIBOR region.

Thanks. Posted by Shah Vihar(unfuddle username: vshah)

Battler45 commented 4 years ago

Vihar,

Re: #61 - From what I can tell, pricing is fairly similar. Unfortunately, I don't have access to the type of data we would need to accurately assess the monthly costs, but even if it turned out to be double your estimate, that would be do-able for us and worth it if it allows us to provide customers with images that always serve quickly, and reduces the load on our dedicated servers (and thus reduces the need for additional servers).

I'm running a file tree right now which will tell us exactly the total size of the MLS folder on DEDQ61 -- I believe it is 50-60 GB currently, so I think we are still under 100GB total for all photos.

By the way, 30GB does seem like a lot for the SoCal photos -- the overall size of the storage on the server for this region should remain fairly consistent over time, shouldn't it (aside from the increase in the size of the large photos that we introduced recently)? Can you double-check to make sure that when a listing is deleted from the server, all associated photos are also getting deleted?

(Also, can you please restart DEDN173 overnight tonight -- it needs to be restarted following updates.)

Thanks Posted by Peskoe Ben(unfuddle username: bpeskoe)

Battler45 commented 4 years ago

George,

Sorry for the delayed response -- yes, you are correct that for the initial data load, we will need to import all photos new from the server (this process will likely take a couple of days).

I have been talking with Vihar for the past couple of days, and we are going to change the max dimensions of the large size of the imported photos. Up to now, we have allowed a maximum width or height of 550px, and going forward we are going to allow a max width or height of 640px. Vihar may have already made this change in the code, but please confirm with him before you begin the photo download.

Thanks.

Ben Posted by Peskoe Ben(unfuddle username: bpeskoe)

Battler45 commented 4 years ago

Vihar, What do you mean by MIBOR meta-data? I'm using T5_field_info_RETS__Updated01-17-09.xls document attached in first post. Or you want to see how I perform this mapping (so I can give my code of "Parse.." function). Thanks Posted by Molchanov George(unfuddle username: george)

Battler45 commented 4 years ago

Ben,

Vihang has restored the most recent sierrainteractive-1 DB on dev. DB server. Pls note that he has also updated the dev. front-end sites to point to dev DB for displaying content-pages.

Thanks.

Posted by Shah Vihar(unfuddle username: vshah)

Battler45 commented 4 years ago

Ben, It is very helpful! Thank you!

Posted by Molchanov George(unfuddle username: george)

Battler45 commented 4 years ago

RETS meta-data Posted by Molchanov George(unfuddle username: george)

Battler45 commented 4 years ago

George,

Sorry for the delay getting back to you on this -- I am working on it now and will have it for you by the end of the evening (my time). In the meantime, if you have more time to work on the project, perhaps you could begin looking into the photo downloads for this region? That (hopefully) should be very similar to the way it is currently being done for SoCal MLS / Region 10.

Thanks. Posted by Peskoe Ben(unfuddle username: bpeskoe)

Battler45 commented 4 years ago

Ben,

Developing a small application for data comparison sounds good. The only concern I've is that in using this application, the old and new updater would have to be synchronized. That is, the tests would have to be carried out only after the old updater has run; otherwise the comparison application won't be much of a use. Could you pls confirm the time when the MIBOR updates are completed (through the old updater)? George can then schedule the new updaters to run around that time, and, then can use comparison application to verify correctness of data. Pls let me know your thoughts on this.

Thanks. Posted by Shah Vihar(unfuddle username: vshah)

Battler45 commented 4 years ago

Vihar,

Thank you. I able to connect to 208.106.250.174 now.

Thanks Posted by Molchanov George(unfuddle username: george)

Battler45 commented 4 years ago

Vihar, I got RETS meta-data with using of libRETS code samples. Attached are archive with meta-data in text and xml format. In my opinion spreadsheet T5field_info_RETS_Updated01-17-09.xls looks more complete. For example ResidentialProperty object: Field #3: in spreadsheet it has name "Acres", in meta-data isn't any standard name for this field ([] - it means standard name is missed). I thought I can use this value to fill field Acreage of Property object. Is my assumption wrong? Posted by Molchanov George(unfuddle username: george)

Battler45 commented 4 years ago

George & Vihar,

I do think it might be worthwhile to develop a small application which would compare data rows between dev and live DBs for the same listing to make sure that the data is the same -- mainly because we do have a number of additional regions to convert from the old updater to the new updater, and so this application would be used for all of those regions and would therefore save us quite a bit of time in testing.

Unless, Vihar, you have already written some scripts that will do this type of comparison or have something else in mind?

Thanks. Posted by Peskoe Ben(unfuddle username: bpeskoe)

Battler45 commented 4 years ago

Ben, Vihar,

I tested photos downloading ang calculation of geocodes on development server. It works.

Thanks Posted by Molchanov George(unfuddle username: george)

Battler45 commented 4 years ago

George,

Ben would be able to provide more details about exact mappings for the above mentioned fields.

Ben, could you pls check the mapping file attached in comment-17 and let us know the mappings for the remaining Features fields?

Thanks. Posted by Shah Vihar(unfuddle username: vshah)

Battler45 commented 4 years ago

George,

1 - Yes, it's fine to geocode listings using our own functionality -- that's what I am also doing in the current updater.

2 - Yes, I agree, I believe that is the case. I will check tomorrow with MIBOR staff to confirm, but for now, please proceed as if that data will not be available.

Thanks. Posted by Peskoe Ben(unfuddle username: bpeskoe)

Battler45 commented 4 years ago

Ben, Vihar,

I've completed latest minor changes (Driving Longitude / Driving Latitude, ListTypeDescrip).

Also I've added IndianapolisListingsPurger class to delete records but there is again known issue - User does not have access to Resource named DeletedListing.... Resource name is correct (according meta data), but it doesn't work. And we have not other ways to delete records as we getting only active - we can not get records with other statuses.

What we will do?

Thanks Posted by Molchanov George(unfuddle username: george)

Battler45 commented 4 years ago

Ben, Vihar I have some questions regarding common rules of fields' mapping. 1) What should I do if I can not find an appropriate source field for some field of object Property (for example SoCal model has data for ListAgentLastName - p.AgentLastName = resultSet.GetString("ListAgentLastName"), - but I can not find such field in MIBOR's fields). 2) On the other hand there are a lot of MIBOR fields which are not mapped with object Property. 3) Special case is the composite fields (like FeaturesExterior). Such fields in SoCal implementation have fixed headers for specific source fields (for example in composite field FeaturesExterior can be added field PatioFeatures with header Patio). Are these headers fixed or for MIBOR field FeaturesExterior can contain other data with other headers? And if yes - do you have some ideas which MIBOR fields can be included in composite fields of object Property? Posted by Molchanov George(unfuddle username: george)

Battler45 commented 4 years ago

George,

You can find the example for working with RETS meta-data here: http://www.crt.realtors.org/projects/rets/librets/documentation/devguide/. The 3rd point, "Working with metadata" provides some examples of downloading RETS server metadata. This metadata can then be used as reference for mapping MIBOR fields to our database fields.

Thanks. Posted by Shah Vihar(unfuddle username: vshah)

Battler45 commented 4 years ago

Ben,

RE: #66: I've restarted the DEDN173 server but I'm now unable to remote into it. The server appears to have restarted correctly as I could access the CAA website. Could you pls look into the same?

As for the size of SoCal photos, it is definitely lot more when compared to other regions. I verified that all these photos are associated with active listings. Moreover, the ratio of photos added to photos removed is more than 2 majority of the times so this size in all likelihood will increase.

Thanks.

Posted by Shah Vihar(unfuddle username: vshah)

Battler45 commented 4 years ago

Ben, Vihar,

I have some questions regarding outstanding issues (geocodes and open houses details).

  1. Geocodes. It looks like old updater doesn't get latitude and longtitude from MIBOR response. Isn't? I found in meta data some fields which probably can be used for this - DrivingLatitude and DrivingLongitude but I'm not sure. Anyway in my tests all MIBOR records don't return values for these fields. Also I've added functionality of geocode processing (similar to SoCal functionality) and it works.

  2. Open-house updating. Can it be that MIBOR's user doesn't have some rights to get open house data? I've tried to get such data and I received error "User does not have access to Resource named OpenHouse".

Thanks Posted by Molchanov George(unfuddle username: george)

Battler45 commented 4 years ago

Vihar, George,

RE: #54

1 - Yes, please do not use Driving Longitude / Driving Latitude values from the MIBOR feed. Instead, use our Geocoding scripts which will geocode listings directly based on property address.

2 - For ListType 1 (Residential) the field is 511: Res/Cnd for ListTypeDescrip. For ListType 4 (Land) the field is 343: Type for ListTypeDescrip. For ListType 5 (Multi-Faimily), the field is 135: List Type for ListTypeDescrip.

3 - Vihar, I believe you are correct and that our access is restricted to only be able to retrieve Active / Pending listings. However, it would still be nice to be able to track listing status if we can using the Status field in the MLS table. (In our front-end application, we may at some point want to display status to end-users.)

4 - Regarding usage of

, that was an attempt on my part to improve the way the listings are displayed on the front end. However, it was a failed experiment, and so it's fine to format the Features* values in the same way that they are formatted in the SoCal MLS data feed. In fact, it would be preferable to keep it the same as the SoCal format for consistency's sake.

5 - I'm not sure about this. In some cases, an agent my replace existing photos with a new set of photos, but the overall number of photos may not have changed. In such cases, it would definitely be necessary to delete all existing photos and re-download the full set to insure that all new photos are properly received.

Please let me know if you have any questions

Thanks Posted by Peskoe Ben(unfuddle username: bpeskoe)

Battler45 commented 4 years ago

George,

I've made changes to the image-processing code to generate large images in 640x640 dimensions. I've pushed this change to the master branch. Can you pls fetch the latest code and update your local code?

This just for your info - I've created a new branch, production in the updater git repository. This branch will contain code that is currently used for production updater service. That is, it won't contain any development specific code. I'll maintain this branch to make sure that development specific changes are not pushed to the production service. Pls continue pushing your changes to the master branch (which would contain all development specific changes like you are making for implementing MIBOR updater).

As for photo-download/process testing - I would suggest you to first test it on your local machine (if you haven't already). For this, pls set the LastUpdateTimeStamp for photo-step (16) to current date. This will make sure that only most recent photos are downloaded/processed. Once you've verified the changes, pls test the MIBOR updater on the development server. If everything is working as expected, we can then download all records / photos (by setting the LastUpdateTimeStamp value to null for all steps). Pls let me know your thoughts.

Thanks.

Posted by Shah Vihar(unfuddle username: vshah)

Battler45 commented 4 years ago

Vihar / George:

RE: #52

Unfortunately, the performance of the existing photos server (DEDQ61) is not at an acceptable level, and so we will need to move all of those photos, either to the new cloud server (where the SoCal photos are) or to a 3rd party service like Amazon or Azure.

The DEDQ61 server is a very old server with an under-powered hard drive, and so at peak times the photos are very slow to load. My goal is that, once we are able to covnert all existing regions over to the new updater system, we will be able to retire the DEDQ61 server.

I do agree that the best long-term approach would be to host the photos on a 3rd-party service, either Amazon or Azure. Do you have any preference toward one or the other. I am really not sure of the technical details of using such a service in combination with our service, and I'm also not sure how to determine the cost. Is that something you could help me understand?

Perhaps we could use MIBOR as a test case for moving photos over to one of these services, with the goal of eventually moving all photos over.

The one issue I have had thus far which has made it difficult to use a CDN is photo expiration. Currently, each listing has a set of photos which gets distributed out via a CDN powered by Level 3. However, because agents change photos for listings on a regular basis, and these updated photos often have the same filename as the original, I have not found a good way to "expire" the old photos when they have been updated, other than to set the expire (TTL) value to 1 day for all photos.

This means that all photos are re-loaded into the CDN once per day no matter what, and creates a much heavier load on the server than there needs to be.

Do you have any thoughts on how this might be improved? My only idea is that when new (replacement) photos are received for an existing listing, they should always be given a new filename. This would eliminate the above problem and ensure that the newer photos are always displayed for every listing, and it would also allow us to cache all photos on the CDN for a much longer time (30 days).

If we do implement something like the above, we just need to make sure that the proper order for the photos is preserved using the OrderID field in the MLSPhotos table.

I agree that this is a pressing issue and so if you could continue to split your time between this topic and the clustering issues, that would be great.

Thanks. Posted by Peskoe Ben(unfuddle username: bpeskoe)

Battler45 commented 4 years ago

George,

We needed to change the data-types of Latitude / Longitude columns (Geocodes table) to numeric(12,9). This led to change in a couple of updater specific store-procedures, and, hence, change in the new updater system. I've made these changes, and, have pushed the same to the updater repository. Pls fetch the latest changes and update your local copy.

Pls note that you'll also need to make a minor change in the way latitude / longitude values are set in the MIBOR import. Until now these values were set as string, but, now they would need to be set as Double. Could you pls update MIBOR import code to set latitude / longitude values as double. You can use the ToDouble string extension I've used in SoCal importer. Pls let me know if you have any queries.

Pls note that I've applied these changes to the dev. sierrainteractive-1 DB. I've attached an SQL script that you can run on your local DB to apply data-type specific changes.

Thanks. Posted by Shah Vihar(unfuddle username: vshah)

Battler45 commented 4 years ago

Ben,

RE: #65: Removal of listings in SoCal is performed in two-steps:

1 -- soft-removals - whenever a listing's status is changed, that change is recorded in the "History" resource. The SoCal removal step queries for all listings whose status has been changed to one of the inactive statuses (i.e. Withdrawn, Expired, Closed etc...).

2 -- hard-removals - in certain cases, listing records are physically removed from the RETS database. Details of such listings are stored in the "Deletions" resource. The SoCal removal step queries for all listings, which might have been removed from the RETS server.

Any listing found through one of the above steps is then removed from the sierrainteractive database (along with its associated records).

I verified that the MIBOR RETS meta-data does have corresponding History (PAR) and DeletedListing resources but we don't have access to these resources. Looks like our user-account may have very limited access in that several resources like OpenHouse, Media, History, DeletedListing are not accessible. Can you pls confirm with MIBOR representative about the same?

Thanks.

Posted by Shah Vihar(unfuddle username: vshah)

Battler45 commented 4 years ago

Vihar & George,

I just realized that we will, of course, need to re-load all photos because the photos will all be located on a different server, and the folder structure used by the new updater is different than that of the current updater.

Vihar, the problem with this is that we can't just delete the existing region 25 listings from the database, because all of our lead records reference the IDs of these listings in the database. Really, all we need to do is update the MLSPhotos records for each listing -- everything else can stay the same, right?

Do you have any thoughts on what might be the best way to make that transition?

Thanks Posted by Peskoe Ben(unfuddle username: bpeskoe)

Battler45 commented 4 years ago

George,

I tested the latest changes. The ListTypeDescrip value is correctly populated now but the ListType value doesn't reflect the type of listing. It should be 1 for residential, 4 for land / lots and 5 for multi-family. Currently, it set to 1 for all types of listings. Pls make necessary change.

Also, I think we may need to change the way SourceUniqueID field's value is set. Currently the ListingKey (150) value is assigned to this field. I think this value may not be unique in the MIBOR RETS server. Can you pls look into assigning "sysid" value to the SoruceUniqueID field? The SourceUniqueID field should store the unique value, which can be used to identify record in the MIBOR database (kind of primary-key). This value is used mainly in checking physically removed listings (In the PurgeListing step (18)).

Thanks. Posted by Shah Vihar(unfuddle username: vshah)

Battler45 commented 4 years ago

Vihar, I'm testing now local. So there is no my data in remote DBs. Thanks Posted by Molchanov George(unfuddle username: george)

Battler45 commented 4 years ago

Ben,

Assuming we will be continuing with the current setup of hosting images on the Crystaltech cloud server, there are a couple of approaches for moving MIBOR images:

1 -- to re-download all photos through the new updater system. This will require minimum change in that we would need to update the photo-url generation to take into account active photo-server value (as described in comment #52). This will however be fairly time-consuming process as all photos would have to be re-downloaded from the RETS server and re-processed.

2 -- to write a small application, which will copy processed images from the old photo-server and update the database records with new path value. This should be faster compared to the 1st approach in that we'll be using FTP interface for downloading photos from another Crystaltech machine.

Alternatively, all images can be copied manually from the old server to the Crystaltech cloud server, and, then the new application should be run to update db records. This processing would be fairly quick in that the processing would be done locally. However, the time to FTP all images to new server might be high assuming large number of images would need to be transferred.

In either case, the new application will be useful in moving photos of other regions as and when we convert them to new updater system.

My thought is that regardless of the approach followed, we should add a new field, PhotoServer (comment #52), and update the photo-url generation logic. This will ensure that photos are continued to be served correctly until all photos have been moved to the Crystaltech cloud server.

Pls let me know your thoughts / suggestions.

Thanks.

Posted by Shah Vihar(unfuddle username: vshah)

Battler45 commented 4 years ago

Ben,

I believe George hasn't yet run the MIBOR updater on the dev DB so it should be fine. I'll confirm with George and restore the back up based on his response.

George - can you pls confirm if it would be alright to go ahead with the restore of sierrainteractive-1 DB?

Thanks.

Posted by Shah Vihar(unfuddle username: vshah)

Battler45 commented 4 years ago

Vihar,

I completed local testing. As I understand I have to add the appropriate records into table Updater_MLSRegionUpdateSteps. What should be set for field [LastUpdateTimeStamp], i.e. do we need to receive all records from REST server or not? And also I'm ready to perform testing on dev DB as you wrote in note 25.

Thanks Posted by Molchanov George(unfuddle username: george)

Battler45 commented 4 years ago

George / Vihar,

RE: #53

You are correct -- Open Houses are not available for MIBOR and so can be excluded from the update process.

Thanks Posted by Peskoe Ben(unfuddle username: bpeskoe)

Battler45 commented 4 years ago

George & Vihar,

Vihar, would you be able to modify the connection strings on the dev version of the search tools to pull from the development DB for sierrainteractive-1 sites?

Then, George, you will be able to test your work using the http://hometoindy.sierrainteractivedev.com site -- what you see there will need to match what you see on http://www.hometoindy.com when viewing details for the same listing.

This should allow you to test your implementation until the data in the development database (using your updater) matches exactly with the data in the live database (currently running on the old updater).

Vihar, I don't know if there is a way to allow George to query the region 25 records on the live DB for comparison purposes -- perhaps just viewing the data on the live site would be sufficient?

Thanks Posted by Peskoe Ben(unfuddle username: bpeskoe)

Battler45 commented 4 years ago

Vihang,

Since we need to test content for the sites in development and we'll be entering that content in the live DB, could you restore the development sites to pull content from the live DB rather than the development DB?

Thanks. Posted by Peskoe Ben(unfuddle username: bpeskoe)

Battler45 commented 4 years ago

George,

We needed to change the data-types of Latitude / Longitude columns (Geocodes table) to numeric(12,9). This led to change in a couple of updater specific store-procedures, and, hence, change in the new updater system. I've made these changes, and, have pushed the same to the updater repository. Pls fetch the latest changes and update your local copy.

Pls note that you'll also need to make a minor change in the way latitude / longitude values are set in the MIBOR import. Until now these values were set as string, but, now they would need to be set as Double. Could you pls update MIBOR import code to set latitude / longitude values as double. You can use the ToDouble string extension I've used in SoCal importer. Pls let me know if you have any queries.

Pls note that I've applied these changes to the dev. sierrainteractive-1 DB. I've attached an SQL script that you can run on your local DB to apply data-type specific changes.

Thanks. Posted by Shah Vihar(unfuddle username: vshah)

Battler45 commented 4 years ago

George,

Per Ben's feedback,

1 -- the current format of Features* value is fine. Pls ignore my comment.

2 -- the approach to remove all photos and re-download them sounds fine for MIBOR region. In SoCal RETS server, we do have access to Media resource, and, therefore, we could make use of the modified photos' details. Unfortunately, we don't have access to Media resource in MIBOR RETS server so pls continue you with your approach of deleting and re-downloading all imagescomment).

3 -- since we have access to only Active / Pending listings no need to make any changes for the same. The MIBOR importer is already populating the Status field (MLS table) with appropriate value from the RETS field, 134 (Status) so no further change needs to be made in this regard.

Pls make changes for the other points discussed above. Pls let me know if you have any queries.

Also, in reviewing the photo-processing code I realized that it is the same for both regions. Therefore, I've renamed one of the PhotoProcessor classes to DefaultPhotoProcessor and removed the other. As with DefaultGeocoding, we can continue using this class for other regions unless there is any change in the approach.

Thanks.

Posted by Shah Vihar(unfuddle username: vshah)

Battler45 commented 4 years ago

Ben,

As for caching photos on CDN for longer time - renaming photos to new name might affect some of the existing functionality (at least the new updater). A check is performed to update photo records based on the photo-name value. That said, I think it would be straightforward to update this piece of programming. Pls let me know if similar checks are performed in the old updater (and front-end sites).

Another point to consider would be photo reordering step - I understand that this step is executed for region-3 and so it may need to be tweaked to handle the change in photo-names.

An alternative approach would be to append timestamp to photo-url. For example, http://photos2.sierrainteractivemls.com/10/mlspics/8C/10_U10002739_05.jpg?ts=20110908. The MLSPhotos table does have a date field, DateAdded; its value can be used as timestamp. I'm not sure where and how this field is used but if it can be updated when a photo is re-downloaded, we can use its value in generating photo-urls. I understand that the spUpdateMLSPhoto is executed when an MLSPhotos record is to be updated. This sp can be modified to set update-date in the DateAdded field. And, the photo-url generation code will append new value thus invalidating the cache. Once this is done, CDN settings can be changed to cache images for a longer period (even a year).

Pls let me know your thoughts.

Thanks.

Posted by Shah Vihar(unfuddle username: vshah)

Battler45 commented 4 years ago

Vihang,

I've already done this -- updated the dev sites on DEDN173 to pull content from the live db rather than the development db (I need to work on a new site today).

Thanks Posted by Peskoe Ben(unfuddle username: bpeskoe)

Battler45 commented 4 years ago

Attachment: Posted by Shah Vihar(unfuddle username: vshah)