Yes, the AMPS SOW provides a convenient way to store persistent client state while minimizing external dependencies.
The general approach is:
- Define a message format that contains the state you need to preserve, including a consistent identifier for each distinct instance of your application
- Configure a SOW topic to store the messages
- In your application, query the SOW and restore the application state when the application starts
- Periodically persist the application state as the application runs
60East has provided examples of this on the 60East blog -- each example is a variation on the approach above, and each example solves a slightly different problem:
Keeping Bookmark State in AMPS: http://www.crankuptheamps.com/blog/posts/2015/03/09/no_filesystem_no_problem_keeping_state_in_amps/
Handling Poison Messages: http://www.crankuptheamps.com/blog/posts/2015/01/30/yuck-stateless-poison-message-handling/
Keywords: SOW storage, client state, bookmark store
Comments