In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Compile | Youming
Reference-https://arcentry.com/blog/postgres-might-just-be-the-most-advanced-database-ever/ (article-Wolfram Hempel)
Transferred from | Yoda School City
As a technician, many of the arguments I've been involved in boil down to one question: try new technologies or stick to old ones? Although this question is always debated, for a few technologies, the answer is simple: both!
Postgres is such a technology. It was developed in 1982 and released in 1996, and now it is 22 years old. In many ways, however, it is still a very modern database management system. It not only has an incredible feature set, but also goes beyond a simple database to evolve into a fully programmable integrated data environment with its own programming language PL/pgSQL.
There are countless wonders about Postgres, but in this article, I will only clarify five remarkable features that make it the choice of the Arcentry backend:
Pub/Sub message
Postgres can be used as a clustered message agent. Of course, it doesn't provide the feature set of dedicated solutions like RabbitMQ or Kafka, but integrating event-based messaging into a broader data context makes Postgres valuable. For example, this pattern is used in the internal version of Arcentry. We used Postgres-Messaging as the backbone of the scale-out deployment:
Whenever a user makes changes to any chart, Arcentry makes a request to the server, which merges the update into the binary JSON document stored in Postgres. Once the write is acknowledged, the trigger triggers an event subscribed to by all other connected servers and in turn forwards the update to its active user.
This provides us with an easy way to provide horizontally scalable real-time updates with strong consistency-all from a single external dependency.
Trigger
A trigger is a function that runs before or after manipulating the data. Using triggers is a great way to build validation, transformation, and derived logic directly in the database.
Triggers also provide an easy way to extend the functionality of existing databases. For example, an immutable audit log that enables customers to make changes to the Arcentry account table.
Instead of writing an additional query or service interface, we write a trigger directly in Postgres that runs as soon as a row in the account table changes, writes a copy of the current row in a separate audit table with a timestamp and the userID that initiates the change.
External data wrapper
Sometimes, whether querying a user's account or storing document data in an established structure, it is a good idea to integrate the user's existing database into Arcentry. Of course, there are many ways to achieve this, but one particularly convenient way is to use Postgres's external data wrapper Foreign Data Wrappers (https://wiki.postgresql.org/wiki/Foreigndatawrappers).
An external data wrapper is an interface that connects Postgres to any number of other data sources, such as MongoDB,Redis,MySQL or even CSV or JSON files. In this way, for query statements, these data sources become normal Postgres tables that can be joined, searched, referenced, and become an integral part of the database-- making Postgres a powerful integration tool and a potential access point for data lake settings.
JSONB
Many databases are in JSON format or their binary representation, and JSONB storage is-- well, it's really nothing new. But the operational capabilities of Postgres make JSON a first-class citizen in a table-based relational database. Whether the output query result is a nested JSON structure or a dynamic parsing JSON,Postgres can be handled gracefully.
Plug-in
There are always times when neither PL/pgSQL nor triggers can meet the demand. For many other databases, that may be it. But Postgres is extremely scalable. It's not easy to write Postgres plug-ins (believe me, I've tried), but fortunately, a lot of great engineers have done the development work for us and built a lot of plug-ins that have transformed Postgres.
For example, the Postgres server into a full-fledged geographic information system (GIS) spatial database PostGIS.
Or PostlineDB turns Postgres into a time series storage / stream processor.
There are also many plug-ins, tools and graphical interfaces, stamping https://github.com/dhamaniasad/awesome-postgres can be seen at a glance.
old but still vigorous in mind and body
What makes all this really remarkable is the model set by Postgres: it is almost impossible for any software to survive for 22 years-but the core of constant focus and decades of improvement, improvement, and optimization is strong enough to build a technology that matters both now and in the 1990s.
-end-
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.