Erbix:兼容于 CommonJS 的服务端 JavaScript 主机平台

本文涉及的产品
云原生数据库 PolarDB MySQL 版,Serverless 5000PCU 100GB
简介: Erbix 为构建和部署 JavaScript 应用程序的云端平台。除了支持 RinjoJS,CommonJS 模块,PostgreSQL 外,还支持具可伸缩性的按需调配主机。 Erbix is a platform for building and deploying JavaScript applications on the Cloud.

Erbix 为构建和部署 JavaScript 应用程序的云端平台。除了支持 RinjoJS,CommonJS 模块,PostgreSQL 外,还支持具可伸缩性的按需调配主机。

Erbix is a platform for building and deploying JavaScript applications on the Cloud. It features support for RinjoJS,CommonJS modules, PostgreSQL and on-demand scalable hosting.

Erbix 近来也启动了针对JavaScript 程序的市场,提供若干教程,和两个完全用 JavaScript 写好的开源程序,以供借鉴。

Also it has recently launched a marketplace for JavaScript Apps, featuring some tutorials and two new open-source applications written completely in JavaScript.

InfoQ 就和来自 Erbix 团队的 Mihai Roman 进行了一次小型的交流,感谢他们的拨冗。

InfoQ had a small Q&A with Mihai Roman from the Erbix Team, regarding their offering:

 

InfoQ:能否介绍一下 Erbix 的构思是如何的,怎么演变为一种架构,以及其程序的结构大致如何?

InfoQ: Could you give us an architectural overview of how Erbix is setup and how an application is structured?

用户在Erbix创建、安装或租用服务端的JavaScript程序,首先要有一个Web账户。用户可以申请一个或使用OpenID来开始亦可。

各个账户之间是孤立开来的,不能直接共享资源。每个账户拥有以下的资源:

Erbix offers web accounts that can be used for creating, installing or hosting server-side JavaScript apps. Users can sign up or simply log in with OpenID to get started.

All accounts are isolated from each other and cannot share resources directly. Each account has the following resources:

  • 一个虚拟化的文件系统(用于存放 JavaScript 代码、图片的这些静态资源)a virtual file system (used for storing the JavaScript code and static resources such as images)
  • 专门的 PostgreSQL 数据库(存储程序数据)a dedicated PostgreSQL database (for storing apps data)
  • 站点列表,每个站点描述 URL 前缀路径是如何映射到条目点函数的(我们采用 CommonJS JSGI 0.3 标准作为条目点)a list of sites, each describing how URL prefix paths are mapped to JS entry point functions (we use the CommonJS JSGI 0.3 standard as entry-points).

每次请求就有一个特定的 URL,对应加载一个映射好的模块,从而就会调用 JSGI 条目点的函数。根据 CommonJS 1.0的模块规范,还可以加载别的 JavaScript 模块。

Every time a request is made for a specific URL, a mapped module is loaded and the JSGI entry point function is called. Other JavaScript modules can be loaded according to CommonJS Module 1.0 specs.

这些模块文件打包到应用程序目录下。加入到该目录下的文件就可视作为符合 CommonJS 包规范1.0的文件(application.json),打包后就可以将程序发布到 Erbix Marketplace,与大家分享成果。

Several module files can be packed into an application folder. By adding in that folder a CommonJS Packages 1.0 specs file (application.json) it can then be published to the Erbix Marketplace and shared with others.

可以通过两种方式安装 Marketplace 的程序(发布者可选择其中的一种或两种都选):

Apps from the Marketplace can be installed in two ways (the publisher has the option to choose one or both possibilities):

  • 负责文件到帐号 copy files into account
  • 直接从 Marketplace 运行程序run app directly from the Marketplace

对于没有 JavaScript 编码经验的用户,也可以快速地安装 Marketplace 的程序。程序产生的所有数据都保存在 PostgreSQL 数据库。Users with no (JavaScript) coding experience can install and run apps from the Marketplace in seconds. All the data produced by those apps resides in the account's PostgreSQL database.

 

InfoQ:若与其他常见的 JavaScript 平台去比较,如 Node.js,Akshell,你会提供哪些方面的材料支撑?How does youroffering compare to the other JavaScript platforms out there, likeNode.js, Akshell, etc.

Erbix 经过认真地考虑,才选择基于 Ringo 的 JavaScript 引擎,简单说,RingoJS乃是不错的 Mozilla RhinoJavaScript 编译器包装器。NodeJS 是 RingoJS 替选。RingoJSErbix is based on the RingoJavaScript engine, which was chosen after careful consideration; simplyput, RingoJS is a brilliant wrapper around Mozilla Rhino JavaScriptinterpreter. Node.JS is a RingoJS alternative.

技术上,Erbix 是兼容于 CommonJS 服务端 JavaScript 主机平台。我们没有限定厂商,而且从 Erbix 移植程序时候都是希望花最小的力气。用户能够导出它们的程序运行在私自的 RingoJS 主机或其他的服务端的 JavaScript 平台。。

Technically, Erbix is a CommonJS compliant server-side JavaScript hosting platform. There's no vendor lock-in and minimal to none effort is necessary to port apps to and from Erbix. Users will be able to export their apps on privately hosted RingoJS or other server-side JavaScript platforms.

不同于 Akshell 或 AppJet(现在由 JGate 寄存),Erbix 提供创建真正成熟 Web 程序的工具。专设有 PostgreSQL 数据库可访问,表示可以通过 SQL console 或代码的方式达到 SQL 全面的支持,不得不说,这是 Erbix 才有的功能。

Unlike Akshell or AppJet (currently hosted by JGate), Erbix provides the tools to create fully fledged web applications. The dedicated PostgreSQL database is accessible by the means of an SQL console or programaticaly with full SQL support; a feature found only in Erbix.

InfoQ: Erbix 中,开发、调试、测试、部署和监控一个程序其典型的流程大概如何呢?What is the typical workflow for developing, debugging, testing, deploying and monitoring an app in Erbix?

可以通过在线编辑器或上传轻松创建文件和文件夹。文件夹可以以 .zip 或者 .tat.gz 的形式上传或下载。未来加入源码的版本控制功能。所以用户既可以在 Erbix.com 的在线环境中创建程序,也可以在离线的状态下,利用 IDE 完成。

Files and folders can be created using the online editor or can be uploaded easily. Folders can be uploaded/downloaded from/to a .zip or .tar.gz archive. Future source versioning support may be added. So users can choose to create the apps online on Erbix.com or offline in their IDE of choice.

通过映射URL前缀到JSGI条目点函数,应用程序可以立刻进行部署。

Apps are deployed instantly by mapping an URL prefix to the JSGI entry point function.

要调试或监控的话,单元测试和 logging 模块准备可用。我们在改善这些功能和模块。

Unit testing and logging modules are available for debugging and monitoring purposes. We are currently working on improving these features/modules.

InfoQ: Erbix 适合拿来做什么呢,您看到了哪种用户案例?What are the common use cases you see Erbix being more suitable for?

对于小型企业创建或安装程序,Erbix 十分适合;对于开发者和消费者,Erbix 也很友好:我们为开发者提供极具生产力的工具(Marketplace、JS寄存主机、浏览器编辑器)来创建您的程序。于消费者而言,他们可以轻松地从 Marketplace 挑选并安装应用程序,从而保持控制属于他们的 PostgreSQL 账号中数据内容。

结合当前的服务端JavaScript生态而言,我们觉得Erbix将是测试、推广、分享服务端JavaScript程序的优秀不二的解决方案。

Erbix is a great environment to create or install apps for small businesses. Erbix is both developer and consumer friendly: we offer to developers excellent productivity tools (marketplace, JS hosting, browser editor) for creating great apps; the customers can easily install the apps from the marketplace and keep control of their data in their own PostgreSQL account.

Given the current status for the server-side JavaScript, we consider Erbix to be the best solution for testing, promoting and sharing server-side JavaScript apps.

InfoQ: 当前服务到了什么的状态,以及将来来说,会告诉我们什么的线路图?What is the current status of the service and what is your roadmap for the future?

我们现在公测 beta 之中。每一位有 OepnID 的用户可以享有我们的服务。好比运行着的 www.erbix.com 则是一个 Erbix 程序,还有两个通过在线编辑器构建的示范程序,而且我们打算下 次 major 发布的时候,就可摆脱 beta。

We are currently in open beta testing. Everyone can log in with OpenID and start using the service.  We are running www.erbix.com as an Erbix app, we've built two apps by only using the online editor and we expect to get out of beta in the next major release.

我们正在改进平台的以下几个方面:We are working on improving many aspects of the platform:

  • 文档。documentation
  • 可用性(为非技术用户感觉更直观)。usability (make it more intuitive for non technical users)
  • 自定义域名的 UI 支持。UI support for custom domain names
  • 更好的动态资源调配(针对高峰期)。better dynamic resource scaling (handle traffic peaks)
  • 监视/统计。monitoring/statistics

同时,我们团队还有人负责开发现成可用的程序,发布到 Marketplace,让人人去用或者客制化。Meanwhile, part of ourteam will develop production-ready apps that will be published on theMarketplace for everyone to use and customize.

Erbix 是一系列 JavaScript 云端平台中的一员,过去几个月不断出现这些平台,包括 Akshell,曾经由 InfoQ 报导过。

The Erbix offering is one of a series of JavaScript Cloud hosting platforms that have emerged in the last months, such asAkshell, which has been covered by InfoQ.

你在 InfoQ 这儿,找到有关 JavaScript,Node.js 和 CommonJS 更多的信息。

You can find more information regarding JavaScript,Node.js andCommonJS, right here on InfoQ!

相关实践学习
使用PolarDB和ECS搭建门户网站
本场景主要介绍基于PolarDB和ECS实现搭建门户网站。
阿里云数据库产品家族及特性
阿里云智能数据库产品团队一直致力于不断健全产品体系,提升产品性能,打磨产品功能,从而帮助客户实现更加极致的弹性能力、具备更强的扩展能力、并利用云设施进一步降低企业成本。以云原生+分布式为核心技术抓手,打造以自研的在线事务型(OLTP)数据库Polar DB和在线分析型(OLAP)数据库Analytic DB为代表的新一代企业级云原生数据库产品体系, 结合NoSQL数据库、数据库生态工具、云原生智能化数据库管控平台,为阿里巴巴经济体以及各个行业的企业客户和开发者提供从公共云到混合云再到私有云的完整解决方案,提供基于云基础设施进行数据从处理、到存储、再到计算与分析的一体化解决方案。本节课带你了解阿里云数据库产品家族及特性。
目录
相关文章
|
2月前
|
JSON JavaScript 前端开发
JS服务端技术—Node.js知识点
本篇文章是我开始系统学习Node.js的一些笔记。如果文中阐述不全或不对的,多多交流。
62 0
JS服务端技术—Node.js知识点
|
1月前
|
JavaScript 前端开发 Java
如何使用内网穿透实现远程公网访问windows node.js的服务端
如何使用内网穿透实现远程公网访问windows node.js的服务端
|
6月前
|
JavaScript 数据安全/隐私保护 Python
JS逆向 -- 某平台登录加密分析
JS逆向 -- 某平台登录加密分析
77 0
|
2月前
|
JavaScript 前端开发 网络协议
轻松搭建远程Node.js服务端,让你的应用在公共网络中畅行无阻!
Node.js 是能够在服务器端运行 JavaScript 的开放源代码、跨平台运行环境。Node.js 由 OpenJS Foundation(原为 Node.js Foundation,已与 JS Foundation 合并)持有和维护,亦为 Linux 基金会的项目。Node.js 采用 Google 开发的 V8 运行代码,使用事件驱动、非阻塞和异步输入输出模型等技术来提高性能,可优化应用程序的传输量和规模。这些技术通常用于资料密集的即时应用程序。
|
5月前
|
资源调度 JavaScript 前端开发
软件测试|Yarn安装指南:在不同平台上快速启动JavaScript项目
软件测试|Yarn安装指南:在不同平台上快速启动JavaScript项目
74 0
|
6月前
|
JavaScript 算法 数据安全/隐私保护
JS逆向 -- 某平台登录算法分析(RSA加密)
JS逆向 -- 某平台登录算法分析(RSA加密)
70 0
|
前端开发 JavaScript Java
使用Springboot 2.7+Websocket+js实现服务端消息实时推送
使用Springboot 2.7+Websocket+js实现服务端消息实时推送
使用Springboot 2.7+Websocket+js实现服务端消息实时推送
|
8月前
|
JavaScript 前端开发 Python
基于Flask创建Python服务端,并调用JavaScript客户端
基于Flask创建Python服务端,并调用JavaScript客户端
|
JavaScript
node.js: ws服务端和WebSocket客户端交互示例
node.js: ws服务端和WebSocket客户端交互示例
407 0
|
11月前
|
存储 JavaScript 前端开发
(小说版)【简历优化平台-4】js魔改文件上传,django轻松接收
(小说版)【简历优化平台-4】js魔改文件上传,django轻松接收