0. 前言
嗨,大家好呀!最近我跟一个学摄影的高中朋友突然聊起天,发现摄影真的是一门我根本无法达到的艺术,我作为普通人,那只能说叫做拍照,哈哈。但给我更大的启发的是,这位朋友同时对星球星际也特别感兴趣,但正因为人类对宇宙的探索是十分有限的,我们即使通过高端的望远镜也只能领略到浩瀚宇宙的一角。有时候想到,宇宙中数十亿的星球聚集在一起,缩小到一定的比例,不就像一张由各个节点组成的网络吗?现实中我们的互联网、人体中的细胞、交际关系等,不都是这样吗?
这个时候我就联想到,那如果我们做开发的时候,对于这种“关系网络”,应该如何更加优雅地去存储呢?关系型数据库显然不够优雅,毕竟谁也不想通过数量庞大地关系表来表示错综复杂的数据,而且也不直观。
正因为如此,亚马逊推出了一款图数据库,用于解决这一问题。这就是大名鼎鼎的 Amazon Neptune。Neptune 译为海王星,可以说是非常的形象了。更为重要的是,Amazon Neptune 还支持免费试用,并且还提供了上手教程。只需要戳一下这里,就能开始使用了。
https://aws.amazon.com/cn/getting-started/databases/get-started/?nc=sn&loc=4&trk=fab55528-7c2e-4517-b90e-65b760ecfc1c&sc_channel=el
而且亚马逊这次提供的产品不仅仅只是 Neptune,亚马逊云科技提供了100余种产品免费套餐。其中,计算资源Amazon EC2首年12个月免费,750小时/月;存储资源 Amazon S3 首年12个月免费,5GB标准存储容量;数据库资源 Amazon RDS 首年12个月免费,750小时;Amazon Dynamo DB 25GB存储容量 永久免费。这边是入口:https://aws.amazon.com/cn/free/?nc2=h_ql_pr_ft&all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all&trk=e0213267-9c8c-4534-bf9b-ecb1c06e4ac6&sc_channel=el
1. Amazon Neptune 是什么?
首先,我们来看亚马逊官方对 Amazon Neptune 给的英文定义:
Amazon Neptune is a fast, reliable, fully managed graph database service that makes it easy to build and run applications that work with highly connected datasets. The core of Neptune is a purpose-built, high-performance graph database engine. This engine is optimized for storing billions of relationships and querying the graph with milliseconds latency. Neptune supports the popular graph query languages Apache TinkerPop Gremlin, the W3C’s SPARQL, and Neo4j’s openCypher, enabling you to build queries that eff