Hello,
I have a webapp that acts as an accounting and billing application, developed
in Wicket. Now customer wants me to add a feature, that he can use it as a
selling software in a store, so that when somebody buys something, amount will
be subtracted from the main stock (webapp is enough for that part) and a bill
is printed through local POS printer. But the problem is, that according to our
law, POS is not just a regular printer that prints out bills. It has a special
memory where track of all operations is saved, as well as an amount of VAT tax,
that should be payed (so that tax officers can check if the shop owner is
cheating on taxes). In order to do that, I have to send certain data to the
printer, either by calling driver functions, or sending data directly to USB or
COM.
So I thought about a solution, that a small client app will be running on a
client machine. It will authenticate to the server using the certificate (same
one, that is used to log into the webapp, so that I can pair http session with
the client connection) and establish a connection on certain port. When the
shopping is over and a shop employee needs to print a bill I'll send necessary
data through the connection to the local client and since client is running on
a machine that has a POS connected to it, it has the means to forward data to
the POS and print a bill.
The question is: am I able to develop it as part of a Wicket webapp. Having
something (eg. a servlet or so), that will basically act as a server, listening
on a certain port, able to accept many connections (using threads) as there
will be more then one POS terminals, able to maintain those connections until
the client disconnects and send required data through those connections? I
certainly can do that as a separate server application, but I'd prefer to have
it as part of the webapp, so that I can directly call methods to send data to
printer, instead of establishing another connection (a local one) from webapp
to the other server app. I also thought about using Comet, and establishing an
Http connection from the client apps, but I'm not sure, if that is reliable
enough for such functionality (I must be able to handle possible connection
errors and while connected, I must be sure, that the data will arrive to the
client app).
I'll greatly appreciate any thought or hint on this
Thanks a lot
Jan
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org