ent by the top k returned neighbors. Finally, a decision is made to know whether it is interesting or not to recommend the candidate content (e.g., through a threshold). In what follows, we focus on PAM services that are used by CARS; we start by detailing offline services (i.e., context discovery and contextualization). 10.4.3 Context Discovery and Profile Contextualization This section details the two services that acquire the necessary knowledge to effi- ciently run the CARS. These services are an answer to the first two requirements imposed in Section 10.4.2. For each service, we give its definition, its deployment on CARS, and details on its operational semantics. 10.4.3.1 Context Discovery Service The approach we propose to discover contexts is based on the analysis of logs to capture regular contexts. Hereafter, a motivating example is given to understand the approach. Example. Assume that a user, John, interacts frequently with an RS. Then, thanks to information contained in his log file (see Table 10.1), the system can capture that John's interests (activities) change according to the IP address, the date and time, the device, and SO on. This can be pointed by a lookup to his log file from where two contexts can be derived: office context during working days and home context during weekends. Obviously, the content to be recommended will change according to John's context (e.g., scientific papers for office contexts and movies or music for home context). The discovery of contexts from logs assumes the manipulation of a well- structured log file. Hopefully, the analysis of the structure of the most known log Service Delivery Table 10.1 Log File Example Agent Device Content Others 192.168.53.25 May 4 17 h:00 winXP,En, Firefox5.0 SDP.pdf Platforms 192.168.53.25 May 4 17 h:10 winXP,En, Firefox5.0 Personalization.ps 192.168.53.25 May 5 16 h:30 winXP,En, Firefox5.0 contexts.pdf 254.13.70.1 May 9 12 h:00 MacOS X,En,Safari MacBook Avatar.avi 254.70.70.1 May 9 20 h:00 MacOS X,En,Safari Macbook Invictus.avi Persona