  The field of transient astronomy has seen a revolution with the first
gravitational-wave detections and the arrival of multi-messenger observations
they enabled. Transformed by the first detection of binary black hole and
binary neutron star mergers, computational demands in gravitational-wave
astronomy are expected to grow by at least a factor of two over the next five
years as the global network of kilometer-scale interferometers are brought to
design sensitivity. With the increase in detector sensitivity, real-time
delivery of gravitational-wave alerts will become increasingly important as an
enabler of multi-messenger followup. In this work, we report a novel
implementation and deployment of deep learning inference for real-time
gravitational-wave data denoising and astrophysical source identification. This
is accomplished using a generic Inference-as-a-Service model that is capable of
adapting to the future needs of gravitational-wave data analysis. Our
implementation allows seamless incorporation of hardware accelerators and also
enables the use of commercial or private (dedicated) as-a-service computing.
Based on our results, we propose a paradigm shift in low-latency and offline
computing in gravitational-wave astronomy. Such a shift can address key
challenges in peak-usage, scalability and reliability, and provide a data
analysis platform particularly optimized for deep learning applications. The
achieved sub-millisecond scale latency will also be relevant for any machine
learning-based real-time control systems that may be invoked in the operation
of near-future and next generation ground-based laser interferometers, as well
as the front-end collection, distribution and processing of data from such
instruments.
