简体   繁体   English

Java SMPP 库比较

[英]Java SMPP library comparison

We're about to begin a project which requires the use of SMPP as the primary integration exchange channel.我们即将开始一个项目,该项目需要使用 SMPP 作为主要的集成交换渠道。 Now since SMS isn't necessarily core to our business, I'd like to use an SMPP library for Java that will be the least hassle.现在,由于 SMS 不一定是我们业务的核心,我想使用 Java 的 SMPP 库,这将是最不麻烦的。 Aside from riding on the actual protocol, its unlikely we'll need fancier abilities or to ever tweak under the hood.除了使用实际协议之外,我们不太可能需要更高级的能力或在引擎盖下进行调整。

To that end, I've shortlisted some of the possible options that we have:为此,我列出了一些我们拥有的可能选项:

  • Logica's Open SMPP Logica 的开放式 SMPP
  • Apache's Camel阿帕奇的骆驼
  • JSMPP JSMPP
  • Twitter's Cloudhopper Twitter 的 Cloudhopper

Can someone who's more experienced in their uses throw some of their experiences my way ?那些在使用方面更有经验的人可以用我的方式抛出一些他们的经验吗?

EDIT: Just to give scope to the use cases, we'll be both sending and receiving SMS'es so the library should hopefully make life easy with both client action and also server listener implementation.编辑:只是为了给用例提供范围,我们将同时发送和接收 SMS,因此该库应该希望通过客户端操作和服务器侦听器实现让生活变得轻松。

I have used both jsmpp & cloudhopper-smpp for separate projects which involved sending and receiving SMS's over smpp in circumstances which involved: 我已经将jsmppcloudhopper-smpp用于单独的项目,这些项目涉及在涉及的情况下发送和接收SMS的smpp:

  • Receiving medium-high number of MOs. 接收中高数量的MO。
  • Sending high number of MTs (upto 70/second). 发送大量MT(最高70 /秒)。

Both the libraries fared well, and IMO jsmpp is more user-friendly to jump in and start coding right away. 两个库都表现良好,IMO jsmpp更加用户友好,可以立即进入并开始编码。 But i had came across a few bugs while using the latest version from github, which still remain unfixed. 但是在使用github的最新版本时我遇到了一些错误,但仍然没有修复。

After having used cloudhopper, i reckon it is well worth the learning curve, which is a wee bit steep compared to jsmpp(subjective). 使用cloudhopper之后,我认为学习曲线非常值得,与jsmpp(主观)相比,它有点陡峭。

Just an updated to what I finally decided (and how libraries reviewed): 只是更新了我最终决定的内容(以及库如何审核):

  1. Logica: Seems promising but I was concerned about the lack of updates/activeness of the community in general. Logica:看起来很有希望,但我担心社区缺乏更新/活跃性。 The last meaningful build was yonks ago so not really an investment I wanted to make. 最后一个有意义的构建是yonks前,所以不是我想做的投资。

  2. Apache Camel: We started off using this but there were some limitations to their library (we needed to insert custom heads to our SMPP packets). Apache Camel:我们开始使用它,但是它们的库有一些限制(我们需要在SMPP数据包中插入自定义头)。 To be fair they were fairly prompt in responding to issues on their forums but their build cycles took a little too long for my sprints, so we scratched this. 公平地说,他们在论坛上回答问题的时候非常迅速,但是他们的冲刺时间太长了,所以我们抓住了这个问题。

  3. JSMPP: This is the one we ended up using. JSMPP:这是我们最终使用的那个。 Was pretty straightforward overall tho it did feel like it expected you to already have a fairly good idea of SMPP in general. 整体而言非常简单,因为它确实让人觉得你已经对SMPP有了一个相当不错的想法。 Things are in staging so I can't tell you how it performs under production load. 事情正在进行中,所以我无法告诉你它在生产负荷下的表现如何。 Will update when it goes live. 它会在上线时更新。

  4. Cloudhopper: To be honest this was the one I was keen to use but more because like any geek I wanted to jump on the shiniest newest toy available. Cloudhopper:说实话,这是我热衷于使用的那个,但更多的是因为像任何一个怪人我想跳上最闪亮的最新玩具。 I didn't really get adequate responses to any queries we made from the off so was apprehensive to get on board. 我没有得到足够的回应,我们从关闭的任何问题,所以有点担心加入。 No reason to adopt a library that will require me to wade thru their codes when other more documented options were available. 没有理由采用一个库,当需要其他更多记录的选项时,这个库需要我通过他们的代码。

I am currently implementing a SMPP solution over Java using Logica's library. 我目前正在使用Logica的库实现一个基于Java的SMPP解决方案。 It is very easy to use. 这是非常容易使用。 The following information states the result of the tests: 以下信息说明了测试结果:

Application: Enterprise Java Beans Application deployed in Glassfish 3.1.2.2 应用程序:在Glassfish 3.1.2.2中部署的Enterprise Java Bean应用程序
Language: Java (using JMS) 语言:Java(使用JMS)
Library: Logica SMPP (version 1.3) 图书馆:Logica SMPP(版本1.3)
Origin (ESME): localhost Origin(ESME):localhost
Destination (SMSC): Logica SMSC simulator at development server (hosted in Amazon Web Services) 目的地(SMSC):开发服务器上的Logica SMSC模拟器(托管在Amazon Web Services中)
Type: Transciever Asynchronous 类型:Transciever Asynchronous
Avg sending rate (80%): 246 msg / sec 平均发送率(80%):246 msg /秒
Low sending rate (15%): 50 msg / sec 低发送率(15%):50 msg / sec
High sending rate (5%): 255 msg /sec 高发送速率(5%):255 msg / sec

It is very efficient as long as you stick to the asynchronous mode. 只要你坚持异步模式,它就非常有效。 If you need to keep a correlation between the message and its response use the "sequence number" that is both in the message and the response. 如果需要保持消息与其响应之间的关联,请使用消息和响应中的“序列号”。

Our SMSC was written on Logica SMPP (v 1.3), it still works really well with enterprise loadings. 我们的SMSC是在Logica SMPP(v 1.3)上编写的,它仍然适用于企业负载。 There has been only a few small issues regarding the library mainly with message_payload, honestly I don't remember other issues. 关于图书馆只有一些小问题主要是使用message_payload,老实说,我不记得其他问题。 But it's easy to repair because it's an opensource product. 但它很容易修复,因为它是一个开源产品。

Although I personally trust logica's sources, for small clients I use jsmpp. 虽然我个人信任logica的来源,但对于小型客户我使用jsmpp。 I agree with @Farhan that it's a bit more user friendly and developing of a simple client takes less time. 我同意@Farhan的说法,它更加用户友好,开发简单的客户端需要更少的时间。

I've used both jsmpp and smppapi and found the latter much nicer because jsmpp had only synchronous blocking mode at that time (2010) - not sure if that's still the case. 我已经使用了jsmpp和smppapi ,发现后者更好,因为当时jsmpp只有同步阻塞模式(2010) - 不确定是否仍然如此。

The blocking nature of jsmpp become source of big problems when the SMPP server I was connecting to were experiencing some performance problems and responded slower than usual. 当我连接的SMPP服务器出现一些性能问题并且响应速度比平常慢时,jsmpp的阻塞性质成为大问题的根源。 Suddenly I found all of my threads to be waiting for responses. 突然间,我发现我所有的线程都在等待回复。 Migration to smppapi solved the problems obviously. 迁移到smppapi显然解决了这些问题。

I've used Logica SMPP for a production project. 我已经将Logica SMPP用于生产项目。 It's not actively maintained anymore and there are a few inherent bugs which resulted in having to produce workarounds or actually forking the codebase to fix. 它不再被主动维护,并且有一些固有的错误导致必须产生变通方法或实际上要求代码库修复。 Having said that, I've found the API to be very stable and performant (300msg/s). 话虽如此,我发现API非常稳定和高性能(300msg / s)。

I've briefly looked at JSMPP and it has a much nicer API than Logica although there seems to be a large number of defects have not been fixed despite there being on the issue list for a long time. 我简要地看了一下JSMPP,它有一个比Logica好得多的API,尽管很长一段时间内问题清单上都没有修复大量的缺陷。

Just came across Cloudhopper SMPP which seems to be coded in a more up to date style but again it needs more examples. 刚刚遇到Cloudhopper SMPP似乎是以更新的风格编码,但它又需要更多的例子。 Having to chore through the code base is not attractive. 不得不通过代码库进行编程并不具吸引力。 Examples on gituhub are getting better though. 关于gituhub的例子越来越好了。

Cloudhopper is the best choice, Apache's Camel is also good but it's a very big project that has many interfaces to pdf, salesforce.... that you don't need. Cloudhopper是最好的选择,Apache的Camel也很好,但它是一个非常大的项目,有许多你不需要的pdf,salesforce ....的接口。 Other project is not updated to date. 其他项目迄今未更新。 Cloudhopper is maintaining by Telestax and they add some useful features and look like they will give strong support it in future Cloudhopper正在通过Telestax进行维护,他们添加了一些有用的功能,看起来他们将来会给予强有力的支持

Here's stack for easying config Cloudhopper https://github.com/RestComm/smpp-extensions Here's forked Cloudhopper by telestax (very up to date): https://github.com/RestComm/cloudhopper-smpp Also JainSlee Resource Adapter for whom who's working in telecom field https://github.com/RestComm/jain-slee.smpp 这里是用于简化配置的堆栈Cloudhopper https://github.com/RestComm/smpp-extensions这是通过telestax分叉的Cloudhopper(非常新闻): https//github.com/RestComm/cloudhopper-smpp还有JainSlee资源适配器谁在电信领域工作https://github.com/RestComm/jain-slee.smpp

presently I am using JSMPP and i found it's okay so far.目前我正在使用 JSMPP,我发现到目前为止还可以。 Cloudhopper seems easier of the lot but i ended up with JSMPP and also found out that JSMPP is also at the heart of Apache camel implementation i might be wrong though. Cloudhopper 似乎更容易,但我最终使用了 JSMPP,并且还发现 JSMPP 也是 Apache camel 实现的核心,但我可能是错的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM