|By Flex News Desk||
|October 22, 2008 03:56 PM EDT||
Open sourcing of the highly compressed communication protocol AMF and server‐side Flex components play an important role in adoption of Flex by the enterprises. Live Cycle Data Services (LCDS) is an excellent solution for building scalable RIA, but it’s not cheap. For those who don’t have a budget for LCDS, Adobe has released BlazeDS, the open source implementation of AMF communication protocol.
BlazeDS was offered as a free version of LCDS Flex remoting that also promised scaled down support of a modest number of concurrent users for data push.
But the enterprise clients wanted the best of both worlds: an inexpensive and scalable solution. The great part about LCDS and BlazeDS is that their code base is extendable and you can try to make the code do new things. The problem is that the base code is targeting only conventional Java Servlet container where BlazeDS is deployed, and performance/scalability of BlazeDS also depends on the number of concurrent connections supported by your server such as Tomcat, JBoss, WebSphere et al.
Farata Systems architects started experiments in this area when the prerelease of Jetty 7 became available. Jetty is a mature open source server that supports Java Servlet 3.0 specification (JSR 315).
BlazeDS runs in a servlet container, which maintains a thread pool. Each thread is given to a client request and is returned back to the reusable pool after the client is served. When the client uses so called long running connection that thread becomes locked by that client as it never finishes the request. So the number of the concurrent subscribers in BlazeDS depends on the number of threads a particular servlet container can hold.
While BlazeDS is preconfigured with just 10 simultaneous connections, it can be increased to several hundreds, and the actual number depends on the server's threading configuration, CPU and the size of its JVM heap memory. This number can also be affected by the number of messages processed by server in the unit of time and size of the messages.
Non-blocking I/O combined with Servlet 3.0 architectureallowsyou to write the code that is not tied to available server threads. The servlet container sends a request for execution and puts it in a suspended mode releasing the thread for other requests. When the result comes back, it resumes the processing of the request efficiently recycling a smaller number of threads. Because of that, the number of streaming connections can be increased to thousands.
The first goal was to create a module for BlazeDS to support the Servlet 3.0 with the messaging based on the AMF streaming. Thus test was set with Jetty - the first servlet container that implements Servlet 3.0 API. In less than six months this specification will be supported by most of the J2EE application servers. Additional endpoints ( components responsible for binding actual application services with servlet container ) were created based on BlazeDS open source implementation.
Tree small changes are required to add nio endpoints to a standard BlazeDS (or LCDS for that matter) application in the standard Jetty installation:
a) Add Farata’s nioblazeds.jar to Jetty’s lib folder
b) Modify the services-config.xml file of BlazeDS to change the standard thread-based end point for AMF streaming with Farata’s NioAmfEndpoint that supports Servlet 3.0 API.
c) Increase the parameter of the Jetty’s number of open file handlers based on the number of concurrent users requests you are planning to process.
The Trader Desktop, a sample application that comes with BlazeDS was successfully deployed under BlazeDS/Jetty and tested without any changes with enhanced endpoints.
The next step was to stress test this application using one of the commercial testing software suites that support AMF protocol. Farata engineers teamed up with Neotys, creator of a robust stress testing product called NeoLoad, that allows to emulate workload of tens of thousands of users hitting a server via both HTTP and AMF protocols.
Now you can watch a short screencast of the test that emulates 5000 users working with the Trader Desktop over the 5 minute period. The test starts with 200 users ramping up at the rate of 500 users per 10 seconds.
In this demo, the server side feed sends the messages about the latest stock prices to the Flex subscribers. After that, you’ll be monitoring this process using ds-console, yet another sample application that comes with
BlazeDS. First, the monitor will show just one client with a small number of messages, and the number of maximum streaming client is set to 65535.
Then you’ll see how easy it is with Neoload to load a large number of the users. The test uses 5 machines to emulate the load. The push count is the number of messages sent by the server. The test runs on a 8-cpu machine. Watch the number of allocated threads and the number of users – the number of threads is several times lower than the number of users at any given time. Please note that even when the number of users grows, the number of threads doesn’t. These processes are not expensive neither from the memory not from the CPU utilization perspective.
In this test the system was purposely restricted by introducing throttling in the Feed.java.
During this 5 minute test the server sent about 2.1 million messages. Since the first three minutes (180 seconds) of the test Neoload was ramping up the number of users until it reached 5000, count this time as a half or 90 seconds. Adding another two minutes brings the adjusted test time to 210 seconds or 10000 messages per second. This means that that each of 5000 users received 2 messages per second, which matches the throttling parameter that was set( in Feed.java we specified 400ms of sleep time between messages broadcast). Based on the server CPU and memory utilization we should have no problem supporting over 12000 users on this configuration as long as bandwidth and external load generators are added.
One of the machines used in this test was an 8-core MacPro for the server and four of the cores were shared with the VM emulating one of the client’s machine. There were also two 3Ghz desktops, one MacBook Pro and one 2Ghz Dell laptop - that’s the one that will work really hard trying to parse 300 messages per second. Actually, NeoLoad goes a little too hard on the client trying to even parse AMF messages on the machine running thousands of simulated clients.
The screencast of the stress test is located at http://myflex.org//demos/JettyBlazeDS/JettyBlazeDSloadTest.html .
Comparing with conventional and other technologies
Farata ran the same test with Apache Tomcat server using traditional thread-based I/O and standard BlazeDS long polling. Tomcat comes preconfigured with 250 threads. After increasing gradually this number, the same test can run for about 800 users, but pretty soon the system becomes unstable running out of threads and giving out of memory errors.
Tomcat also has experimental NIO implementation of servlet container named Comet. Farata has also created an endpoint adapter to utilize this feature of Jetty with BlazeDS. But while holding high promises of more efficient full duplex protocol the current Tomcat Comet implementation had some reliability issues.
The screencast should be treated as feasibility study and technical comment and not the benchmark of any sort as it still has a lot of room for improvement. More tests are required against the final release of Servlet 3 implementation for proper scalability benchmark for different servers/configurations.
Based on these results, you may consider using open source BlazeDS in the most demanding enterprise Flex applications. To be fair, we need to mention that LCDS is more than a data push, but if you are looking for a no-cost extensible solution that works in a standard Web environment with corporate firewalls and require session management, properly tuned BlazeDS becomes a good scalable solution for you next RIA.
|Jedi 03/10/10 08:01:00 AM EST|
I tried this setup. But I am getting this error:
What is causing this?
|Yakov Fain 10/27/08 01:05:21 PM EDT|
At this point these are just experiments that we perform to accommodate the need of some of our clients.
This year we are not planning to open source it, but most likely will do it next year when more J2EE app servers will start implementing Servlets 3.0 spec. As far as I know, Resin will be next.
|[email protected] 10/27/08 07:02:33 AM EDT|
Where can i find nioblazeds.jar? Is it or will it be open source?
|frankyin 10/26/08 09:54:55 PM EDT|
Sounds very interesting.
The Quantified Economy represents the total global addressable market (TAM) for IoT that, according to a recent IDC report, will grow to an unprecedented $1.3 trillion by 2019. With this the third wave of the Internet-global proliferation of connected devices, appliances and sensors is poised to take off in 2016. In his session at @ThingsExpo, David McLauchlan, CEO and co-founder of Buddy Platform, will discuss how the ability to access and analyze the massive volume of streaming data from mil...
Feb. 13, 2016 12:00 PM EST
SYS-CON Events announced today that Alert Logic, Inc., the leading provider of Security-as-a-Service solutions for the cloud, will exhibit at SYS-CON's 18th International Cloud Expo®, which will take place on June 7-9, 2016, at the Javits Center in New York City, NY. Alert Logic, Inc., provides Security-as-a-Service for on-premises, cloud, and hybrid infrastructures, delivering deep security insight and continuous protection for customers at a lower cost than traditional security solutions. Ful...
Feb. 13, 2016 12:00 PM EST Reads: 466
SYS-CON Events announced today that Interoute, owner-operator of one of Europe's largest networks and a global cloud services platform, has been named “Bronze Sponsor” of SYS-CON's 18th Cloud Expo, which will take place on June 7-9, 2015 at the Javits Center in New York, New York. Interoute is the owner-operator of one of Europe's largest networks and a global cloud services platform which encompasses 12 data centers, 14 virtual data centers and 31 colocation centers, with connections to 195 ad...
Feb. 13, 2016 12:00 PM EST Reads: 440
SYS-CON Events announced today that Men & Mice, the leading global provider of DNS, DHCP and IP address management overlay solutions, will exhibit at SYS-CON's 18th International Cloud Expo®, which will take place on June 7-9, 2016, at the Javits Center in New York City, NY. The Men & Mice Suite overlay solution is already known for its powerful application in heterogeneous operating environments, enabling enterprises to scale without fuss. Building on a solid range of diverse platform support,...
Feb. 13, 2016 11:45 AM EST Reads: 268
WebSocket is effectively a persistent and fat pipe that is compatible with a standard web infrastructure; a "TCP for the Web." If you think of WebSocket in this light, there are other more hugely interesting applications of WebSocket than just simply sending data to a browser. In his session at 18th Cloud Expo, Frank Greco, Director of Technology for Kaazing Corporation, will compare other modern web connectivity methods such as HTTP/2, HTTP Streaming, Server-Sent Events and new W3C event APIs ...
Feb. 13, 2016 11:30 AM EST
Fortunately, meaningful and tangible business cases for IoT are plentiful in a broad array of industries and vertical markets. These range from simple warranty cost reduction for capital intensive assets, to minimizing downtime for vital business tools, to creating feedback loops improving product design, to improving and enhancing enterprise customer experiences. All of these business cases, which will be briefly explored in this session, hinge on cost effectively extracting relevant data from ...
Feb. 13, 2016 11:30 AM EST Reads: 153
There will be new vendors providing applications, middleware, and connected devices to support the thriving IoT ecosystem. This essentially means that electronic device manufacturers will also be in the software business. Many will be new to building embedded software or robust software. This creates an increased importance on software quality, particularly within the Industrial Internet of Things where business-critical applications are becoming dependent on products controlled by software. Qua...
Feb. 13, 2016 11:00 AM EST
SYS-CON Events announced today that iDevices®, the preeminent brand in the connected home industry, will exhibit at SYS-CON's 18th International Cloud Expo®, which will take place on June 7-9, 2016, at the Javits Center in New York City, NY. iDevices, the preeminent brand in the connected home industry, has a growing line of HomeKit-enabled products available at the largest retailers worldwide. Through the “Designed with iDevices” co-development program and its custom-built IoT Cloud Infrastruc...
Feb. 13, 2016 11:00 AM EST Reads: 144
Companies can harness IoT and predictive analytics to sustain business continuity; predict and manage site performance during emergencies; minimize expensive reactive maintenance; and forecast equipment and maintenance budgets and expenditures. Providing cost-effective, uninterrupted service is challenging, particularly for organizations with geographically dispersed operations.
Feb. 13, 2016 11:00 AM EST
Join us at Cloud Expo | @ThingsExpo 2016 – June 7-9 at the Javits Center in New York City and November 1-3 at the Santa Clara Convention Center in Santa Clara, CA – and deliver your unique message in a way that is striking and unforgettable by taking advantage of SYS-CON's unmatched high-impact, result-driven event / media packages.
Feb. 13, 2016 10:00 AM EST
As enterprises work to take advantage of Big Data technologies, they frequently become distracted by product-level decisions. In most new Big Data builds this approach is completely counter-productive: it presupposes tools that may not be a fit for development teams, forces IT to take on the burden of evaluating and maintaining unfamiliar technology, and represents a major up-front expense. In his session at @BigDataExpo at @ThingsExpo, Andrew Warfield, CTO and Co-Founder of Coho Data, will dis...
Feb. 13, 2016 09:45 AM EST Reads: 229
Silver Spring Networks, Inc. (NYSE: SSNI) extended its Internet of Things technology platform with performance enhancements to Gen5 – its fifth generation critical infrastructure networking platform. Already delivering nearly 23 million devices on five continents as one of the leading networking providers in the market, Silver Spring announced it is doubling the maximum speed of its Gen5 network to up to 2.4 Mbps, increasing computational performance by 10x, supporting simultaneous mesh communic...
Feb. 13, 2016 05:00 AM EST
Eighty percent of a data scientist’s time is spent gathering and cleaning up data, and 80% of all data is unstructured and almost never analyzed. Cognitive computing, in combination with Big Data, is changing the equation by creating data reservoirs and using natural language processing to enable analysis of unstructured data sources. This is impacting every aspect of the analytics profession from how data is mined (and by whom) to how it is delivered. This is not some futuristic vision: it's ha...
Feb. 13, 2016 04:45 AM EST Reads: 472
The cloud promises new levels of agility and cost-savings for Big Data, data warehousing and analytics. But it’s challenging to understand all the options – from IaaS and PaaS to newer services like HaaS (Hadoop as a Service) and BDaaS (Big Data as a Service). In her session at @BigDataExpo at @ThingsExpo, Hannah Smalltree, a director at Cazena, will provide an educational overview of emerging “as-a-service” options for Big Data in the cloud. This is critical background for IT and data profes...
Feb. 13, 2016 03:45 AM EST Reads: 250
One of the bewildering things about DevOps is integrating the massive toolchain including the dozens of new tools that seem to crop up every year. Part of DevOps is Continuous Delivery and having a complex toolchain can add additional integration and setup to your developer environment. In his session at @DevOpsSummit at 18th Cloud Expo, Miko Matsumura, Chief Marketing Officer of Gradle Inc., will discuss which tools to use in a developer stack, how to provision the toolchain to minimize onboa...
Feb. 12, 2016 09:00 PM EST Reads: 139
SYS-CON Events announced today that Commvault, a global leader in enterprise data protection and information management, has been named “Bronze Sponsor” of SYS-CON's 18th International Cloud Expo, which will take place on June 7–9, 2016, at the Javits Center in New York City, NY, and the 19th International Cloud Expo, which will take place on November 1–3, 2016, at the Santa Clara Convention Center in Santa Clara, CA. Commvault is a leading provider of data protection and information management...
Feb. 12, 2016 02:15 PM EST Reads: 467
With an estimated 50 billion devices connected to the Internet by 2020, several industries will begin to expand their capabilities for retaining end point data at the edge to better utilize the range of data types and sheer volume of M2M data generated by the Internet of Things. In his session at @ThingsExpo, Don DeLoach, CEO and President of Infobright, will discuss the infrastructures businesses will need to implement to handle this explosion of data by providing specific use cases for filte...
Feb. 12, 2016 01:00 PM EST Reads: 248
SYS-CON Events announced today that Pythian, a global IT services company specializing in helping companies adopt disruptive technologies to optimize revenue-generating systems, has been named “Bronze Sponsor” of SYS-CON's 18th Cloud Expo, which will take place on June 7-9, 2015 at the Javits Center in New York, New York. Founded in 1997, Pythian is a global IT services company that helps companies compete by adopting disruptive technologies such as cloud, Big Data, advanced analytics, and DevO...
Feb. 12, 2016 12:30 PM EST Reads: 276
SYS-CON Events announced today that Avere Systems, a leading provider of enterprise storage for the hybrid cloud, will exhibit at SYS-CON's 18th International Cloud Expo®, which will take place on June 7-9, 2016, at the Javits Center in New York City, NY. Avere delivers a more modern architectural approach to storage that doesn’t require the overprovisioning of storage capacity to achieve performance, overspending on expensive storage media for inactive data or the overbuilding of data centers ...
Feb. 12, 2016 12:30 PM EST Reads: 138
With the Apple Watch making its way onto wrists all over the world, it’s only a matter of time before it becomes a staple in the workplace. In fact, Forrester reported that 68 percent of technology and business decision-makers characterize wearables as a top priority for 2015. Recognizing their business value early on, FinancialForce.com was the first to bring ERP to wearables, helping streamline communication across front and back office functions. In his session at @ThingsExpo, Kevin Roberts...
Feb. 12, 2016 12:45 AM EST Reads: 423