1. A method for allowing distributed running of an application between a device and a server connected via a network, the method comprising the following steps carried out by the device: obtaining a device profile including resource capacity characteristics of said device; obtaining an application profile including resource consumption characteristics of said application; obtaining device metrics relating to real-time resource usage with respect to said device; obtaining offload rules defining conditions under which an application is to be run at least in part on a server and/or on a device, the conditions involving device resource capacity, application resource consumption and device real-time resource usage; and making a decision by an inference engine to run said application at least in part on said server and/or on said device, by evaluating the offload rules applied to said device profile, application profile and device metrics.