Pros and Cons of using REST over JMS (and other technologies)

Hey all,
I am working on a project where we were using JMS initially to send messages between servers. Our front end servers have a RESTful API and use JEE6, with EJB 3.1 entity beans connected to a mysql database and so forth. The back end servers are more like "agents" so to speak.. we send some work for them to do, they do it. They are deployed in GlassFish 3.1 as well, but initially I was using JMS to listen to messages. I learned that JMS onMessage() is not threaded, so in order to facilitate handling of potentially hundreds of messages at once, I had to implement my own threading framework. Basically I used the Executor class. I could have used MDBs, but they are a lot more heavyweight than I needed, as the code within the onMessage was not using any of the container services.
We ran into other issues, such as deploying our app in a distributed architecture in the cloud like EC2 was painful at best. Currently the cloud services we found don't support multi-cast so the nice "discover" feature for clustering JMS and other applications wasn't going to work. For some odd reason there seems to be little info on building out a scalable JEE application in the cloud. Even the EC2 techs, and RackSpace and two others had nobody that understood how to do it.
So in light of this, plus the data we were sending via JMS was a number of different types that had to all be together in a group to be processed.. I started looking at using REST. Java/Jersey (JAX-RS) is so easy to implement and has thus far had wide industry adoption. The fact that our API is already using it on the front end meant I could re-use some of the representations on the back end servers, while a few had to be modified as our public API was not quite needed in full on the back end. Replacing JMS took about a day or so to put the "onmessage" handler into a REST form on the back end servers. Being able to submit an object (via JAXB) from the front servers to the back servers was much nicer to work with than building up a MapMessage object full of Map objects to contain the variety of data elements we needed to send as a group to our back end servers. Since it goes as XML, I am looking at using gzip as well, which should compress it by about 90% or so, making it use much less bandwidth and thus be faster. I don't know how JMS handles large messages. We were using HornetQ server and client.
So I am curious what anyone thinks.. especially anyone that is knowledgeable with JMS and may understand REST as well. What benefits do we lose out on via JMS. Mind you, we were using a single queue and not broadcasting messages.. we wanted to make sure that one and only one end server got the message and handled it.
Thanks..look forward to anyone's thoughts on this.

851827 wrote:
Thank you for the reply. One of the main reasons to switch to REST was JMS is strongly tied to Java. While I believe it can work with other message brokers that other platforms/languages can also use, we didn't want to spend more time researching all those paths. REST is very simple, works very well and is easy to implement in almost any language and platform. Our architecture is basically a front end rest API consumed by clients, and the back end servers are more like worker threads. We apply a set of rules, validations, and such on the front end, then send the work to be done to the back end. We could do it all in one server tier, but we also want to allow other 3rd parties to implement the "worker" server pieces in their own domains with their own language/platform of choice. Now, with this model, they simply provide a URL to send some REST calls to, and send some REST calls back to our servers.well, this sounds like this would be one of those requirements which might make jms not a good fit. as ejp mentioned, message brokers usually have bindings in multiple languages, so jms does not necessarily restrict you from using other languages/platforms as the worker nodes. using a REST based api certainly makes that more simple, though.
As for load balancing, I am not entirely sure how glassfish or JBoss does it. Last time I did anything with scaling, it involved load balancers in front of servers that were session/cookie aware for stateful needs, and could round robin or based on some load factor on each server send requests to appropriate servers in a cluster. If you're saying that JBoss and/or GlassFish no longer need that.. then how is it done? I read up on HornetQ where a request sent to one ip/hornetq server could "discover" other servers in a cluster and balance the load by sending requests to other hornetq servers. I assume this is how the JEE containers are now doing it? The problem with that to me is.. you have one server that is loaded with all incoming traffic and then has to resend it on to other servers in the cluster. With enough load, it seems that the glassfish or jboss server become a load balancer and not doing what they were designed to do.. be a JEE container. I don't recall now if load balancing is in the spec or not..I would think it would not be required to be part of a container though, including session replication and such? Is that part of the spec now?you are confusing many different types of scaling. different layers of the jee stack scale in different ways. you usually scale/load balance at the web layer by putting a load balancer in front of your servers. at the ejb layer, however, you don't necessarily need that. in jboss, the client-side stub for invoking remote ejbs in a cluster will actually include the addresses for all the boxes and do some sort of work distribution itself. so, no given ejb server would be receiving all the incoming load. for jms, again, there are various points of work to consider. you have the message broker itself which is scaled/load balanced in whatever fashion it supports (don't know many details on actual message broker impls). but, for the mdbs themselves, each jee server is pretty independent. each jee server in the cluster will start a pool of mdbs and setup a connection to the relevant queue. then, the incoming messages will be distributed to the various servers and mdbs accordingly. again, no single box will be more loaded than any other.
load balancing/clustering is not part of the jee "spec", but it is one of the many features that a decent jee server will handle for you. the point of jee was to specify patterns for doing work which, if followed, allow the app server to do all the "hard" parts. some of those features are required (transactions, authentication, etc), and some of those features are not (clustering, load-balancing, other robustness features).
I still would think dedicated load balancers, whether physical hardware or virtual software running in a cloud/VM setup would be a better solution for handling load to different tiers?like i said, that depends on the tier. makes sense in some situations, not others. (for one thing, load-balancers tend to be http based, so they don't work so well for non-http protocols.)

Similar Messages

  • Pros and Cons of using JBDC Adapter with XI

    Hi Experts,
        Can somebody help me understand pros and cons in using different JDBC adapters with XI?
       I would be really greatful to you.
    Thanks & Regards
    Gopal

    Hai,
    Go through the links:
    /people/varadharajan.krishnasamy/blog/2007/02/27/configuring-jdbc-connector-service-to-perform-database-lookups
    http://help.sap.com/saphelp_nw04/helpdata/en/44/f565854b7341e6e10000000a1553f6/frameset.htm
    Regarding JDBC Adapter in SAP XI
    Configuring File and JDBC adapters
    Thanks,
    Rajani.

  • I am making a graduation video for my cousin using Final Cut Pro. I have photos layered over videos, and I was wanted to find out how you can add a border around the photos so they stand off of the video. Anyone know what I could do?

    I am making a graduation video for my cousin using Final Cut Pro. I have photos layered over videos, and I was wanted to find out how you can add a border around the photos so they stand off of the video. Anyone know what I could do?

    You would need an image editor to edit the images and add a border to the image first before importing them into Final Cut.
    Cheapest and very good image editor?
    PIxelmator.
    Located in the Mac App Store. $14.99 USD.
    Here is the Pixelmator website to give you an overview of the app.
    http://www.pixelmator.com/
    Good Luck!

  • What are the pros and cons of using people keywords, given that my catalogue is already uptodate with regular keywording of all subjects?  e.g., will the people keyword transfer to other programs?, can I use the same name for a people keyword and regular

    What are the pros and cons of using people keywords, given that my catalog is already up to date with regular keywording of all subjects?  e.g., will the people keyword transfer to other programs?, can I use the same name for a people keyword and regular keyword in the same photo?

    What are the pros and cons of using people keywords, given that my catalog is already up to date with regular keywording of all subjects?  e.g., will the people keyword transfer to other programs?, can I use the same name for a people keyword and regular keyword in the same photo?

  • Pros and cons of using disksets for SUNW.HAStoragePlus

    Hi,
    untill now we were usign disksets for SUNW.HAStoragePlus for installing HA Oracle on both Sun Cluster 3.1 and 3.2.
    On the article ( http://www.sun.com/bigadmin/features/articles/cluster3.1_oracle10g.pdf ) with the title "Installing and Configuring Sun Cluster 3.1 Software for Oracle Database 10g HA" the author prefers using just the disk devices for SUNW.HAStoragePlus.
    What are the pros and cons of using disksets for disks you'll use for SUNW.HAStoragePlus?
    I think that if you do not need to add more than one disk to a diskset there's no need to to use disksets. So, you can eliminate a problematic layer such as SDS. What do you thnik and which option do you prefer?
    Murat BALKAS

    some more details :
    On " Chapter 4 . Configuring SolarisVolume Manager Software" of "Sun Cluster Data Service 16 for Oracle Guide for Solaris OS"
    (http://docs.sun.com/app/docs/doc/819-2980?l=en&q=Sun+CLuster+3.2 ) SDS disksets we use for HA-Oracle installations is explained in detail.
         Our procedure to create diskset to locate Oracle files is attached.
         After reading the article, I realized that using disksets is not a
    must for filesystems to be mounted as SUNW.HAStoragePlus. If yes, I
    would prefer using the disk devices directly instead of putting them
    on disksets so that I can eliminate one for layer which is the problematic SDS layer.
         Our disk devices ( below /dev/did/rdsk/d9 and /dev/did/rdsk/d12 ) are
    disk partitions from a RAID-5 logical drive on the storage.
    * Create the disksets required for HA-ORACLE files
    root@vasdb1 # metaset -s oraset10fs -a -h vasdb1 vasdb2
    root@vasdb1 # metaset -s oraset10fs -a -m vasdb1 vasdb2
    root@vasdb1 # metaset -s oraset10fs -a /dev/did/rdsk/d9
    /dev/did/rdsk/d12
    root@vasdb1 # metainit -s oraset10fs d325 1 1 /dev/did/rdsk/d12s0
    oraset10fs/d325: Concat/Stripe is setup
    root@vasdb1 # metainit -s oraset10fs d305 1 1 /dev/did/rdsk/d9s0
    oraset10fs/d305: Concat/Stripe is setup
    root@vasdb2 # newfs /dev/md/oraset10fs/rdsk/d305
    * Change the ownership of newly created devices to use by Oracle
    installation owner.
    root@vasdb1 # chown oracle10:dba /dev/md/oraset10/rdsk/d*
    root@vasdb1 # chown oracle10:dba /dev/md/oraset10/dsk/d*
    root@vasdb2 # chown oracle10:dba /dev/md/oraset10/rdsk/d*
    root@vasdb2 # chown oracle10:dba /dev/md/oraset10/dsk/d*
    * Make required directories on both nodes for mountpoints
    root@vasdb2 # cd /global
    root@vasdb2 # mkdir oracle10
    root@vasdb1 # cd /global/
    root@vasdb1 # mkdir oracle10
    * Add directories to vfstab on both nodes
    root@vasdb2 # more /etc/vfstab
    /dev/md/oraset10/dsk/d325 /dev/md/oraset10/rdsk/d325 /global/oracle10
    ufs 2 no logging
    * Create raw deivces for using as redolog files.
    root@lbsdb1 # metainit -s oraset d312 -p d305 1025M
    d302: Soft Partition is setup
    root@lbsdb1 # metainit -s oraset d313 -p d305 1025M
    d303: Soft Partition is setup
    root@lbsdb1 # metainit -s oraset d314 -p d305 1025M
    d304: Soft Partition is setup
    root@lbsdb1 # metainit -s oraset d315 -p d305 1025M
    d305: Soft Partition is setup
    root@lbsdb1 # metainit -s oraset d316 -p d305 1025M
    d306: Soft Partition is setup
    root@lbsdb1 # metainit -s oraset d317 -p d305 1025M
    d307: Soft Partition is setup
    root@lbsdb1 # metainit -s oraset d318 -p d305 1025M
    d308: Soft Partition is setup
    root@lbsdb1 # metainit -s oraset d319 -p d305 1025M
    d309: Soft Partition is setup
    * Register
    root@vasdb1 # scrgadm -a -L -j oraset10fs-lh -g oraset10fs-rg -l
    oraset10fs-IP -n net1@vasdb1,net2@vasdb2
    root@vasdb1 # scrgadm -a -t SUNW.HAStoragePlus:2
    root@vasdb2 # scrgadm -a -j oracle10-hastp-rs-raw -g oraset10-rg -t
    SUNW.HAStoragePlus:2 -x
    GlobalDevicePaths=oraset10,/dev/md/oraset10/rdsk/d305 -x
    AffinityOn=TRUE
    root@vasdb2 # scrgadm -a -j oracle10-hastp-rs-fs -g oraset10-rg -t
    SUNW.HAStoragePlus:2 -x FilesystemMountPoints=/global/oracle10 -x
    AffinityOn=TRUE
    root@vasdb2 # scswitch -e -j oracle10-hastp-rs-fs
    root@vasdb2 # scswitch -e -j oracle10-hastp-rs-raw

  • Pros and cons of using DB LINK

    Hi
    I am planning to use dblink in my current project to acess external database .But is there any other alternative to this ? What are the pros and cons of using Oracle DB Links ? Can anybody help me on this ?
    Thanks in advance .
    Pradipta

    Well, it depends on where you want to access the other database from. If you want to access tables in database B from a stored procedure in database A, then you have to use a dblink to do it. If your front-end application sometimes needs data from database A and sometimes needs data from database B, then you could establish two connections, one to each database, in your front-end, and use the appropriate connection for the different queries.
    HTH
    John

  • Are there pros and cons to using TFS as compared to Sharepoint?

    are there pros and cons to using TFS as compared to Sharepoint?

    TFS and SharePoint are two different products with overlapping functionality.
    If you are planning to use TFS for Application Lifecylce management, then I would not suggest SharePoint replacing TFS.
    Hope this helps!
    Ram - SharePoint Architect
    Blog - SharePointDeveloper.in
    Please vote or mark your question answered, if my reply helps you

  • Pros and cons between the large log buffer and small log buffer?

    pros and cons between the large log buffer and small log buffer?
    Many people suggest that small log buffer (1-3MB) is better because we can avoid the waiting events from users. But I think that we can also have advantage with the bigger on...it's because we can reduce the redo log file I/O...
    What is the optimal size of the log buffer? should I consider OLTP vs DSS as well?

    Hi,
    It's interesting to note that some very large shops find that a > 10m log buffer provides better throughput. Also, check-out this new world-record benchmark, with a 60m log_buffer. The TPC notes that they chose it based on the cpu_count:
    log_buffer = 67108864 # 1048576x cpuhttp://www.dba-oracle.com/t_tpc_ibm_oracle_benchmark_terabyte.htm

  • TS4036 I purchased an iphone for my daughter and we are using the same account and she deleted some contacts from her phone and they were deleted off of my contacts as well. Is there a way to use icloud backup to reinstall the contacts to my phone?

    I purchased an iphone for my daughter and we are using the same account and she deleted some contacts from her phone and they were deleted off of my contacts as well. Is there a way to use icloud backup to reinstall the contacts to my phone?

    Welcome to the Apple community.
    You can only restore them from a Computer backup. This has occurred because you are sharing an iCloud account. ideally you should each have your own iCloud account, that way you can each manage your own mail, contacts, calendars, documents etc and avoid unintentional deletions and unwanted editing. If there is information you wish to share between you, this can be done with a secondary account.
    Having separate iCloud accounts, doesn't mean you have to have separate iTunes accounts, so whilst you keep your personal data separate, you can continue to share music, apps, books, TV shows, movies etc.

  • Im trying to use magic bullet photo looks with photoshop CC and everytime i use photolooks photoshop crashes and closes

    Im trying to use magic bullet photo looks with photoshop CC and everytime i use photolooks photoshop crashes and closes

    If Photoshop runs OK otherwise, then the problem is with the plugin
    Red Giant - Products - Magic Bullet PhotoLooks 2.0 - Compatibility

  • I had lion and am now using 10.6.8 and my iphoto won't work

    I had lion and am now using 10.6.8 and my iphoto won't work I am told that I need to use another version of iphoto

    Try this:  launch iPhoto with the Option key held down and create a new, test library.  Import some photos and check to see if the same problem persists. If you're able to create and run a new library successfully the culprit is your current library.
    In that case try the following on your current library:
    If you have the space available on your hard drive and don't aready have a backup copy of the library make a temporary, backup copy (select the library and type Commadn+D) and apply the two fixes below in order as needed:
    Fix #1
    Launch iPhoto with the Command+Option keys held down and rebuild the library.
    Select the options identified in the screenshot. 
    Fix #2
    Using iPhoto Library Manager  to Rebuild Your iPhoto Library
    Download iPhoto Library Manager and launch.
    Click on the Add Library button, navigate to your Home/Pictures folder and select your iPhoto Library folder.
    Now that the library is listed in the left hand pane of iPLM, click on your library and go to the File ➙ Rebuild Library menu option
    In the next  window name the new library and select the location you want it to be placed.
    Click on the Create button.
    Note: This creates a new library based on the LIbraryData.xml file in the library and will recover Events, Albums, keywords, titles and comments but not books, calendars or slideshows. The original library will be left untouched for further attempts at fixing the problem or in case the rebuilt library is not satisfactory.
    OT

  • What are the Pros and Cons of Using Batch Numbers over Serialization

    Dear SAP Gurus:
    Will someone please give me the benefits of using Batch Management over serial numbers in this case scenerio, or vice versa:
    Client wants to trace all the components of an assembly in a BOM.  Even the Raw material.  The client sends the material out today and has the vendor assign serial numbers to the individual pieces, the client gives the range of serial numbers to use.  We are looking at using batch numbers to accomplish this and issue one material and batch number to a production order.  Then use MB56 batch where used functionality to view history.  I am wanting to understand the benefits of this.  Please advise and points will be awarded as always. 
    Also, in this scenerio, can you issue multiple material/batch numbers to one vendor op that has its own production order?

    Yes it is a subcontract. 
    Example:  This is the solution but need the pros and cons of doing this scenerio
    Sheet of metal sent to vendor to make lets say 1800 peices of material number nas5703-01.  All 1800 pieces come back and issued to a production work order using one bacth number for one material item so that batch number can be traced in history in MB56 and a fit up report.

  • What are the pros and cons re using an intel iMac vs MacPro with LP8?

    I'm considering getting a new intel Mac in the near future (presuming a new MacPro will be released in the near future - maybe at the same time as Leopard). I compose largely for film and television and I am composing largely using a combination of loops, software instruments and some recorded live performance. I usually sync to a low res quicktime movie.
    I do like the idea of a simple and uncluttered work environment with an iMac, added to which there's also a degree of portability with the iMac however the MacPro is obviously more powerful. I'm not sure how much the difference in power between the two computers would affect me.
    Would I be compromising myself much if I went for the iMac over the MacPro? What are the pros and cons of the iMac vs the MacPro in relation to Logic Pro 8?

    In the world large-scale music composition using samples, loops, etc (especially for film) your two biggest needs are RAM and HD speed/access. The imac looses big time in this department (as a single computer at least) as it can only be upgraded to 4gb ram, and only holds one internal HD, and also lacks any PCI expansion for DSP cards, audio interfaces, etc.
    In generalyou want to separate your data vs applications as much as possible, to ensure both can be accessed quickly and easily by the computer. So its best to have your system software / applications on one internal HD, and your logic data (samples, audio recordings, loops) on another drive(s). You can do this with an iMac via USB, FW800, & FW400, but depending on how big your projects get, how many USB and FW drives / interfaces you use, and how much data you need to stream, you could overload the buss on the imac (not sure if it has multiple busses or not). Plus speed wise, internal SATA are much faster than external drives, and the mac pro with its 4 internal slots seems like a great choice for speed and flexibility.
    However, if you dont find yourself doing large scale projects, then you might be better off going with an imac. We just purchased one for my father and it runs great! It blows the socks off of my Dual 2.5 G5 tower in terms of CPU speed! If you run into problems running things from the imac, you could always add a mac-mini down the road to stream sample libs, as a Logic node, etc, which seems to be a much more cost effective solution.
    I hope this was helpful, but I probably just made the decision harder . In fact, if I were to start over today, I dont know if I'd go with a MacPro, or an iMac / mac mini combination. they both seem to have their advantages / disadvantages.
    Best of luck!

  • Pros and cons of using email sending package in oracle 8.1.6

    hi ,
    i would like to know the advantages /disadvantages of using email sending package from oracle 8.1.6
    compared to sending the same using say perl or php.
    iam developing a site in php/oracle8.1.6 , in which iam supposed to create a payement module.whenever a user
    register(for free trial or subscribing the site) i'll have to send him a welcoming mail.In addition to this iam also supposed to find out wether subscribers are paying cash at right time and if not send them reminder mails and other for related scenarios . i can do the same in Perl or PHP.but if iam not gaining much(say based on server performance or load) then i think i can go ahead with oracle package. when i tested it i found that its slow . what about the load that it may cause for the server (ours is linux ).
    please do give inputs on this

    Hi Ravi,
    Thanks for your reply.
    But I am specifically looking at pros and cons for web services. So the thread which you passed to me won't help.
    Regards
    Nitin.

  • Pros and cons of using iFS

    HAI ALL,
    assuming that i have stored all of my data(both RDBMS and no-relational data html files,xml files)in an iFS.the first thing i want to ask u is
    1)if i want to read the iFS and display only the RDBMS data from the iFS ,how fast it can be done compared to traditionally storing the RDBMS data in a table in oracle8i ?
    2)if i want to use indexing,how fast is iFS compared to doing indexing in oracle8i ?
    3)if i want to search for a particular record how fast is it compared to doing the same in an RDBMS table in oracle8i ?
    4)say i want to mirror the contents of the iFS from one oracle8i server to another oracle8i server,what are the pros and cons ?
    throw some light on the above points which is crutial for us to either go for iFS or not?
    awaiting reply
    null

    Ravi, I sorry, but I don't understand your questions. My comments are preceded with >>.
    Assuming that I have stored all of my data--both RDBMS and non-relational data, namely html files and xml files--in iFS, the first thing I want to ask you is:
    I don't know what you mean, "store your RDBMS data in iFS". You store RDBMS data in the Oracle database directly. 1) if i want to read the iFS and display only the RDBMS data from the iFS, how fast it can be done compared to traditionally storing the RDBMS data in a table in oracle8i?
    You don't store RDBMS data in iFS.2) if i want to use indexing, how fast is iFS compared to doing indexing in oracle8i ?
    It's the same. Under the covers, iFS uses both the normal RDBMS indexing for its metadata, and the normal interMedia Text indexing for the non-relational data.3) if i want to search for a particular record how fast is it compared to doing the same in an RDBMS table in oracle8i?
    It's the same. iFS uses the normal RDBMS searching capabilities under the covers.4) say i want to mirror the contents of the iFS from one oracle8i server to another oracle8i server,what are the pros and cons?
    I'm not sure what you mean by "mirror". Are you referring to replicating?null

Maybe you are looking for

  • Problem with TV Video

    Adobe TV will not display properly for me.  I am using Window 7, the latest Firefox and Adobe Flash 11.6.602.171.  I had to upgrade to this version when the old version would not work with Rosetta Stone.

  • Images are blurred in Library module

    I am having some new issues when viewing images in the Library module. I have been using LR for quite sometime and this is the first time. I saw a thread somewhere here that maybe this might be a bug. Is that correct. Let me walk you through some of

  • Dll to generate array

    Hi All, I am very new in the using of dll for Labview so maybe my question is completely stupid. I would like to get an array of values which correspond to a kind of waveform (only the Y part). Here is the part of the cpp program #include "stdafx.h"

  • CRM 5.0 Compatibility with backend upgraded to EHP4 FOR SAP ERP 6.0 / NW7.0

    Hello, What are the  compatibility issues for EHP4 FOR SAP ERP 6.0  Upgrade with CRM 5.0 ? Are there any OSS notes to address upgrade specific issues? Following are the System Details: Upgraded EHP4 FOR SAP ERP 6.0 / NW7.01 Component: SAP_APPL  Relea

  • Getting error message "invalid formaula that cannot be compiled"

    Hi, I have installed SAP Crystal Report Viewer 2008, when tries to open output file that has RPT extension, getting error message "this report contains invalid Crystal Reports formulas that cannot be compile". It seems it requires some DLL files that