tomcat 解析war_在WAR解析StackMob和Kinvey

tomcat 解析war

In the first part of this series we covered basic features of backend as a service provider. In this part, we will have a look at three major services (Parse, StackMob and Kinvey) and compare them. Each of these services have their own unique strengths. Based on your preference, you can choose one of them. The three BaaS providers we will compare are Kinvey, Parse and StackMob alphabetically.

在本系列的第一部分中 ,我们介绍了后端作为服务提供者的基本功能。 在这一部分中,我们将研究三种主要服务(Parse,StackMob和Kinvey)并进行比较。 这些服务中的每一个都有自己独特的优势。 根据您的偏好,您可以选择其中之一。 我们将按字母顺序比较的三个BaaS提供程序是KinveyParseStackMob

It’s safe to assume for now that all three meet the standard BaaS criteria (iOS, Android and JavaScript SDKs, etc.) I wont be diving into those sections unless there is something worth mentioning.  It’s also worth bearing in mind I come from a very strong web background so my primary use of these tools has been in either PhoneGap/Cordova based apps or as a backend to an ajax based web app.  This means I may miss subtleties in the native app SDKs – you are welcome to comment with valuable inputs.

现在可以安全地假设所有三个都满足标准的BaaS标准(iOS,Android和JavaScript SDK等)。除非有值得一提的内容,否则我将不涉及这些部分。 还应该牢记,我来自非常强大的Web背景,因此我主要在基于PhoneGap / Cordova的应用程序中使用这些工具,或者将其用作基于Ajax的Web应用程序的后端。 这意味着我可能会错过本机应用程序SDK中的细微之处-欢迎您提出宝贵意见。

解析 (Parse)

Currently, Parse is one of the most well known service providers among all Baas providers. The feature set is fairly vanilla and is aimed squarely at the mobile space (there are plenty of unofficial wrappers around the ReST API for all but the most obscure languages) and lacks some of the bells and whistles that for ex. StackMob has but keeps the feature set lean and neat.

目前,Parse是所有Baas提供程序中最知名的服务提供程序之一。 该功能集非常原始,并且直接针对移动空间(除了最晦涩的语言外,ReST API周围有很多非官方的包装器),并且缺少一些以前的花哨的功能。 StackMob具有但保持功能集精简的功能。

数据存储 (Data Storage)

Parse provides single instance data store which is unversioned and schema-less (no switching between test and production – though you could theoretically use separate apps for that) .  The schema is constantly adaptive that means when you send objects with a new property, it just adds another column to the collection to support that property.  This is useful  especially when data is sent in the tightly controlled environment of a mobile app and strongly typed classes. Parse supports storing binary formats as well (stored on Amazons S3) and integration with uploading and storing is built right into the SDKs.

解析提供了无实例且无模式的单实例数据存储(虽然理论上可以为此使用单独的应用程序),但无需在测试和生产之间进行切换。 模式是不断适应的,这意味着当您发送带有新属性的对象时,它只会向集合中添加另一列以支持该属性。 当在移动应用程序的严格控制环境和强类型类中发送数据时,这特别有用。 Parse还支持存储二进制格式(存储在Amazon S3上),并且直接在SDK中内置了与上传和存储的集成。

UI控件 (UI Controls)

One of unique things about Parse iOS SDK is Parse powered UI components. The common ViewControllers are  for signup/login, for collection backed tables (with querying built in) and for displaying images are available OOTB.

Parse iOS SDK的独特之处之一是Parse支持的UI组件。 常见的ViewController用于注册/登录,用于支持收藏的表(内置查询)和用于显示图像,这些都是可用的OOTB。

iOS SDK is rich in Parse powered UI components which makes Parse unique. The common ViewControllers are  for signup/login, for collection backed tables (with querying built in) and for displaying images stored in Parse. This controllers makes  Parse, a tempting service for a weekend hack.

iOS SDK包含丰富的Parse驱动的UI组件,这使Parse变得独一无二。 常见的ViewController用于注册/登录,用于支持收藏的表(内置查询)以及用于显示存储在Parse中的图像。 该控制器使Parse成为周末黑客的诱人服务。

价钱 (Pricing)

Pricing for Parse is costed on a per account basis rather on typical per-app basis and one million API calls per month for free. However, Parse becomes expensive when your app/apps starts creating API calls in bulk. The gap between the two main pricing tiers in Parse is very large.  You either pay nothing or you pay around $200 per month but wait, before you choke on whatever you may be eating, when limit is reached, you don’t have to pay $200 per month fee, its just  around 7 cents per 1000 API calls you need to pay. So unless app is constantly hitting around the 4 million mark every month you should be fine. Just be ready to pay if your app makes it big :)

Parse的定价是按每个帐户计费,而不是按典型的按应用计费,每月免费调用一百万次API。 但是,当您的一个或多个应用开始批量创建API调用时,解析会变得很昂贵。 Parse中两个主要定价层之间的差距非常大。 您要么不支付任何费用,要么每月支付200美元左右,但是请等一下,在您决定吃什么之前,在达到限额后,您不必每月支付200美元的费用,即每1000个API调用仅花费7美分你需要付钱。 因此,除非应用程序每月不断达到400万大关,否则您应该没事。 如果您的应用程序变得很大,请准备付款:)

StackMob (StackMob)

StackMob offers native SDKs for iOS and Android and in addition offers lot more features other than basic BaaS features. Lets have a look on both typical BaaS features of StackMob and addition features it provides.

StackMob提供了适用于iOS和Android的本地SDK,此外还提供了除基本BaaS功能以外的更多功能。 让我们看一下StackMob的典型BaaS功能及其提供的附加功能。

数据存储 (Data Storage)

When you create a new app on StackMob you get two environments, one for development and one for production.  In development mode the data store behaves like in Parse – sending new properties into a created collection type will result in new columns in the schema.  However when you move to the production environment it becomes impossible to over-post.

在StackMob上创建新应用时,您将获得两种环境,一种用于开发,另一种用于生产。 在开发模式下,数据存储的行为类似于在Parse中–将新属性发送到已创建的集合类型中将在模式中产生新列。 但是,当您移至生产环境时,就无法过度发布。

The StackMob schema supports relationships as well.  You can use the online schema designer to define these relationships and pass in flags to API requests to pull back these relationships in the forms of nested collections.  For customers willing to pay, StackMob supports versioning of your apps API.

StackMob模式也支持关系。 您可以使用在线模式设计器定义这些关系,并将标志传递给API请求,以嵌套集合的形式拉回这些关系。 对于愿意付费的客户,StackMob支持应用程序API的版本控制。

Finally StackMob supports binary storage but unlike Parse this isn’t rolled directly into the SDKs.  Instead you can link an Amazon S3 account with StackMob and then you can upload to S3 from the SDKs.

最终,StackMob支持二进制存储,但与Parse不同,它不会直接集成到SDK中。 相反,您可以将Amazon S3帐户与StackMob关联,然后可以从SDK上传到S3。

iOS SDK核心数据 (iOS SDK Core Data)

StackMob recently announced a complete rewrite of their iOS SDK.  This rewrite has introduced Core Data integration which provides powerful mechanism for synchronisation between the device and StackMob. It also offers a very familiar interface for iOS developers used to perform powerful data binding between UI elements and data store.

StackMob最近宣布完全重写其iOS SDK。 这次重写引入了Core Data集成,该集成为设备和StackMob之间的同步提供了强大的机制。 它还为iOS开发人员提供了非常熟悉的界面,用于在UI元素和数据存储之间执行强大的数据绑定。

PaaS (PaaS)

In addition to typical BaaS features, StackMob is a PaaS for HTML5 apps. The StackMob powered apps can be hosted directly on StackMob itself. It also supports post commit hooks with GitHub which enables connecting StackMob app with a Github repository and deployment becomes as simple as pushing to a branch on GitHub.

除了典型的BaaS功能外,StackMob是HTML5应用程序的PaaS。 StackMob支持的应用程序可以直接托管在StackMob本身上。 它还支持GitHub的提交后提交钩子,使StackMob应用程序与Github存储库连接,部署变得像推送到GitHub上的分支一样简单。

自定义代码 (Custom Code)

Ability to execute custom code on server is one of the most unique features provided by StackMob. Server code can be written in Java, Clojure or Scala. Once code is compiled and packaged into JAR, you can expose it as another ReST endpoint in your application.  The contents of the JAR has access to a sandboxed environment within StackMob.  You can read and write to apps data store, make use of a logger for debug purposes and have access to an HTTP Service which gives has the ability to integrate with third party services.

在服务器上执行自定义代码的能力是StackMob提供的最独特的功能之一。 服务器代码可以用Java,Clojure或Scala编写。 将代码编译并打包到JAR中之后,您可以将其公开为应用程序中的另一个ReST端点。 JAR的内容可以访问StackMob中的沙盒环境。 您可以读写应用程序数据存储,可以使用记录器进行调试,还可以访问HTTP服务,该服务可以与第三方服务集成。

To me this is an essential feature for any service wanting to go beyond purely mobile apps.  With no access to the server in a typical BaaS system you’ll be required to implement certain business logic in your client that really doesn’t belong there.  While this is fine for mobile apps where users can simply right-click and view source, it becomes a liability for web apps where this logic can be easily circumvented.  Without checks on the server-side your data can be easily polluted.  For example, if I wanted to write an app that only accepted email addresses from a certain domain, I could write a bit of server code to validate this making it much harder to circumvent.  Further, I could also use the HTTP service available to custom code to integrate with an email service such as MailGun to send a confirmation mail – something that would otherwise require embedding all your application tokens and API keys into the client.

对我来说,这是想要超越纯移动应用程序的任何服务的基本功能。 在典型的BaaS系统中,由于无法访问服务器,因此您将需要在客户端中实施确实不属于该客户端的某些业务逻辑。 虽然这对于移动应用程序是很好的,因为用户可以简单地右键单击并查看源代码,但是对于Web应用程序来说,这很容易绕开这种逻辑,这是一个责任。 如果不检查服务器端,您的数据很容易被污染。 例如,如果我想编写一个只接受来自特定域的电子邮件地址的应用程序,则可以编写一些服务器代码来验证这一点,从而使其更难于规避。 此外,我还可以使用可用于自定义代码的HTTP服务与电子邮件服务(例如MailGun)集成,以发送确认邮件-否则,这需要将所有应用程序令牌和API密钥嵌入客户端。

While you could achieve all of this by simply hosting your own service elsewhere, the all-in-one approach of StackMob certainly helps reduce friction and speed productivity.

尽管您可以通过在其他地方简单地托管自己的服务来实现所有这些目的,但是StackMob的多合一方法无疑有助于减少摩擦并提高生产率。

价钱 (Pricing)

StackMob’s pricing is a little more granular and it seems to be a more expensive option on the surface, this isn’t necessarily true.  What is true is that you will start paying sooner but the price you pay rises more gradually when compared to Parse.  StackMobs pricing is calculated on a per app basis (rather than per-account) and this makes pricing even more granular if you are supporting more than one app. Again, between the different pricing tiers you have the pay-as-you-go option.

StackMob的定价更为精细,表面上似乎是更昂贵的选择,但这不一定是正确的。 确实是,您将更早开始付款,但是与Parse相比,您支付的价格会逐渐上涨。 StackMobs的定价是基于每个应用程序(而不是每个帐户)计算的,如果您支持多个应用程序,这将使定价更加精细。 同样,在不同的定价层之间,您可以选择按需付费。

金威 (Kinvey)

Full disclosure – while I have known about Kinvey for as long as Parse and StackMob I have much less real experience with it.  On the surface it seems like a fairly vanilla offering but there are some very interesting reasons to look into Kinvey.

全面披露–尽管我对Kinvey的了解只有Parse和StackMob,但我对其的实际经验要少得多。 从表面上看,这似乎是一种很原始的产品,但是有一些非常有趣的理由可以考虑Kinvey。

版本控制 (Versioning)

In ReSTful APIs, versioning is an essential feature.  When you want to release new features, versioning can help with backward compatibility and prevent breaking changes from breaking things.  Parse doesn’t support versioning and StackMob offers it at a significant premium.  With Kinvey it is just another feature and if you can predict a need for it Kinvey is certainly worth investigating.

在ReSTful API中,版本控制是一项基本功能。 当您要发布新功能时,版本控制可以帮助您实现向后兼容性,并防止破坏性更改破坏事物。 Parse不支持版本控制,而StackMob则提供了很高的溢价。 使用Kinvey,它只是另一个功能,如果您可以预测它的需求,Kinvey当然值得研究。

JS SDK离线和缓存 (JS SDK Offline and Caching)

The JavaScript SDK for Kinvey offers the ability to use caching on data retrieved from the backend.  Collections can be configured with their own internal cache by simply setting a property.  Furthermore, when you want to retrieve data from the server, specify certain caching policies such as `cachefirst` and `networkfirst` which gives you precise control over network activity.

用于KinveyJavaScript SDK提供了对从后端检索的数据使用缓存的功能。 只需设置属性,就可以使用自己的内部缓存来配置集合。 此外,当您要从服务器检索数据时,请指定某些缓存策略,例如“ cachefirst”和“ networkfirst”,这些策略可让您精确控制网络活动。

Secondly, the JavaScript SDK also offers the notion of an Offline Store.  The offline store, as the name suggests, allows you to use a local storage proxy when working with Kinvey.  All server data will be stored locally, which enables the application to work even over patchy network conditions.  What more, when connectivity is restored the SDK will transparently synchronise all offline data with the Kinvey backend.

其次,JavaScript SDK还提供了离线商店的概念。 顾名思义,离线存储使您可以在使用Kinvey时使用本地存储代理。 所有服务器数据都将存储在本地,这使应用程序甚至可以在不完整的网络条件下运行。 此外,恢复连接后,SDK将透明地将所有脱机数据与Kinvey后端同步。

价钱 (Pricing)

When compared via number of API calls over the ReST API, Kinvey is consistently the least expensive option out of the three services – sometimes by a large margin – especially when the number of API calls start hitting the 10 million mark.

通过ReST API上的API调用数量进行比较时,Kinvey始终是这三项服务中最便宜的选项-有时差距很大-尤其是当API调用数量开始达到1000万大关时。

However Kinvey actually have 2 pricing methods.  One for native apps and other for ReSTful API calls.  Native applications are costed against the number of active users per month (an active user is defined as any user that makes at least one API call in the month).  The API call approach is calculated in the same manner as Parse and StackMob but looking at the API call costings, Kinvey seems to offer the best of both Parse and Kinvey.  Firstly,you get a very generous one million API calls per month for nothing, and secondly this is costed on a per-app basis.

但是Kinvey实际上有两种定价方法。 一个用于本机应用程序,另一个用于ReSTful API调用。 本机应用程序是根据每月活动用户的数量来计算成本的(活动用户定义为每月至少调用一次API的任何用户)。 API调用方法的计算方式与Parse和StackMob相同,但从API调用成本来看,Kinvey似乎提供了Parse和Kinvey的优点。 首先,您每个月都会获得非常慷慨的一百万次API调用,而没有,其次,这是按应用收费的。

结论 (Conclusion)

Do you want to quickly build an iOS app without worrying about wiring up the data store?  Parse would fit well there.  Need to execute custom business logic?  Try StackMob.  Working to a tight budget or have a varied growth model?  Kinvey might just save you a heap of money.  This is only a small number of the factors worth considering – each platform will offer more features than anyone could possibly talk about in a single article. Simply put – there is no one-size-fits all Backend as a Service provider out there.  As with almost every technology decision choosing a BaaS service will come down to project requirements.

您是否想快速构建iOS应用程序而不必担心连接数据存储区? 解析很适合在那里。 需要执行自定义业务逻辑吗? 尝试使用StackMob。 在预算紧张的情况下工作还是拥有变化的增长模式? Kinvey可能只是为您节省了一大笔钱。 这只是一小部分值得考虑的因素–每个平台将提供比任何人在一篇文章中都无法谈论的更多功能。 简而言之,没有一个适合所有后端即服务的提供商。 几乎所有选择BaaS服务的技术决定都取决于项目要求。

翻译自: https://www.sitepoint.com/parse-stackmob-and-kinvey-at-war/

tomcat 解析war

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值