A server for use in evaluating a monitoring function to determine if a trigger condition is satisfied, wherein the monitoring function is configured to determine, from a current monitoring state of the monitoring function and a first event of a first client node, an updated monitoring state of the monitoring function and an indication of whether the first event satisfies the trigger condition, wherein the current state of the monitoring function is based on an evaluation of one or more previous events, the server comprising: a memory unit for storing a current monitoring state (Ss) of the server, wherein the current monitoring state of the monitoring function can be reconstructed from the current monitoring state (Ss) of the server and a current monitoring state (Sc) of the first client node; or an encryption of the current monitoring state of the monitoring function, wherein the server cannot decrypt said encryption; and a processing unit configured to: receive an indication of the first event from the first client node; evaluate the monitoring function to determine if the first event satisfies the trigger condition, wherein the evaluation is performed using a privacy-preserving computation with the first client node, wherein the server is configured to provide the current monitoring state (Ss) of the server as a first private input to the privacy-preserving computation or the encryption of the current monitoring state of the monitoring function as a first input to the privacy-preserving computation, and the privacy-preserving computation comprises the first event or an encryption thereof as a private input to the privacy-preserving computation of the first client node, wherein the current monitoring state of the monitoring function is kept secret from the first client node and the first event is kept secret from the server, wherein the evaluation of the monitoring function provides as an output of the monitoring function: an encryption (S') of the updated monitoring state, wherein the server cannot decrypt said encryption, or an updated monitoring state (Ss') of the server, wherein the updated monitoring state of the monitoring function can be reconstructed from the updated monitoring state of the server and an updated monitoring state of the first client node; and an indication of whether the first event satisfies the trigger condition. a memory unit for storing a current monitoring state (Ss) of the server, wherein the current monitoring state of the monitoring function can be reconstructed from the current monitoring state (Ss) of the server and a current monitoring state (Sc) of the first client node; or an encryption of the current monitoring state of the monitoring function, wherein the server cannot decrypt said encryption; and a processing unit configured to: receive an indication of the first event from the first client node; evaluate the monitoring function to determine if the first event satisfies the trigger condition, wherein the evaluation is performed using a privacy-preserving computation with the first client node, wherein the server is configured to provide the current monitoring state (Ss) of the server as a first private input to the privacy-preserving computation or the encryption of the current monitoring state of the monitoring function as a first input to the privacy-preserving computation, and the privacy-preserving computation comprises the first event or an encryption thereof as a private input to the privacy-preserving computation of the first client node, wherein the current monitoring state of the monitoring function is kept secret from the first client node and the first event is kept secret from the server, wherein the evaluation of the monitoring function provides as an output of the monitoring function: an encryption (S') of the updated monitoring state, wherein the server cannot decrypt said encryption, or an updated monitoring state (Ss') of the server, wherein the updated monitoring state of the monitoring function can be reconstructed from the updated monitoring state of the server and an updated monitoring state of the first client node; and an indication of whether the first event satisfies the trigger condition. receive an indication of the first event from the first client node; evaluate the monitoring function to determine if the first event satisfies the trigger condition, wherein the evaluation is performed using a privacy-preserving computation with the first client node, wherein the server is configured to provide the current monitoring state (Ss) of the server as a first private input to the privacy-preserving computation or the encryption of the current monitoring state of the monitoring function as a first input to the privacy-preserving computation, and the privacy-preserving computation comprises the first event or an encryption thereof as a private input to the privacy-preserving computation of the first client node, wherein the current monitoring state of the monitoring function is kept secret from the first client node and the first event is kept secret from the server, wherein the evaluation of the monitoring function provides as an output of the monitoring function: an encryption (S') of the updated monitoring state, wherein the server cannot decrypt said encryption, or an updated monitoring state (Ss') of the server, wherein the updated monitoring state of the monitoring function can be reconstructed from the updated monitoring state of the server and an updated monitoring state of the first client node; and an indication of whether the first event satisfies the trigger condition.