|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.
SYS-CON Events announced today that Roundee / LinearHub will exhibit at the WebRTC Summit at @ThingsExpo, which will take place on November 1–3, 2016, at the Santa Clara Convention Center in Santa Clara, CA. LinearHub provides Roundee Service, a smart platform for enterprise video conferencing with enhanced features such as automatic recording and transcription service. Slack users can integrate Roundee to their team via Slack’s App Directory, and '/roundee' command lets your video conference ...
Sep. 30, 2016 10:45 PM EDT Reads: 1,533
24Notion is full-service global creative digital marketing, technology and lifestyle agency that combines strategic ideas with customized tactical execution. With a broad understand of the art of traditional marketing, new media, communications and social influence, 24Notion uniquely understands how to connect your brand strategy with the right consumer. 24Notion ranked #12 on Corporate Social Responsibility - Book of List.
Sep. 30, 2016 10:45 PM EDT Reads: 479
Web Real-Time Communication APIs have quickly revolutionized what browsers are capable of. In addition to video and audio streams, we can now bi-directionally send arbitrary data over WebRTC's PeerConnection Data Channels. With the advent of Progressive Web Apps and new hardware APIs such as WebBluetooh and WebUSB, we can finally enable users to stitch together the Internet of Things directly from their browsers while communicating privately and securely in a decentralized way.
Sep. 30, 2016 10:00 PM EDT Reads: 1,254
"My role is working with customers, helping them go through this digital transformation. I spend a lot of time talking to banks, big industries, manufacturers working through how they are integrating and transforming their IT platforms and moving them forward," explained William Morrish, General Manager Product Sales at Interoute, in this SYS-CON.tv interview at 18th Cloud Expo, held June 7-9, 2016, at the Javits Center in New York City, NY.
Sep. 30, 2016 09:30 PM EDT Reads: 4,116
Just over a week ago I received a long and loud sustained applause for a presentation I delivered at this year’s Cloud Expo in Santa Clara. I was extremely pleased with the turnout and had some very good conversations with many of the attendees. Over the next few days I had many more meaningful conversations and was not only happy with the results but also learned a few new things. Here is everything I learned in those three days distilled into three short points.
Sep. 30, 2016 09:30 PM EDT Reads: 5,427
A strange thing is happening along the way to the Internet of Things, namely far too many devices to work with and manage. It has become clear that we'll need much higher efficiency user experiences that can allow us to more easily and scalably work with the thousands of devices that will soon be in each of our lives. Enter the conversational interface revolution, combining bots we can literally talk with, gesture to, and even direct with our thoughts, with embedded artificial intelligence, wh...
Sep. 30, 2016 09:00 PM EDT Reads: 4,047
Adobe is changing the world though digital experiences. Adobe helps customers develop and deliver high-impact experiences that differentiate brands, build loyalty, and drive revenue across every screen, including smartphones, computers, tablets and TVs. Adobe content solutions are used daily by millions of companies worldwide-from publishers and broadcasters, to enterprises, marketing agencies and household-name brands. Building on its established design leadership, Adobe enables customers not o...
Sep. 30, 2016 08:45 PM EDT Reads: 485
Why do your mobile transformations need to happen today? Mobile is the strategy that enterprise transformation centers on to drive customer engagement. In his general session at @ThingsExpo, Roger Woods, Director, Mobile Product & Strategy – Adobe Marketing Cloud, covered key IoT and mobile trends that are forcing mobile transformation, key components of a solid mobile strategy and explored how brands are effectively driving mobile change throughout the enterprise.
Sep. 30, 2016 08:30 PM EDT Reads: 471
In this strange new world where more and more power is drawn from business technology, companies are effectively straddling two paths on the road to innovation and transformation into digital enterprises. The first path is the heritage trail – with “legacy” technology forming the background. Here, extant technologies are transformed by core IT teams to provide more API-driven approaches. Legacy systems can restrict companies that are transitioning into digital enterprises. To truly become a lea...
Sep. 30, 2016 08:15 PM EDT Reads: 747
What are the new priorities for the connected business? First: businesses need to think differently about the types of connections they will need to make – these span well beyond the traditional app to app into more modern forms of integration including SaaS integrations, mobile integrations, APIs, device integration and Big Data integration. It’s important these are unified together vs. doing them all piecemeal. Second, these types of connections need to be simple to design, adapt and configure...
Sep. 30, 2016 07:30 PM EDT Reads: 566
What happens when the different parts of a vehicle become smarter than the vehicle itself? As we move toward the era of smart everything, hundreds of entities in a vehicle that communicate with each other, the vehicle and external systems create a need for identity orchestration so that all entities work as a conglomerate. Much like an orchestra without a conductor, without the ability to secure, control, and connect the link between a vehicle’s head unit, devices, and systems and to manage the ...
Sep. 30, 2016 07:15 PM EDT Reads: 482
The Jevons Paradox suggests that when technological advances increase efficiency of a resource, it results in an overall increase in consumption. Writing on the increased use of coal as a result of technological improvements, 19th-century economist William Stanley Jevons found that these improvements led to the development of new ways to utilize coal. In his session at 19th Cloud Expo, Mark Thiele, Chief Strategy Officer for Apcera, will compare the Jevons Paradox to modern-day enterprise IT, e...
Sep. 30, 2016 07:00 PM EDT Reads: 2,457
Major trends and emerging technologies – from virtual reality and IoT, to Big Data and algorithms – are helping organizations innovate in the digital era. However, to create real business value, IT must think beyond the ‘what’ of digital transformation to the ‘how’ to harness emerging trends, innovation and disruption. Architecture is the key that underpins and ties all these efforts together. In the digital age, it’s important to invest in architecture, extend the enterprise footprint to the cl...
Sep. 30, 2016 06:45 PM EDT Reads: 749
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 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 solutions, helping companies worldwide activate their data to drive more value and business insight and to transform moder...
Sep. 30, 2016 06:30 PM EDT Reads: 2,914
SYS-CON Events has announced today that Roger Strukhoff has been named conference chair of Cloud Expo and @ThingsExpo 2016 Silicon Valley. The 19th Cloud Expo and 6th @ThingsExpo will take place on November 1-3, 2016, at the Santa Clara Convention Center in Santa Clara, CA. "The Internet of Things brings trillions of dollars of opportunity to developers and enterprise IT, no matter how you measure it," stated Roger Strukhoff. "More importantly, it leverages the power of devices and the Interne...
Sep. 30, 2016 06:15 PM EDT Reads: 3,547
What does it look like when you have access to cloud infrastructure and platform under the same roof? Let’s talk about the different layers of Technology as a Service: who cares, what runs where, and how does it all fit together. In his session at 18th Cloud Expo, Phil Jackson, Lead Technology Evangelist at SoftLayer, an IBM company, spoke about the picture being painted by IBM Cloud and how the tools being crafted can help fill the gaps in your IT infrastructure.
Sep. 30, 2016 06:15 PM EDT Reads: 3,165
Digital innovation is the next big wave of business transformation based on digital technologies of which IoT and Big Data are key components, For example: Business boundary innovation is a challenge to excavate third-party business value using IoT and BigData, like Nest Business structure innovation may propose re-building business structure from scratch, as Uber does in the taxicab industry The social model innovation is also a big challenge to the new social architecture with the design fr...
Sep. 30, 2016 05:45 PM EDT Reads: 1,380
Data is an unusual currency; it is not restricted by the same transactional limitations as money or people. In fact, the more that you leverage your data across multiple business use cases, the more valuable it becomes to the organization. And the same can be said about the organization’s analytics. In his session at 19th Cloud Expo, Bill Schmarzo, CTO for the Big Data Practice at EMC, will introduce a methodology for capturing, enriching and sharing data (and analytics) across the organizati...
Sep. 30, 2016 04:30 PM EDT Reads: 1,835
DevOps at Cloud Expo, taking place Nov 1-3, 2016, at the Santa Clara Convention Center in Santa Clara, CA, is co-located with 19th Cloud Expo and will feature technical sessions from a rock star conference faculty and the leading industry players in the world. The widespread success of cloud computing is driving the DevOps revolution in enterprise IT. Now as never before, development teams must communicate and collaborate in a dynamic, 24/7/365 environment. There is no time to wait for long dev...
Sep. 30, 2016 04:00 PM EDT Reads: 3,598
IoT offers a value of almost $4 trillion to the manufacturing industry through platforms that can improve margins, optimize operations & drive high performance work teams. By using IoT technologies as a foundation, manufacturing customers are integrating worker safety with manufacturing systems, driving deep collaboration and utilizing analytics to exponentially increased per-unit margins. However, as Benoit Lheureux, the VP for Research at Gartner points out, “IoT project implementers often ...
Sep. 30, 2016 03:45 PM EDT Reads: 3,674