The growing popularity of electric vehicles in the United States requires an ever-expanding infrastructure of commercial DC fast charging stations. The U.S. Department of Energy estimates 33,355 publicly available DC fast charging stations as of September 2023. Range anxiety is an important impediment to the adoption of electric vehicles and is even more relevant in underserved regions in the country. The peer-to-peer energy marketplace helps fill the demand by allowing private home and small business owners to rent their 240 Volt, level-2 charging facilities. The existing, publicly accessible outlets are wrapped with a Cloud-connected microcontroller managing security and charging sessions. These microcontrollers act as Edge devices communicating with a Cloud message broker, while both buyer and seller users interact with the framework via a web-based user interface. The database storage used by the marketplace framework is a key component in both the cost of development and the performance that contributes to the user experience. A traditional storage solution is the SQL database. However, difficulty in scaling across multiple nodes and cost of its server-based compute have resulted in a trend in the last 20 years towards other NoSQL, serverless approaches. In this study, we evaluate the NoSQL vs. SQL solutions through a comparison of Google Cloud Firestore and Cloud SQL MySQL offerings. The comparison pits Google's serverless, document-model, non-relational, NoSQL against the server-base, table-model, relational, SQL service. The evaluation is based on query latency, flexibility/scalability, and cost criteria. Through benchmarking and analysis of the architecture, we determine whether Firestore can support the energy marketplace storage needs and if the introduction of a GraphQL middleware layer can overcome its deficiencies.
翻译:随着电动汽车在美国的日益普及,覆盖范围更广的商业直流快充站基础设施需求也在不断增长。美国能源部估计,截至2023年9月,全美共有33,355个公共直流快充站。里程焦虑是阻碍电动汽车普及的重要因素,在美国服务欠缺地区这一问题尤为突出。点对点能源市场通过允许私人住宅和小型企业主出租其240伏二级充电设施来填补需求缺口。现有的公共可用充电接口被封装在云端连接的微控制器中,用于管理安全与充电会话。这些微控制器作为边缘设备与云端消息代理进行通信,同时买家和卖家用户通过基于网页的用户界面与框架交互。市场框架采用的数据库存储既是开发成本的关键组成部分,也是影响用户体验性能的重要环节。传统存储方案采用SQL数据库,但跨多节点扩展的困难以及基于服务器的计算成本,导致过去20年间逐渐转向无服务器的NoSQL方案。本研究通过对比谷歌云Firestore与Cloud SQL MySQL服务,评估NoSQL与SQL解决方案的优劣。该对比将谷歌的无服务器文档模型非关系型NoSQL与基于服务器的表模型关系型SQL服务进行对标,评估基于查询延迟、灵活性/可扩展性和成本三个维度。通过基准测试与架构分析,我们确定了Firestore能否支撑能源市场的存储需求,并评估引入GraphQL中间层能否弥补其不足。