tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Bug 55639] Add Drawboard Websocket Example
Date Tue, 08 Oct 2013 17:06:34 GMT

--- Comment #5 from Konstantin Prei├čer <> ---
Hi Christopher,

(In reply to Christopher Schultz from comment #4)
> Is there any reason to bother sending a PNG image to begin with? Why not
> just store all the mutations (i.e. draw commands) on the server and send
> those to the clients when they connect? If you did that, you could also
> avoid performing any AWT operations on the server.
> I suppose as a demo it's nice to see how to handle both binary and
> text-based data in one example.

The reason for sending a PNG at the beginning is because otherwise the server
would need to store a huge amount of draw commands so that the client can
reconstruct the generated image (because you can never remove a drawed path -
you can only overwrite them with your own). This would need a lot of CPU usage
at the client and a lot of space on the server.
Also the server would need some logic to detect if a previously draw command is
not needed because it is completely overlapped with other draw commands, etc.

Therefore I chose to have a current representation of the room image at the
server which is sent to the clients at the start of a session.

You are receiving this mail because:
You are the assignee for the bug.
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message