|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.
More and more brands have jumped on the IoT bandwagon. We have an excess of wearables – activity trackers, smartwatches, smart glasses and sneakers, and more that track seemingly endless datapoints. However, most consumers have no idea what “IoT” means. Creating more wearables that track data shouldn't be the aim of brands; delivering meaningful, tangible relevance to their users should be. We're in a period in which the IoT pendulum is still swinging. Initially, it swung toward "smart for smar...
Oct. 27, 2016 11:45 AM EDT Reads: 1,239
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.
Oct. 27, 2016 11:30 AM EDT Reads: 1,908
In past @ThingsExpo presentations, Joseph di Paolantonio has explored how various Internet of Things (IoT) and data management and analytics (DMA) solution spaces will come together as sensor analytics ecosystems. This year, in his session at @ThingsExpo, Joseph di Paolantonio from DataArchon, will be adding the numerous Transportation areas, from autonomous vehicles to “Uber for containers.” While IoT data in any one area of Transportation will have a huge impact in that area, combining sensor...
Oct. 27, 2016 11:00 AM EDT Reads: 1,148
Intelligent machines are here. Robots, self-driving cars, drones, bots and many IoT devices are becoming smarter with Machine Learning. In her session at @ThingsExpo, Sudha Jamthe, CEO of IoTDisruptions.com, will discuss the next wave of business disruption at the junction of IoT and AI, impacting many industries and set to change our lives, work and world as we know it.
Oct. 27, 2016 11:00 AM EDT Reads: 251
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, discussed the infrastructures businesses will need to implement to handle this explosion of data by providing specific use cases for filterin...
Oct. 27, 2016 11:00 AM EDT Reads: 3,051
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 ...
Oct. 27, 2016 10:15 AM EDT Reads: 1,415
Ask someone to architect an Internet of Things (IoT) solution and you are guaranteed to see a reference to the cloud. This would lead you to believe that IoT requires the cloud to exist. However, there are many IoT use cases where the cloud is not feasible or desirable. In his session at @ThingsExpo, Dave McCarthy, Director of Products at Bsquare Corporation, will discuss the strategies that exist to extend intelligence directly to IoT devices and sensors, freeing them from the constraints of ...
Oct. 27, 2016 10:15 AM EDT Reads: 3,220
DevOps is being widely accepted (if not fully adopted) as essential in enterprise IT. But as Enterprise DevOps gains maturity, expands scope, and increases velocity, the need for data-driven decisions across teams becomes more acute. DevOps teams in any modern business must wrangle the ‘digital exhaust’ from the delivery toolchain, "pervasive" and "cognitive" computing, APIs and services, mobile devices and applications, the Internet of Things, and now even blockchain. In this power panel at @...
Oct. 27, 2016 09:15 AM EDT Reads: 2,159
@ThingsExpo has been named the Top 5 Most Influential M2M Brand by Onalytica in the ‘Machine to Machine: Top 100 Influencers and Brands.' Onalytica analyzed the online debate on M2M by looking at over 85,000 tweets to provide the most influential individuals and brands that drive the discussion. According to Onalytica the "analysis showed a very engaged community with a lot of interactive tweets. The M2M discussion seems to be more fragmented and driven by some of the major brands present in the...
Oct. 27, 2016 08:45 AM EDT Reads: 11,587
Amazon has gradually rolled out parts of its IoT offerings, but these are just the tip of the iceberg. In addition to optimizing their backend AWS offerings, Amazon is laying the ground work to be a major force in IoT - especially in the connected home and office. In his session at @ThingsExpo, Chris Kocher, founder and managing director of Grey Heron, explained how Amazon is extending its reach to become a major force in IoT by building on its dominant cloud IoT platform, its Dash Button strat...
Oct. 27, 2016 07:00 AM EDT Reads: 4,938
19th Cloud Expo, taking place November 1-3, 2016, at the Santa Clara Convention Center in Santa Clara, CA, will feature technical sessions from a rock star conference faculty and the leading industry players in the world. Cloud computing is now being embraced by a majority of enterprises of all sizes. Yesterday's debate about public vs. private has transformed into the reality of hybrid cloud: a recent survey shows that 74% of enterprises have a hybrid cloud strategy. Meanwhile, 94% of enterpri...
Oct. 27, 2016 07:00 AM EDT Reads: 5,022
You have great SaaS business app ideas. You want to turn your idea quickly into a functional and engaging proof of concept. You need to be able to modify it to meet customers' needs, and you need to deliver a complete and secure SaaS application. How could you achieve all the above and yet avoid unforeseen IT requirements that add unnecessary cost and complexity? You also want your app to be responsive in any device at any time. In his session at 19th Cloud Expo, Mark Allen, General Manager of...
Oct. 27, 2016 06:45 AM EDT Reads: 1,068
SYS-CON Events announced today that Streamlyzer will exhibit at the 19th International Cloud Expo, which will take place on November 1–3, 2016, at the Santa Clara Convention Center in Santa Clara, CA. Streamlyzer is a powerful analytics for video streaming service that enables video streaming providers to monitor and analyze QoE (Quality-of-Experience) from end-user devices in real time.
Oct. 27, 2016 06:45 AM EDT Reads: 1,095
Cloud based infrastructure deployment is becoming more and more appealing to customers, from Fortune 500 companies to SMEs due to its pay-as-you-go model. Enterprise storage vendors are able to reach out to these customers by integrating in cloud based deployments; this needs adaptability and interoperability of the products confirming to cloud standards such as OpenStack, CloudStack, or Azure. As compared to off the shelf commodity storage, enterprise storages by its reliability, high-availabil...
Oct. 27, 2016 05:45 AM EDT Reads: 1,275
The IoT industry is now at a crossroads, between the fast-paced innovation of technologies and the pending mass adoption by global enterprises. The complexity of combining rapidly evolving technologies and the need to establish practices for market acceleration pose a strong challenge to global enterprises as well as IoT vendors. In his session at @ThingsExpo, Clark Smith, senior product manager for Numerex, will discuss how Numerex, as an experienced, established IoT provider, has embraced a ...
Oct. 27, 2016 05:30 AM EDT Reads: 1,217
The Internet of Things (IoT), in all its myriad manifestations, has great potential. Much of that potential comes from the evolving data management and analytic (DMA) technologies and processes that allow us to gain insight from all of the IoT data that can be generated and gathered. This potential may never be met as those data sets are tied to specific industry verticals and single markets, with no clear way to use IoT data and sensor analytics to fulfill the hype being given the IoT today.
Oct. 27, 2016 04:45 AM EDT Reads: 2,886
Donna Yasay, President of HomeGrid Forum, today discussed with a panel of technology peers how certification programs are at the forefront of interoperability, and the answer for vendors looking to keep up with today's growing industry for smart home innovation. "To ensure multi-vendor interoperability, accredited industry certification programs should be used for every product to provide credibility and quality assurance for retail and carrier based customers looking to add ever increasing num...
Oct. 27, 2016 04:00 AM EDT Reads: 787
In the next forty months – just over three years – businesses will undergo extraordinary changes. The exponential growth of digitization and machine learning will see a step function change in how businesses create value, satisfy customers, and outperform their competition. In the next forty months companies will take the actions that will see them get to the next level of the game called Capitalism. Or they won’t – game over. The winners of today and tomorrow think differently, follow different...
Oct. 27, 2016 03:45 AM EDT Reads: 1,117
“Media 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. CloudBerry Backup is a leading cross-platform cloud backup and disaster recovery solution integrated with major public cloud services, such as Amazon Web Services, Microsoft Azure and Google Cloud Platform.
Oct. 27, 2016 03:45 AM EDT Reads: 1,516
In his general session at 19th Cloud Expo, Manish Dixit, VP of Product and Engineering at Dice, will discuss how Dice leverages data insights and tools to help both tech professionals and recruiters better understand how skills relate to each other and which skills are in high demand using interactive visualizations and salary indicator tools to maximize earning potential. Manish Dixit is VP of Product and Engineering at Dice. As the leader of the Product, Engineering and Data Sciences team a...
Oct. 27, 2016 03:45 AM EDT Reads: 783