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

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!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值