I have an idea for a signature pad system but wanted to get some feedback. I have a rails app and plan on using Thomas Bradley's library for signature capture. However, I would like the signature to be captured on a different client that the main page. Basically, we have a desktop computer run by our staff to check out items from a front desk. I'd like the staff to enter the checkout information and press a button then a separate mini-tablet would show the signature prompt and connect it to the record from the main computer.

I imagine they will be two separate clients. The signature tablet could query the server frequently to see if it should update it's interface but I feel there has to be a better way. Any ideas would be appreciated.

有帮助吗?

解决方案

Thanks to the comment by bfavaretto I looked into web sockets and found a service called Pusher. It's a paid web sockets engine that offers a free limited use sandbox which is just fine for what I'm doing now. If nothing else it gets me off the ground.

Here is my general workflow:

Desktop refers to the client running the main interface and Tablet refers to a tablet which accepts drawn signatures.

  1. "Desktop sends a post request to a controller asking for a signature and providing a prompt. e.g. "By signing here you agree to the terms..."
  2. Controller activates a server side Pusher instance and sends a message asking for a signature.
  3. Tablet subscribes to the Pusher channel and waits to receive a signature request and prompt.
  4. When the signature request message is received, Tablet shows the Thomas Bradley signature plugin.
  5. User signs the page and submits signature as a POST back to the server.
  6. A controller takes in the signature and sends a Pusher message to the desktop with a copy of the signature.
  7. The desktop client renders a read-only copy of the signature (using Thomas's plugin) to be verified by the operator.
  8. Signature (along with other data) is submitted to be stored in database.

Hope this helps and I'd be happy to clarify any of what I did to make this work.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top