|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.
Explosive growth in connected devices. Enormous amounts of data for collection and analysis. Critical use of data for split-second decision making and actionable information. All three are factors in making the Internet of Things a reality. Yet, any one factor would have an IT organization pondering its infrastructure strategy. How should your organization enhance its IT framework to enable an Internet of Things implementation? In his session at @ThingsExpo, James Kirkland, Red Hat's Chief Architect for the Internet of Things and Intelligent Systems, described how to revolutionize your archit...
Jul. 30, 2015 07:30 PM EDT Reads: 1,395
For IoT to grow as quickly as analyst firms’ project, a lot is going to fall on developers to quickly bring applications to market. But the lack of a standard development platform threatens to slow growth and make application development more time consuming and costly, much like we’ve seen in the mobile space. In his session at @ThingsExpo, Mike Weiner, Product Manager of the Omega DevCloud with KORE Telematics Inc., discussed the evolving requirements for developers as IoT matures and conducted a live demonstration of how quickly application development can happen when the need to comply wit...
Jul. 30, 2015 07:15 PM EDT Reads: 301
SYS-CON Events announced today that HPM Networks will exhibit at the 17th International Cloud Expo®, which will take place on November 3–5, 2015, at the Santa Clara Convention Center in Santa Clara, CA. For 20 years, HPM Networks has been integrating technology solutions that solve complex business challenges. HPM Networks has designed solutions for both SMB and enterprise customers throughout the San Francisco Bay Area.
Jul. 30, 2015 03:45 PM EDT Reads: 448
MuleSoft has announced the findings of its 2015 Connectivity Benchmark Report on the adoption and business impact of APIs. The findings suggest traditional businesses are quickly evolving into "composable enterprises" built out of hundreds of connected software services, applications and devices. Most are embracing the Internet of Things (IoT) and microservices technologies like Docker. A majority are integrating wearables, like smart watches, and more than half plan to generate revenue with APIs within the next year.
Jul. 30, 2015 02:30 PM EDT
The Internet of Everything (IoE) brings together people, process, data and things to make networked connections more relevant and valuable than ever before – transforming information into knowledge and knowledge into wisdom. IoE creates new capabilities, richer experiences, and unprecedented opportunities to improve business and government operations, decision making and mission support capabilities.
Jul. 30, 2015 01:45 PM EDT Reads: 268
Growth hacking is common for startups to make unheard-of progress in building their business. Career Hacks can help Geek Girls and those who support them (yes, that's you too, Dad!) to excel in this typically male-dominated world. Get ready to learn the facts: Is there a bias against women in the tech / developer communities? Why are women 50% of the workforce, but hold only 24% of the STEM or IT positions? Some beginnings of what to do about it! In her Opening Keynote at 16th Cloud Expo, Sandy Carter, IBM General Manager Cloud Ecosystem and Developers, and a Social Business Evangelist, d...
Jul. 30, 2015 12:00 PM EDT Reads: 2,051
In his keynote at 16th Cloud Expo, Rodney Rogers, CEO of Virtustream, discussed the evolution of the company from inception to its recent acquisition by EMC – including personal insights, lessons learned (and some WTF moments) along the way. Learn how Virtustream’s unique approach of combining the economics and elasticity of the consumer cloud model with proper performance, application automation and security into a platform became a breakout success with enterprise customers and a natural fit for the EMC Federation.
Jul. 30, 2015 09:00 AM EDT Reads: 2,157
The Internet of Things is not only adding billions of sensors and billions of terabytes to the Internet. It is also forcing a fundamental change in the way we envision Information Technology. For the first time, more data is being created by devices at the edge of the Internet rather than from centralized systems. What does this mean for today's IT professional? In this Power Panel at @ThingsExpo, moderated by Conference Chair Roger Strukhoff, panelists addressed this very serious issue of profound change in the industry.
Jul. 29, 2015 03:00 PM EDT Reads: 1,272
Discussions about cloud computing are evolving into discussions about enterprise IT in general. As enterprises increasingly migrate toward their own unique clouds, new issues such as the use of containers and microservices emerge to keep things interesting. In this Power Panel at 16th Cloud Expo, moderated by Conference Chair Roger Strukhoff, panelists addressed the state of cloud computing today, and what enterprise IT professionals need to know about how the latest topics and trends affect their organization.
Jul. 29, 2015 02:00 PM EDT Reads: 1,183
It is one thing to build single industrial IoT applications, but what will it take to build the Smart Cities and truly society-changing applications of the future? The technology won’t be the problem, it will be the number of parties that need to work together and be aligned in their motivation to succeed. In his session at @ThingsExpo, Jason Mondanaro, Director, Product Management at Metanga, discussed how you can plan to cooperate, partner, and form lasting all-star teams to change the world and it starts with business models and monetization strategies.
Jul. 28, 2015 04:30 PM EDT Reads: 1,762
Converging digital disruptions is creating a major sea change - Cisco calls this the Internet of Everything (IoE). IoE is the network connection of People, Process, Data and Things, fueled by Cloud, Mobile, Social, Analytics and Security, and it represents a $19Trillion value-at-stake over the next 10 years. In her keynote at @ThingsExpo, Manjula Talreja, VP of Cisco Consulting Services, discussed IoE and the enormous opportunities it provides to public and private firms alike. She will share what businesses must do to thrive in the IoE economy, citing examples from several industry sectors.
Jul. 28, 2015 11:00 AM EDT Reads: 2,039
There will be 150 billion connected devices by 2020. New digital businesses have already disrupted value chains across every industry. APIs are at the center of the digital business. You need to understand what assets you have that can be exposed digitally, what their digital value chain is, and how to create an effective business model around that value chain to compete in this economy. No enterprise can be complacent and not engage in the digital economy. Learn how to be the disruptor and not the disruptee.
Jul. 27, 2015 10:00 AM EDT Reads: 2,029
Akana has released Envision, an enhanced API analytics platform that helps enterprises mine critical insights across their digital eco-systems, understand their customers and partners and offer value-added personalized services. “In today’s digital economy, data-driven insights are proving to be a key differentiator for businesses. Understanding the data that is being tunneled through their APIs and how it can be used to optimize their business and operations is of paramount importance,” said Alistair Farquharson, CTO of Akana.
Jul. 27, 2015 09:00 AM EDT Reads: 323
Business as usual for IT is evolving into a "Make or Buy" decision on a service-by-service conversation with input from the LOBs. How does your organization move forward with cloud? In his general session at 16th Cloud Expo, Paul Maravei, Regional Sales Manager, Hybrid Cloud and Managed Services at Cisco, discusses how Cisco and its partners offer a market-leading portfolio and ecosystem of cloud infrastructure and application services that allow you to uniquely and securely combine cloud business applications and services across multiple cloud delivery models.
Jul. 27, 2015 08:00 AM EDT Reads: 1,901
The enterprise market will drive IoT device adoption over the next five years. In his session at @ThingsExpo, John Greenough, an analyst at BI Intelligence, division of Business Insider, analyzed how companies will adopt IoT products and the associated cost of adopting those products. John Greenough is the lead analyst covering the Internet of Things for BI Intelligence- Business Insider’s paid research service. Numerous IoT companies have cited his analysis of the IoT. Prior to joining BI Intelligence, he worked analyzing bank technology for Corporate Insight and The Clearing House Payment...
Jul. 26, 2015 09:00 PM EDT Reads: 1,573
"Optimal Design is a technology integration and product development firm that specializes in connecting devices to the cloud," stated Joe Wascow, Co-Founder & CMO of Optimal Design, in this SYS-CON.tv interview at @ThingsExpo, held June 9-11, 2015, at the Javits Center in New York City.
Jul. 25, 2015 02:00 PM EDT Reads: 389
SYS-CON Events announced today that CommVault has been named “Bronze Sponsor” of SYS-CON's 17th International Cloud Expo®, which will take place on November 3–5, 2015, at the Santa Clara Convention Center in Santa Clara, CA. A singular vision – a belief in a better way to address current and future data management needs – guides CommVault in the development of Singular Information Management® solutions for high-performance data protection, universal availability and simplified management of data on complex storage networks. CommVault's exclusive single-platform architecture gives companies unp...
Jul. 25, 2015 01:00 PM EDT Reads: 1,957
Electric Cloud and Arynga have announced a product integration partnership that will bring Continuous Delivery solutions to the automotive Internet-of-Things (IoT) market. The joint solution will help automotive manufacturers, OEMs and system integrators adopt DevOps automation and Continuous Delivery practices that reduce software build and release cycle times within the complex and specific parameters of embedded and IoT software systems.
Jul. 25, 2015 12:15 PM EDT Reads: 461
"ciqada is a combined platform of hardware modules and server products that lets people take their existing devices or new devices and lets them be accessible over the Internet for their users," noted Geoff Engelstein of ciqada, a division of Mars International, in this SYS-CON.tv interview at @ThingsExpo, held June 9-11, 2015, at the Javits Center in New York City.
Jul. 25, 2015 12:00 PM EDT Reads: 1,535
Internet of Things is moving from being a hype to a reality. Experts estimate that internet connected cars will grow to 152 million, while over 100 million internet connected wireless light bulbs and lamps will be operational by 2020. These and many other intriguing statistics highlight the importance of Internet powered devices and how market penetration is going to multiply many times over in the next few years.
Jul. 25, 2015 09:00 AM EDT Reads: 1,486