Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix simple typos #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The RESO API Server provides a basic server that supports the OData protocol as

### Operation

The RESO API Server can be run from the command line using a file created to customize operation. The server supports both a DataService endpoint (used for discovery) as well as a Resource endpoint. Information is stored in a local repository by default. The server can be alternatively by configured to use a RESO Certified RETS 1.X server as a repository.
The RESO API Server can be run from the command line using a file created to customize operation. The server supports both a DataService endpoint (used for discovery) as well as a Resource endpoint. Information is stored in a local repository by default. The server can be alternatively configured to use a RESO Certified RETS 1.X server as a repository.

The **Setup** section provides a step-by-step guide getting the server installed. Please use information outlined in the **Configuration** section to create the configuration file.

Expand All @@ -20,7 +20,7 @@ The following procedure should be followed to setup the server:
npm install reso-api-server
```

+ Create a metadata directory and create metadata if you do not want to you the package approach. You can use the sample file provided in the distribution::
+ Create a metadata directory and create metadata if you do not want to use the package approach. You can use the sample file provided in the distribution:

```shell
mkdir metadata
Expand Down Expand Up @@ -56,13 +56,13 @@ The following procedure should be followed to setup the server:

### Configuration

A text configuration file should be located in the root directory of your project. The default name of the file is "service.conf", but this name can be overriden when calling the resoServer() method. A sample of the configuration file called "service.conf" can be found in the samples directory of this distribution.
A text configuration file should be located in the root directory of your project. The default name of the file is "service.conf", but this name can be overridden when calling the resoServer() method. A sample of the configuration file called "service.conf" can be found in the samples directory of this distribution.

RESO updates the RESO Data Dictionary periodically. A copy of the latest known RESO Data Dictionary is included in the samples directory, but you should check with the stnandards group for the latest copy.
RESO updates the RESO Data Dictionary periodically. A copy of the latest known RESO Data Dictionary is included in the samples directory, but you should check with the standards group for the latest copy.

+ API Service (data supplier parameters)

COMPRESSION: A boolean value that controls whether requested information is compressed. Compressed is much smaller than normal data but requires more server resources to generate. If the parameter is set to "true", them data will be compressed if requested.
COMPRESSION: A boolean value that controls whether requested information is compressed. Compressed is much smaller than normal data but requires more server resources to generate. If the parameter is set to "true", then data will be compressed if requested.

SERVER\_DOMAIN: The dns name of the computer that will be running the RESO API Server. If not supplied, the IP Address of the computer will be used.

Expand All @@ -76,15 +76,15 @@ RESO updates the RESO Data Dictionary periodically. A copy of the latest known R

+ Data Processing

EXTERNAL\_INDEX: A boolean value that indicates whether an external index (recommended) is being used to enfoce uniqueness or the underlying MongoDB database indexing will be used. Only MongoDB collections that do not use GUID as a key are affected. This setting is only valid for local data repositories. If the server is configured to use a RETS server as its repository (by configuring a LEGACY\_SOURCE\_URL), this setting is ignored.
EXTERNAL\_INDEX: A boolean value that indicates whether an external index (recommended) is being used to enforce uniqueness or the underlying MongoDB database indexing will be used. Only MongoDB collections that do not use GUID as a key are affected. This setting is only valid for local data repositories. If the server is configured to use a RETS server as its repository (by configuring a LEGACY\_SOURCE\_URL), this setting is ignored.

LEGACY\_SOURCE\_URL: A string that represents the URL of a RESO Certified RETS 1.X server. The URL should start with the protocol and include the port number because the server will not assume the default port of 6103. An example of an expected URL would be "http://some.mls.service.com:6103". If LEGACY\_SOURCE\_URL is set, the setting for EXTERNAL\_INDEX is ignored.

LOG\_ENTRY: A boolean value that indicates whether a console log message is generated each time a request is processed. This produces more output at the console, but alerts you when there is activity. Defaults ot "false".
LOG\_ENTRY: A boolean value that indicates whether a console log message is generated each time a request is processed. This produces more output at the console, but alerts you when there is activity. Defaults to "false".

METADATA\_DEFINITION: The path to the file for the JSON formatted OData definition file that contains RESO Data Dictionary definitions. If this parameter is not included, the server will try to look for the package "reso-data-dictionary" which should be included from your root project directory.

PROCESS\_WAIT: The number of milliseconds to wait for processing to complete for complex queries. A goog value to start with is 20, but this parameter defaults to 0.
PROCESS\_WAIT: The number of milliseconds to wait for processing to complete for complex queries. A good value to start with is 20, but this parameter defaults to 0.

RESPONSE\_LIMIT: The maximum number of objects that can be retrieved at one time. Defaults to 100.

Expand All @@ -106,15 +106,15 @@ RESO updates the RESO Data Dictionary periodically. A copy of the latest known R

+ OAuth2 Service

OAUTH2\_SERVER\_URL: The url of the OAuth2 server that can satify a userInfo request.
OAUTH2\_SERVER\_URL: The url of the OAuth2 server that can satisfy a userInfo request.

### Avoiding Duplicate Records

The underlying MongoDB database does a good job of avoiding duplicates if you are depending on the GUID attached to reach record. Real Estate listings are coded, but not with a GUID approach. A listing database relies on a different "key". In the case of this server, listing records have a key of "ListingId". Since the key being used is not GUID, there are special mechanisms used to control duplicates.

The first approach to avoid duplicates is to create an index that enforces uniqueness. In order to use this approach, set the configuration EXTERNAL\_INDEX to "false". This approach takes advantage of the built-in capabilites of MongoDB.

An alternative to preventing duplicates with a MongoDB index is to create an index in-memory. Upon startup, the database is scaned an an in-memory index is created. In order to use this approach, set the configuration EXTERNAL\_INDEX to "true". Although this approach performes better than the MongoDB index approach, manipulation of the database (from the command line for instance) will corrupt the in-memory index.
An alternative to preventing duplicates with a MongoDB index is to create an index in-memory. Upon startup, the database is scanned and an in-memory index is created. In order to use this approach, set the configuration EXTERNAL\_INDEX to "true". Although this approach performs better than the MongoDB index approach, manipulation of the database (from the command line for instance) will corrupt the in-memory index.


### License
Expand Down