Since the emergence of the web the way applications are designed has changed. User interfaces are migrating to HTML-based solutions, in conjunction with CSS and JavaScript, for example Windows 8 will be based on HTML5 \cite{win8-html5}. More and more applications are migrating to the cloud being accessed thorough a web browser interface, for example Google Docs is a web-based alternative to the desktop Microsoft Office. Following this flow, communication protocols have also adhered to the new web paradigm, through the emergence of \textit{web services}, which implement communication on top of existing application protocols, like HTTP and its WWW protocol stack.

The main advantages of web services are interoperability and their small implementation overhead. Being built over standard protocols like HTTP, a lot of libraries already support it and the main communication primitives are already implemented. Thus developers do not need to handle this aspects and can focus on specific protocol requirements. In comparison, the standard approach of sending protocol messages directly over TCP or UDP, requires an additional development overhead every time basic communication primitives are being implemented.

Part of our work to the European project P2P-Next \cite{p2p-next} is P2P-Tube, a video sharing web platform for deploying sites like YouTube. P2P-Next goal is to build the next generation Peer-to-Peer content delivery platform. NextShare technology facilitates video streaming through BitTorrent and peer-to-peer protocols. Users are able to download video content not only from a number of delivery servers, which assume the role of \textit{seeders}, but also concomitantly from other users, which are \textit{leechers}. P2P-Tube platform uses this technologies in a set of browser plugins which are capable of providing video-on-demand and live streaming.

Applications built on top of P2P-Tube, need to offer users the possibility of uploading new videos. In order to make the application scale to a large amount of users which are concurrently doing this, we have designed a distributed system which uses one or more Content Ingestion Servers (CIS). Their role is to prepare uploaded videos for sharing with other users and make those videos available on the platform. We have chosen web services as the way of communication between web servers, which deliver the P2P-Tube application to the users, and Content Ingestion Servers.

In Section \ref{sec:web-services} we present state of the art solutions for web services. Section \ref{sec:security-solutions} introduces ways to secure those web services. P2P-Tube platform is presented in Section \ref{sec:p2p-tube} and implementation of security into CIS in Section \ref{sec:implementation}. An analysis of the reasons behind our choice for a particular web service technology and a particular security solution is also presented here. We conclude this article in Section \ref{sec:conclusion}.