Tuesday, September 21, 2010

Repatterns Book in Development

Repatterns: Applying Computer Science and Design Patterns to Real Estate


After some research, I've decided to include my previous book projects, "The Web is the MLS", and "Real Estate Is Global", into one single book with the tentative title and subtitle, "Repatterns: Applying Computer Science and Design Patterns to Real Estate." The reason for the two-in-one inclusions was because I felt the two previous book efforts were similar enough patterns extending the same pattern, Network Pattern, to be included into one full patterns book covering real estate and computer science together.



Here's a working abstract for the book:



Patterns are everywhere. We live in a world of visible and invisible patterns. From our birth, patterns exist to help us learn, to save time, and to be productive. This book will apply principles from computer science and well known design patterns to the business processes and procedures within the Real Estate industry. From these patterns, you will discover inefficient patterns, anti-patterns, along with learning how to think differently by replacing such anti-patterns with more efficient design patterns.



For the new book cover, I reused the "The Web Is The MLS" cover since the design was already very "patternistic" in nature. In addition, the textual change in inkscape was very easy to do.



Tentative Book Contents:



Table of Contents
Preface
Ch1 Introduction
Ch2 Factory Pattern
Ch3 Observer Pattern
Ch4 Mediator Pattern
Ch5 Request-Response Pattern
Ch6 Point-to-Point Pattern
Ch7 Facade Pattern
Ch8 Network Pattern
Ch9 Proxy Pattern
Ch10 Compound Patterns
Appendix
Glossary
Index


I look forward to working on this project while at the same time using these patterns on my current projects. Lastly, I hope others will also learn to recognize anti-patterns and design patterns within real estate or their respective industry because of this work.



--Corey

Friday, July 16, 2010

Listing Object Model (LOM) Core

LOM Core 25 Elements

Intro



Lately my interests have gravitated toward web services and marking up listing information to xml. However, another inefficiency within the Real Estate Industry is how listing information is distributed to web endpoints. Within HTML, Word, or an Excel spreadsheet, I cringe at the ways listing information is being sent from an end user to service provider or service provider to service provider. Remember I'm talking old school here, average age is in the 50's and climbing.




So with that stomach churning thought in 3d motion, I thought to myself wouldn't it be great to have a minimalistic shortlist of elements to markup a listing for Grandma, a tween, or anyone else in need of a simple service like this. In the past, I've used Dublin Core, a specification of 15 meta tags for semantically describing documents. Thinking to myself, "LOM Core must be very simple like Dublin Core because simple always wins on the net."




Without hesitation, I proceeded to diagram (see above) a list of essential words or elements which would describe a lowest common denominator real estate listing. I came up with the following at first, in no particular order (well alphabetical):



LOM Core 25 Elements




  • address

  • agent

  • beds

  • baths

  • city

  • contact

  • country

  • description

  • email

  • firstname

  • lastname

  • listing

  • location

  • organization

  • owner

  • phonenumber

  • postalcode

  • price

  • size

  • state

  • status

  • style

  • squarefeet

  • squaremeters

  • type



I stopped at 25 to keep it as simple as possible. Obviously, I could have kept going but simple would have easily morphed into complex.



Use Cases



Since we now have our shortlist of elements, we need a business purpose or use case. I came up with five, initially, but of course we are not limited to only these.



1. For Sale By Owner Lisiting


[sourcecode language="css"]
<?xml version="1.0" encoding="UTF-8"?>
<listing>
<type>residential</type>
<style>Single Family</style>
<beds>3</beds>
<baths>2</baths>
<size>
<squarefeet>2000</squarefeet>
</size>
<location>
<address>1234 My Street</address>
<city>Orlando</city>
<state>FL</state>
<postalcode>32801</postalcode>
<country>US</country>
</location>
<description>Modern and functional.</description>
<status>active</status>
<price>$150,000</price>
<contact>
<owner>
<firstname>John</firstname>
<lastname>Smith</lastname>
<phonenumber>555-3333</phonenumber>
<email>jsmith@john.smith.name</email>
</owner>
</contact>
</listing>
[/sourcecode]

2. Residential Agent Listing


[sourcecode language="css"]
<?xml version="1.0" encoding="UTF-8">
<listing>
<type>residential</type>
<style>Single Family</style>
<beds>4</beds>
<baths>2</baths>
<size>
<squarefeet>3000</squarefeet>
</size>
<location>
<address>5678 Your Street</address>
<city>Orlando</city>
<state>FL</state>
<postalcode>32801</postalcode>
<country>US</country>
</location>
<description>Family size.</description>
<status>active</status>
<price>190,500</price>
<contact>
<agent>
<firstname>Jane</firstname>
<lastname>Doe</lastname>
<phonenumber>555-5555</phonenumber>
<email>jdoe@jane.doe.name</email>
<organization>Jane Doe Realty</organization>
</agent>
</contact>
</listing>
[/sourcecode]

3. Commercial Owner Listing


[sourcecode language="css"]
<?xml version="1.0" encoding="UTF-8"?>
<listing>
<type&gt;commercial</type>
<style>office</style>
<size>
<squarefeet>3000</squarefeet>
</size>
<location>
<address>1010 Biz Way Suite 200</address>
<city>Orlando</city>
<state>FL</state>
<postalcode>32801</postalcode>
<country>US</country>
</location>
<description>Build to suit office space.</description>
<status>active</status>
<price>$100/sqft</price>
<contact>
<owner>
<firstname>Bob</firstname>
<lastname>Johnson</lastname>
<phonenumber>555-9999</phonenumber>
<email>bjohnson@bob.johnson.name</email>
</owner>
</contact>
</listing>
[/sourcecode]

4. Commercial Agent Listing


[sourcecode language="css"]
<?xml version="1.0" encoding="UTF-8"?>
<listing>
<type>commercial</type>
<style>office</style>
<size>
<squarefeet>4000</squarefeet>
</size>
<location>
<address>2020 Easy Street Suite 300</address>
<city>Orlando</city>
<state>FL</state>
<postalcode>32801</postalcode>
<country>US</country>
</location>
<description>Plenty of space for cubicles. Build to suit.</description>
<status>active</status>
<price>$200/sqft</price>
<contact>
<agent>
<firstname>Jen</firstname>
<lastname>Wright</lastname>
<phonenumber>555-7777</phonenumber>
<email>jwright@jen.wright.name</email>
<organization>Wright Realty</organization>
</agent>
</contact>
</listing>
[/sourcecode]

5. International Listing


[sourcecode language="css"]
<?xml version="1.0" encoding="UTF-8"?>
<listing>
<type>commercial</type>
<style>bank</style>
<size>
<squaremeters>1000</squaremeters>
</size>
<location>
<address>7 Picardy Place</address>
<city>Edinburgh</city>
<postalcode>EH1 3JT</postalcode>
<country>Scotland</country>
</location>
<description>Former bank branch, build to suit</description>
<status>active</status>
<price>300EUR/sqmt</price>
<contact>
<agent>
<firstname>Will</firstname>
<lastname>Jones</lastname>
<phonenumber>0131 5554343</phonenumber>
<email>wjones@will.jones.name</email>
<organization>Jones Realty</organization>
</agent>
</contact>
</listing>
[/sourcecode]

Summary



In sum, LOM Core is a simplified shortlist of 25 core real estate elements allowing anyone to markup a residential or commercial listing. The examples above are soley for exercise purposes, but as you can see LOM can adapt to different types of listings quite effortlessly. The next step is to solidify schemas (DTD, XML Schema, RelaxNG) for validating followed by creating a web-based tool using a form for users to enter in their listing elements to create a LOM Core listing on the fly. Users could then send or copy and paste the LOM Core listing and distribute and transform as needed.



--Corey

Sunday, May 23, 2010

My Lost Predictions

Lost Senet Game



So tonite is the series finale of Lost. I've been a fan of the show since last year, thanks to Netflix.



It took me a few episodes to actually get into the show, but once I saw "The Hatch" episode I was hooked.



Let's cut to the chase and predict what's going to happen:



Jacob: as he said in "What They Died For", once the fire extinguishes then Jacob will cease to exist. I believe this because Jacob cannot lie according to Mother. Jacob will join the afterlife and will finally rest in peace.



Sawyer: I think Sawyer needs to somehow get MIB's knife to Jack. The knife is a very important piece in the game because it helped killed Mother, Dogan, and Jacob. After getting the knife, I think Sawyer will then died for this was his purpose.



Kate: I have a strange feeling Kate will take a Mother's role just like Mother from the "Across the Sea". Kate mothered Aaron when she was told not to and she was not his natural mother. If the pattern continues, ,my gut feeling is she will become the protector of the island in search and in waiting for a "good" child or children to take her position on the island.



Hurley: I know Hurley is a fan favorite, but I believe he has served his purpose. His purpose was to see dead Jacob and do as Jacob had told him. Since Jack has now taken Jacob's position as the protector of the Island, Hurley has served his purpose and will die tonite.



Claire: I believe Claire dies either during an epic fight between MIB and Jack or Ben just shoots her as he does to others so well.



Myles: I think Myles will die by sacrificing himself for his purpose. Myles is helping Ben so MIB may have a hand in terminated Myles.



Ben: I think Ben will have an epiphany and finally leave the island, a la the donkey wheel, and return to live in the real world. My feeling is Ben is tired of killing and manipulating people and just wants to rest and live a normal life.



UnLocke (MIB): After being killed by Jack, MIB's soul is released from the smoke monster and leaves to join Jacob in the afterlife to rest in peace for eternity.



Desmond: For Desmond, his purpose is go down into the cave of light. He is able to resist electromagnetic energy so Desmond must go down into the heart of the island to help Jack. It could be a simple switch or some type of secret password down there, but that's Desmond's purpose this evening.



Jack: My instincts tell me Jack must sacrifice himself for everyone. If he is like Neo from "The Matrix", Jack will sacrifice his life by killing the Man In Black with MIB's knife in the back to save everyone else.



Everyone Else: I'm predicting after Jack sacrifices himself that everybody else will come back to life and return to the real world as if nothing ever happened. I'm borrowing from Neo in Matrix Revolutions when Neo destroyed the Smith Virus and everything returned back to normal operations within the Matrix.

The Island: And finally, the island will continue to be protected by Kate with new players coming to the Island a la reloading the Matrix.



There are my predictions, I may be right or I may be wrong. Anyway I look at it, it's going to be a fun mental rollercoaster ride! Namaste.



--Corey

Saturday, May 15, 2010

PubSubListing Protocol v0.1

PubSubListing Protocol v0.1



One of the challenges for buyers in real estate is knowing the most current listing information. The MLSN Protocol resolves this issue for public access to listing information, but it is based upon a request/response protocol. A user must manually query an mlsn server to find out the latest increase or decrease price for a listing. Whereas, the publish/subscribe could be used to receive listing information automatically over the Internet.



In the diagram above, users subscribe to topic message queues using the PubSubListing Protocol. When a listing's price changes, this update is sent to the messaging server which updates the subscribed topic queues, respectively. The pricing update is broadcasted over the PubSubListing Protocol to the users who then view the new price on their laptop, desktop machine, or mobile device. This broadcast pattern continues whenever the listing's price changes. Users have the ability to continue to receive future broadcasted messages by remaining subscribed or unsubscribing to the topic queues.



In summary, the obvious benefits of the PubSubListing protocol are the automated messages of changes and the ability to subscribe or unsubscribe to topic queues. The next step for the protocol is to apply for a reserved port with IANA.

Saturday, March 27, 2010

My Lost Theory





Lost



A couple of weeks ago I was sick with the flu. I spent Saturday on the couch with my soup and a head cold in a miserable state.



Lucky for me, I subscribe to Netflix so I decided to rewatch Season 1 of Lost. I really didn't watch Season 1's episodes the first time so I thought I would pay closer attention to details this time. Anyway, I was sick and had nothing better to do.



After rewatching a few of the episodes, it dawned on me what was happening on the island and to the Lost characters.



I will stop here and warn you. If you do not want to know my theory or learn about any spoilers then do not scroll down this page. I will not be upset if you turn the donkey wheel and transport yourself elsewhere.



But, if you do want to know my theory, I will give you three chances to stop and reconsider before revealing my theory, a la Locke with Charlie when Charlie wanted his drugs.




|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
V
First chance to stop, if you still want to know scroll down.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
V
Second chance to stop, if still curious scroll down.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
V
Last chance to stop, scroll down to read my theory.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
V





Locke teaching Walt how to play backgammon.


It's a Game: Backgammon



After watching the episode with Locke and Walt on the beach playing a certain game together, I realized that Lost was a human backgammon game between Jacob and the Man in Black. The Lost characters are the pieces and the island is the game board.



In backgammon, to win a player must get all of his/her pieces off the board first. In Lost, the goal is get off the island first which the Man in Black is trying to do in Season 6.










The Playing Pieces: the characters



Also, black and white playing pieces are used in backgammon. So if you notice Jacob wears white and the Man in Black wears, well, black. After being 'claimed', Sayeed and Claire now wear black meaning that they are 'pieces' of the Man in Black. Remember, Dogan said there's a darkness growing within Sayeed meaning that he was turning into a black playing piece.



The Numbers: 4 8 15 16 23 42








doubling cube

4, 8, 16 are all numbers on the six-sided doubling cube. In backgammon, there are two-sets of 15 playing pieces. On the board, points are numbered and one point is notably numbered, 23-point . And for the last number, 42 is an opening roll strategy in backgammon.





Final Episode Hope



Having said all of this, my hope is that in the final episode we will finally see a full shot of the entire Lost island. I may be wrong, but we have yet to see the entire landscape and topology of the island, a bird's eye view. I found a few probable Lost island shots on Google Images. As you can see in this image, the forests on the island make up points just like those on a backgammon game board.












My final hope for the last episode is a camera shot of an old, almost ancient backgammon board used by Jacob and the Man in Black somewhere on the island. I think whomever the next candidate to protect the island will inherit the game to play against the Man in Black or the next nemesis. Because there must be two players to play.



Backgammon on Wikipedia



If you are still skeptical of my theory, I encourage you to read the backgammon page on Wikipedia. There you will find the history of the game, men used as playing pieces, the numbers, the Jacoby Rule, and a technique called bearing off (polar bears).



Please feel free to leave comments for me if you agree, disgree, or have other thoughts. If you have a better theory I would love to read it. Lost is a masterpiece and I have loved watching every minute!



--Corey

Wednesday, March 3, 2010

MLSN URL's Reusability

MLSN URL Reusability



One of the major benefits of MLSN URL's is the ability to reuse assigned MLS Numbers. Using an simple scenario, I'll go in detail of how reusability works with MLSN URL's.



In the diagram above, Alice is an owner of an accredited OpenMLS registrar. Her service is located at alicesmls.com.



Bob the seller, needs to sell his house in Orlando, Florida. He registers it on Alice's MLS for 60 days and receives a unique MLSN URL, mlsn://1.1.1@3203.840.



Unfortunately, Bob's house does not sell within the 60 days and expires. When this happens, the assigned 1.1.1 or triple short number returns to Alice's block of MLS numbers to be reused again.



A new seller, Cristy, registers her house in Atlanta, Georgia on alicesmls.com and receives her unique MLSN URL, mlsn://1.1.1@30329.840.



As you can see, 1.1.1 was used once with Bob's listing and then again with Cristy's. Each MLSN URL represents two completely different listings, which demonstrates reusability.



By the way, the number 840 in the MLSN URL's represents the iso country code for the United States.



--Corey

Wednesday, February 17, 2010

MLSN Protocol User Session Diagram

MLSN Protocol User Session Diagram



A Simple User Session



Scenario: User wants to know the status of a property listing in the downtown Orlando zip code, 32801, located in the United States.

A user starts a session on a client desktop. He enters the following MLS Number URL at the prompt:



user>mlsn 1.1.1@32801.840/status



The mlsn client application sends the MLSN URL via port 32801 over tcp through the internet to an MLSN Messaging Server which accepts the text string via port 32801.



The MLSN Server routes the URL text string to an application server which parses and creates a query for the database which returns a result.



The result is sent from the application server back to the MLSN Messaging Server which sends the result via port 32801 over tcp back through the Internet cloud.



Finally, the client desktop receives the result via port 32801 and displays the results to the user:



user>active



--Corey

Friday, February 12, 2010

Multiple Listing Service Network Protocol v0.5

The Numbering Problem



One of the problems in the Real Estate Industry revolves around the numbers assigned to listings by Multiple Listing Services. Six, seven, eight, or more numerical digits may be assigned to an individual MLS listing number along with possible alphanumeric characters preceding the number.




From my research, listed below are ten randomly selected, real world MLS numbers I extracted from a daily Google Alert listening for text string 'MLS#':




  • MLS# 829710

  • MLS# 90035087

  • MLS# 4240855

  • MLS# H740907

  • MLS# 9088503

  • MLS# 100006059

  • MLS# M1366719

  • MLS# MC5555362

  • MLS# H741473

  • MLS# 4334588



Lacking Visual Meaning



The problem with these numbers and others is that they have no visual value or meaning to a user. MLS numbers are stored and generated within datatbases by MLS providers. Since these numbers are required to be unique, a field type of serial is assigned to the field which increments the next unique MLS number by 1 to enforce a primary key's uniqueness. However, this system does not benefit the user from deciphering where the listing is located nor any other details.



Duplication Misery



Another problem is that there are hundreds of MLS's in existence and the probability of the same number assigned to two different listings in two different MLS databases is highly probably. If a user only has the number to reference, which listing number is which? And how much time is lost trying to figure out which listing corresponds to which MLS database?

Zero Reusability



Since MLS numbers are simply incremented by 1, the opportunity for number reuse is eliminated. A provider's MLS numbers will continue to increase by 1 which will increase the number of digits of the MLS numbers over time. Having no delimiters, MLS numbers become humanly impossible to remember since the average human is said to only have the capacity to remember up to 7 consecutive digits. But looking at the random MLS numbers I collected above , a high percentage of real world MLS Numbers either equal or are greater than 7 digits.

The Solution



Multiple Listing Service Network Protocol v0.5



The Scheme




The MLSN URL scheme is used to designate Internet MLS listings accessible using MLSN (Multiple Listing Service Network). The scheme adheres to IETF's RFC1738 which describes syntax for strings representations or URLs via the Internet.



The Registrar Assigned Number


After a user posts a listing to a registrar, a 3-octet number is assigned to a listing just like an IP address is statically assigned to a machine or device. But in the case of the MLSN protocol, 3-octet numbers are dynamically assigned to allow for reusability. After a listing expires, the 3-octet number returns to the registrar's pool to be later reassigned to alternate user's listing.



For example:



User registers listing with AlicesMLS and receives the following MLS Number URL Address:



mlsn://1.1.21@32821.840




The listing expires after 30 days and 1.1.21 returns to the registrar's pool of mls numbers and is reassigned to another user's listing:



mlsn://1.1.21@32819.840



The new MLS URL Address reuses 1.1.21, but is a different listing from the previous listing.



Note: 1.x.x is designated as a reserved Class A block of numbers and used for testing purposes.



The Postal Code


By adding a local postal code to the URL, the listing becomes visually meaningful. Just by looking at the URL, a user can tell if the MLS listing is located in an ideal or non-ideal postal code area. In addition, postal codes are used by the majority of the world's countries which makes MLSN URL's extensible to potentially cover any property in the world.



The Country Code


Keeping the global MLS market in mind, a 3-digit country code follows the postal code. Every country is designated with an ISO 3166-1 3-digit number.

This number enhances an MLS Number URL for reusability and visual meaning when coupled with the postal code.

The Port


Two weeks ago, I secured internet port 32801 with IANA on its list of registered ports.



mlsn 32801/tcp Multiple Listing Service Network
mlsn 32801/udp Multiple Listing Service Network
# Corey Leong 27 January 2010


The purpose of this new port will be to send and receive request and response messages from client machines to designated mlsn servers. This type of messaging mirrors the whois service which enables a user to lookup domain names over port 53.



The Resource


Using a RESTful approach, a resource appended to the URL string permits lookup of a particular attribute of the listing.



For example:



A client sends the following request to an mlsn server.



mlsn://1.1.17@32802.840/status



The mlsn server returns "active" to the client, then the connection is severed.



Other potential resource lookup scenarios include beds, baths, square footage, price, etc.



Conclusion


The above information is a high-level perspective of the Multiple Listing Service Network (MLSN) Protocol, URL, and Port. MLSN is in development mode. Eventually, MLSN will be used by any user to query MLS Listings from registrars over the Internet.



I intend to continue testing a multitude MLS Number URL strings until this protocol reaches full 1.0 version.



--Corey

Monday, January 18, 2010

Real Estate Protocol Submission


MLSN Protocol Client Server Model



This past weekend I submitted our online application for a new user registered port with IANA. Here is a simple client server model depicting requests and responses.



The protocol, Multiple Listing Service Network (MLSN), will involve online users and applications querying a real estate database of listings.



I'll post more diagrams and information regarding this protocol/port as we draw closer to our application being approved. :)


--Corey

Tuesday, January 5, 2010

RealPM Model Use Case Diagram


RealPM Model Use Case v.01



This is a first pass at building a use case model for real estate project management. As you can see on the left side of the system, there are five actors: the project manager, salesperson, administrative assistant, buyer, and the seller. On the right side of the model are three external systems which interface with the model. They are Google Wave, SalesForce, and OpenProj.


The system's use cases are self-explanatory and may need refactoring. Again, this is a first pass. In addition, I'm sure more use cases will rear their heads so I expect the number of use cases to grow.


Feel free to leave comments and suggestions for this model is open for public comment.


--Corey

Monday, January 4, 2010

Building The Perfect Reputational Beast, Part 2

Continuing from Part 1, this modeled diagram represents components of a concept reputational application. As do most web applications, the system is comprised of three tiers: client, application, and the database layer.






RealRep Deployment/Component Diagram

The user of the system interfaces with a browser on a desktop computer or an application on a mobile device. The middle tier is comprised of JBoss Application Server and Apache's ServiceMix. I chose JBoss AS to allow for enterprise javabeans to be used along with all of the lovely enterprise features such as remoting, security, transaction management, presistence, messaging, resource pooling, concurrency control, and directory services.



I included a servicemix implementation component to jboss for deploying a webservice to external webservice clients. In addtion, servicemix allows for xmpp implementations along with messaging services over Java Messaging Service (JMS).



For authorization, an OpenID provider is accessed for warehousing usernames and passwords. Having users' credentials stored by an OpenID provider removes the potential possibility of a security breach regarding usernames and passwords.



Lastly, I selected PostgreSQL for the application's database layer. I have used PostgreSQL with many projects previously while the zero licensing cost to implement is most ideal.



To continue this development drill, I will next blog activity diagrams from using the potential use cases.



--Corey

Global Real Estate Day in the works

As a non-profit organization, the gr8c's central purpose is to help the real estate community. One way to help is to create awareness for the global real estate community with a designated day called Global Real Estate Day.



As always, I am open to ideas so please feel free to post comments.



The day will be announced in the coming days.



--Corey

Friday, January 1, 2010

2010 Resolutions

Here's a list of my resolutions for 2010.



I resolve to:



  1. finish and publish my first book online, pdf, and ebook version.


  2. finish and submit the OpenMLS protocol specification to IANA.


  3. release Remetal 1.0 specification.


  4. release RealDF 1.0 specification


  5. release version 1.0 of the OpenMLS Registrar Handbook.


  6. develop and release beta version of OpenReal, a public real estate data portal.



I look forward to accomplishing these goals for 2010.



-- Corey