We introduce a new relativistic astrophysics code, SpECTRE, that combines a discontinuous Galerkin method with a task-based parallelism model. SpECTRE's goal is to achieve more accurate solutions for challenging relativistic astrophysics problems such as core-collapse supernovae and binary neutron star mergers. The robustness of the discontinuous Galerkin method allows for the use of high-resolution shock capturing methods in regions where (relativistic) shocks are found, while exploiting high-order accuracy in smooth regions. A taskbased parallelism model allows efficient use of the largest supercomputers for problems with a heterogeneous workload over disparate spatial and temporal scales. We argue that the locality and algorithmic structure of discontinuous Galerkin methods will exhibit good scalability within a task-based parallelism framework. We demonstrate the code on a wide variety of challenging benchmark problems in (non)-relativistic (magneto)hydrodynamics. We demonstrate the code's scalability including its strong scaling on the NCSA Blue Waters supercomputer up to the machine's full capacity of 22, 380 nodes using 671, 400 threads. variety of astrophysics codes (e.g., Refs. [6,[9][10][11][12][13][14]) have been designed based on these fundamental building blocks.These strategies work well when the computations are reasonably homogeneous or when one seeks good parallelization to only a few thousand cores. As the number of MPI processes increases, so does the cost of communication which, together with non-uniform workload typical of astrophysics problems, limits the maximum number of useful cores that codes can run on. Efficient core utilization becomes non-trivial, often requiring careful optimization by hand to achieve good scalability [15]. Standard finite-volume and finitedifference methods achieve higher order accuracy with increasingly large (overlapping) stencil sizes, and may require additional effort to achieve scalability on massively parallel machines.As one looks ahead to the arrival of exascale computing, it will become increasingly important to focus on developing algorithms that can take full advantage of these very large machines.Discontinuous Galerkin (DG) methods [16-21], together with a task-based parallelization strategy, have the potential to tackle many of these problems. DG methods offer high-order accuracy in smooth regions (although, for stability, increasing the scheme's order requires decreasing the timestep, which restricts the largest usable order in practice), robustness for shocks and other discontinuities, and grid flexibility including a formulation that allows for comparatively straightforward hp-adaptivity and local timestepping. DG methods can be combined with positivity preserving strategies [22][23][24] or "atmosphere treatments" [25] which seek to maintain non-negative values of the pressure and density in challenging regions such as those containing high-speed astrophysical flow. DG methods are also well suited for parallelization: Their formulation in terms of l...