A Go application designed to fetch historical property listings and periodically update your local database with new listings from the MLS Grid API.
- Data Synchronization: Keeps local property listings in sync with the latest data from MLS Grid.
- Error Handling: Implements retries on API request failures, ensuring data consistency.
- Rate Limiting: Monitors and respects API usage limits to prevent overuse.
- Concurrent Processing: Efficiently processes data using Goroutines, ensuring optimal performance.
- Logging: Provides detailed logs for monitoring and debugging purposes.
- Concurrency: Go's built-in Goroutines and channels make concurrent processing straightforward.
- Performance: Go offers fast execution and efficient memory usage.
- Simplicity: The language's clean syntax allows for quick development and easy maintenance.
- Static Typing: Helps catch type-related errors early in the development process.
- Install Go (version 1.15 or higher recommended).
- A functional database setup (e.g., PostgreSQL).
- An active MLS Grid account to obtain the API bearer token.
-
Clone the repository:
git clone https://github.com/piotrsenkow/gosyncmls.git cd gosyncmls
-
Install the required Go packages:
go mod download
-
Setup required database by running the
db_schema.sql
script in an SQL shell or editor. Test connection. The go program will not run if it cannot find the database and its tables.
Set up the required environment variables:
API_BEARER_TOKEN
: Your MLS Grid API bearer token. Obtain one by applying for a data license at mlsgrid.com.DB_CONN_STRING
: Your postgreSQL connection string. Example:postgresql://user:password@localhost:5432/mred
Execute the command go run main.go
from the project directory.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the MIT License. See the LICENSE
file for details.