Recent advances in astronomy have shifted observational astronomy toward data-driven astronomy, with an exponential increase in data associated with celestial objects. If we can handle this massive amount of quickly changing data, we will be able to detect galaxy clusters, revealing a wealth of vital information about the evolution of the universe. In this paper, we have proposed a novel clustering technique that can handle massive amounts of rapidly changing data in real time. In this clustering technique, we have used 3D sparse matrix where each cell of the 3D matrix can be used to locate/identify a neighbor against the central galactic coordinate. In our investigation, we also used HDF5 to store and organize the discovered galaxy clusters so that we didn’t have to re-run our algorithm every time a new coordinate was encountered. Following preparation, the astronomical data containing the galactic coordinates RA, DEC, and radial distance obtained from redshift is input into our developed algorithm to identify, store, and depict the galaxy clusters.