\begin{figure}[htpb]
\centering
\includegraphics[width=0.5\textwidth]{packet_loss.png}
\caption{Minimizing the effect of packet loss}
\label{fig:packet_loss}
\end{figure}

\begin{figure}[htpb]
\centering
\includegraphics[width=0.5\textwidth]{arch.png}
\caption{System architecture of BASS}
\label{fig:arch}
\end{figure}

\begin{figure}[htpb]
\centering
\includegraphics[width=0.5\textwidth]{sharedmem.png}
\caption{Shared memory regions}
\label{fig:sharedmem}
\end{figure}

\begin{algorithm}[Htbp]
\SetLine
\While{sharing session continues}{
\If{there are new updates}{
Find shared process windows\;
Find the overlapping windows of the unshared processes\;
Combine the overlapping or repeating updates into one update\;
Clip the regions considering overlapping unshared windows\;
Prepare a compressed image for each update region\;
sleep x ms (determined by manager thread) before starting again\;
}
\Else{
	sleep 5 ms and then check again
}}
\caption{The algorithm of the main thread}
\label{alg:mainthread}
\end{algorithm}

Similarly instructors can give a lecture over the Internet using BASS. Students or instructor can record the session and this recording can be played back locally or from a streaming server to multiple users. Application sharing can be enriched with audio and video for online lectures. Moreover BASS can be used for software tutoring where an instructor teaches a particular software like photoshop, dreamweaver, office suites, autocad and visual studio. Students can see what the instructor does and they can participate to the sharing session by remotely using mouse and keyboard. Instructors can request from students to repeat their actions after showing a feature. 

The passive mode can be used as a RGB cable replacement for presentations. Basically, the client becomes a network projector which waits for incoming connections. Presenters can connect to this client and share their applications. A computer can be dedicated as a network projector and only this machine should physically attached to a real projector. The presenters do not need to attach their laptops with an RGB cable to a projector. They just stream their application view to the network projector. 

\begin{comment}
\begin{figure}[!htpb]
%\centering
\includegraphics[width=0.25\textwidth]{BASS_client.png}
\includegraphics[width=0.25\textwidth]{uvnc_client.png}
\caption{BASS client view}
\label{fig:BASS_view}
\end{figure}

\begin{figure}[!htpb]
\centering
\includegraphics[width=0.5\textwidth]{uvnc_client.png}
%Ultravnc client view
%\includegraphics[width=0.5\textwidth]{BASS_client.png}
\caption{UltraVNC client view}
\label{fig:uvnc}
\end{figure}
\end{comment}

\begin{comment}
\begin{figure}
%\centering
\subfigure[BASS] % caption for subfigure a
{
    \label{fig:sub:a}
    \includegraphics[width=0.22\textwidth]{BASS_client.png}
}
%\hspace{1cm}
\subfigure[UVNC] % caption for subfigure b
{
    \label{fig:sub:b}
    \includegraphics[width=0.225\textwidth]{uvnc_client.png}
}
\caption{Bild a och b.}
\label{fig:sub} % caption for the whole figure
\end{figure}
\end{comment}

Application and desktop sharing (\emph{BASS}) allows sharing an application with remote users. All participants see the same screen-view and use the same application. There is only one copy of the shared application and it runs on the server.

@inproceedings{coword,
 author = {Steven Xia and David Sun and Chengzheng Sun and David Chen and Haifeng Shen},
 title = {Leveraging single-user applications for multi-user collaboration: the coword approach},
 booktitle = {CSCW '04: Proceedings of the 2004 ACM conference on Computer supported cooperative work},
 year = {2004},
 isbn = {1-58113-810-5},
 pages = {162--171},
 location = {Chicago, Illinois, USA},
 doi = {http://doi.acm.org/10.1145/1031607.1031635},
 publisher = {ACM},
 address = {New York, NY, USA},
 }