Technical background

The system will be a classic tablet to back-end server configuration with, when/if implemented implemented, separate servers for each part of the system. It will be designed this way so that it could, if required, be implemented on a cloud system such as Amazon AWS.

So, what does REST mean. REST is one of the simplest ways to communicate between two computers. Put in layman’s terms, the enquiring computer pretends to be a web browser asking for a page and the serving one accepts the requests, formats the result as required and sends the data as though it was delivering a web page. As it happens, the system here is designed to use a database (of which more later) that likes JSON formats. Hence, all the data sent between these servers is in JSON format. It goes something like this:

The tablet issues a request on port 8080 which is passed on by the Web server as a REST request – ‘’ (demo being the current demo user name! The Web Controller has a web server looking at port 8081 (note the change of port – again more later). It digests the request, gets the user data from the database using a request in a similar format: ‘’. As the data server is always on the same network as the web controller, it can have an internal IP address. The data server will return a complete User object (which contains all of the data for the User – cars, locos, towns, etc.). The web controller extracts just the data it needs and sends that back to the web server as a string of psuedo-HTML but what is actually a JSON. This looks like this:
{“railroadName”: “Sunset & North Eastern RR”,
“railroadLogoURL”: “”,
“username”: “demo”,
“password”: “5F4DCC3B5AA765D61D8327DEB882CF99”,
“currentTTPositionString”: “20”,
“maxTTPositionString”: “20”}
The web server extracts from this what the tablet app needs and sends it in the same JSON format to the tablet. As you can see, the data is extremely easy to parse out as all of the required information is there. BTW, the password is encrypted so, to check any entered password, that is also encrypted using the same method and thus the encrypted versions should be the same. That way, only the user knows the actual password.

That’s enough for now. More to come….


This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s