GeoEvent Service for LBS - Best-Practice?!

3022
0
07-28-2015 06:05 AM
DominikSchlarmann
Occasional Contributor

Dear all,

Currently I am designing a GeoEvent Service, which should sent notifications (for now using emails) to users smartphones once the user enters a region of a geofence...you can also call it Location-Based Service.

The information, which will be send for example every ~30sec contain the following attributes:

[{

  "id": "9",
  "date": "7/25/2015 05:25:30 PM",
  "email": "email@gmail.com",
  "categorysp": "true",
  "categorydk": "false",
  "Longitude": 7.619098,
  "Latitude": 51.958043

}]

Generally the process is working and looks like the following (check the attachments for illustration)

  1. Recieving input via Rest-Interface. SmartPhones will POST their current position as a Point, some settings (like which categories of GeoFences are interesting) and email adress (check the example above).
  2. The received input contains preferred categories, which are from interest for the users. If certain categories are set to 'true', the process continues.
  3. The received input contains the Lat/Lon of the user's position, which will be processed by a 250m Buffer-Processor.
  4. The buffered points will be filtered whether the buffered point overlaps with a GeoFence.
  5. If this is the case, so GeoFences and buffered points overlap, a GeoTagger will be used to to create a reference to the GeoFence and the GeoEvent. By the way: Thanks for this useful post
  6. A Field Enricher adds the information of the GeoFences (which is a synchronized Feature Service). So all attributes (and not only the GeoFence name and category) will be added to the GeoEvent.
  7. A Field Reducer is used to eliminate some unnecessary fields.
  8. Different outputs are configured. For example an email is send to the email address from the input, which contains information from the GeoFences enriched by the Field Enricher.

Up to know I am quite satisfied with my GeoEvent service; especially as I've started one week ago using the GeoEvent Extension.

One question is still open and I have no clue how to deal with it.

As I've said above, up to now I am using email as notifications, but actually I aiming a mobile Android application, which gives users an application-notification (instead of an email) with some information. For this reason, the input is sent with a unique identifier to the GeoEvent Service. The easiest way would be something like the email address (assuming email address is only used once).

The actual problem: How to get sure that the output corresponds with the individual input? Of course, a user should only get the output, which is tailored and which fits to his settings (preferred categories) and of course his position. The question to you: Has anyone of your dealt with the same or a similar problem? As far as I understand, I need the right Input/Output connector.

Possible solutions (from my perspective):

  • Writing all outputs to a file accessible via a webserver. From the mobile phone: Calling the file on the webserver and filter for features, which are not older than xx seconds and where the identifier fits with the own identifier. To avoid a big file, the file would be cleaned every 5min or so.
  • Pushing output to a cache site. Calling the cache-site and filter for identifier and time (not older than xx seconds).
  • WebSockets - unfortunately I do not know much about it, but as far as I understand this would be an option?! On each client-side (so on every device) I would open a WebSocket Connection to the Server Websocket (which is only one), and the input and ouput would be individually?!

It would be nice, to get some input from your side!

All the best,

Dominik

0 Kudos
0 Replies