I am looking for a bit of clarity around JBoss ESB and JBoss WS. I have been asked to build an ESB solution using web services (SOAP/http(s)).
What advantages does using ESB over JBoss WS give me, and how does it fit with the client request - e.g. does the client call the endpoint on the ESB, which is then forward to the Web Service?
Any points would be appreciated.
The main advantage is loose coupling of the service and the client. The ESB service could be a proxy to the Web Service. If the Web Service implementation or contract changes, different versions could be exposed on the ESB. The ESB also provides other "mediation" stuff like object transformations and routing.. that way the Web Service can just do it's job, and the ESB service can be used to expose the WS as desired to consumers.
And yes, the client would call the ESB endpoint. I had similiar questions on a project several months back, and found this article to be very useful: http://community.jboss.org/wiki/SOA-P43SimpleWebServiceProxy
Related
We have many web apps deployed in tomcat container. All these applications, make REST API calls to a couple of external services. What we want is all these rest API calls (across these web apps) to be going via single Hystrix gateway so we can build resiliency into the system. Any idea how to do this? If these independent web apps package hystrix in their own war then there will be multiple hystrix instances created? How to have a single instance of Hystrix per JVM which should deal with multiple web apps ?
Thanks,
Sidd
You need a gateway that will serve as a reverse proxy to dispatch incoming requests to the different services. This gateway can implement hystrix commands in order make the calls to the different external services.
Look at Zuul made by Netflix it's the most popular choice in terms of gateways. Hystrix is already in place and wraps the different external calls. You can also use spring cloud Netflix which includes an embedded Zuul proxy, here's an example: https://spring.io/guides/gs/routing-and-filtering/
I want to create a WCF Rest Application using NserviceBus and also i want use SQLServer transport.
Kindly help me ..Give me some Proper Code
NServiceBus V5.x - SQL Transport V2.x
The following sample shows you how to setup the SQL transport:
https://github.com/Particular/docs.particular.net/tree/master/samples/sqltransport-nhpersistence/Version_2.2
Hosting in IIS
NServiceBus can be hosted in IIS without any issues. Especially with a central broker transport like SQL, RabbitMQ, Azure Storage Queues or Azure Service Bus.
http://docs.particular.net/nservicebus/hosting/#self-hosting-web-hosting
NServiceBus can be hosted in any web technology that support .NET. This includes:
ASP.net
ASP.MVC
WCF
Web API
NancyFX
And many others.
As most web technologies operate in a scale out manner NServiceBus is usually hosted in a "Send-only" manner. In this mode they act as a "forwarder" of messages rather than the "processor". So the handling code (MVC controller, NancyFX module etc) of a given web request simply leverages the Bus send APIs and no processing is done in the web process.
Hosting in IIS does have some concerns as application pools by default don't startup automatically and can be recycled or even stopped. Any messages send to such an IIS hosted endpoint will not be processed until the application pool is started again.
MVC
The following samples demonstrate how to initialize NServiceBus and how to use it from MVC
http://docs.particular.net/samples/web/asp-mvc-application/
http://docs.particular.net/samples/web/asp-mvc-injecting-bus/
I am building a api on loopback. I was curious if loopback is a Baas or a mBaas framework. What I mean is will I face any problem if I would use it for my website builded in angularjs?
Will my api handle about 300req/s for all my requests?
Loopback is mostly a generalized Baas framework. One of it's use cases is web applications that uses angularjs. I actually do use loopback as a backend for a Angular.js webapp.
Yes mostly, but that depends on your business logic, your servers, databases, server load and a lot of other factors.
Loopback builds an http rest API that can get connected to databases or other rest or soap backends. It also has a few clients libraries, which includes plugin for angular resource. You can also write your own connectors or client library.
I have a bunch of web services. These services are written in different languages and expose a REST api. A front end web site accesses these services. The requests are proxied through a nginx server which does load balancing and connection management. This has been rock solid and very performant.
I'm contemplating replacing nginx with Apache Camel to take advantage of its powerful mediation and integration patterns. I have a few questions since I'm completely new to the Java ecosystem.
How performant is Apache Camel? Would the req/sec of a jetty end point be comparable to nginx?
Spring looks confusing. Can a standalone Camel application be deployed to something like AWS Elastic Beanstalk? If I want allow Camel to process more requests/sec, do I just add another Camel server in tandem?
Are there any pitfalls to using Apache Camel as the backbone to my entire IT infrastructure?
You have not mentioned what the major motivation is for changing the current architecture. Here are my comments:
How performant is Apache Camel? Would the req/sec of a jetty end point
be comparable to nginx?
I doubt if you will get the same req/sec performance from camel jetty as you do with nginx. Please dont take my word and try a load yourself with both the setup. I feel the message/exchange handling by camel will incur some cost that is missing form nginx. But both have different uses.
If I want allow Camel to process more requests/sec, do I just add
another Camel server in tandem.
This question is confusing. I assume your requests passed through one nginx. If you add multiple camel servers you need the sender to be available of the multiple camel servers or use some routing or load balancing mechanism in front of it that is aware of multiple camel instances.
Are there any pitfalls to using Apache Camel as the backbone to my
entire IT infrastructure?
This depends on what your problems are and how much of it is resolved by camel. Camel is an integration framework that supports multiple protocols. I see you only have web services which is supported by camel. But your current infrastructure already supports it.
I have an appengine app that I want to use as a front end to some existing web services. How can I consume those WS from my app?
I'm using python
You would use the URLFetch API.
In addition to just URLFetch and hand constructing SOAP envelopes, you can also use higher level SOAP libraries like SUDS. Which can parse WSDL and construct requests for you. For performance reasons you will want to cache the WSDL. In one project I parse this offline and deploy the optimised code with the application.