CloudTrader is an online stock trading application. Built 10 years ago using Java Servlets, JSPs, and JavaBeans, CloudTrader enables traders to log in, view their portfolio, get quotes, and buy/sell shares. This webinar focused on the use case of revitalizing an old application by migrating it into the cloud and adding services—in this case, an Autoscaling service, a SQL Database service, and a Session Cache service. The presenters also demonstrate the acceleration of technical due diligence of app migration and enhancement by using New Relic and Load Impact test services to verify the integrity of user experience and the load scalability of the cloud-migrated version of CloudTrader.
I’ve had my fair share of having to migrate apps and one thing that always gives an incredible amount of headaches is migrating the user interface. So when I’m doing that, can I use this as an opportunity to maybe split my application, so use that strategy here? What would I do?It’s called a microservices architecture where you take existing monolith applications and then you can break it apart. So this is applicable if you’re building brand new applications where you write multiple applications. Each application performs as one specific function and your final solution would be an app that uses all of them together. You can do that same practice with existing applications.So in this case, if I wanted to write a new UI for this Cloud Trader app, I don’t have to stick with this app. I can just write an entirely different application and I’ll go to the catalog. Maybe I’ll want to use PHP for my new app ’cause I hired a new PHP developer and this developer is amazing at writing UIs. Let them do that. They’ll write a nice new fancy UI and I’ll expose the existing EJB container or put in a new API. There are services on Bluemix so I can take your existing like JAX-WS, or WSDL, or normal REST APIs and convert them to whatever format you want. So I can expose those APIs to my PHP developer and they can consume those in the UIs, so now you have multiple applications.
That’s great. So another example when you were talking about hybrid is that I might choose to leave some of my applications in a local space and then use public cloud for perhaps my user interface.Right, so you can keep your application on premise, take advantage of our Connect & Compose Secure Gateway and cloud integration services to securely expose those applications onto the cloud so that they could be consumed by your PHP or your UI applications that’s on the cloud. Same thing for mobile applications. I want to keep everything the way it is but I want to build a new mobile app so I can just use Bluemix to connect the two together.
Are you able to use the services in the Bluemix catalog without migrating to Bluemix?Yes, most, if not all the services on Bluemix, you should think of them as microservices themselves. They expose an API. They expose an HTTP URL so that you can keep your application where it is and just consume it. So if I wanted the Watson Text to Speech service, I can go to the catalog, create a text to speech service, which will generate a set of credentials, a URL, some user name, and password, and I can just call that service from wherever you have Internet access.
During your demo, you showed some scaling by increase the number of instances. Can I do that programmatically and can I auto scale? As opposed to doing it by monitoring.Absolutely. The auto scaling API lets you configure its metrics two ways. It’s got a nice dashboard to where I can define a rule that says add two instances if the memory utilization exceeds 65 percent, and then I said once it goes back down to 40, then reduce by an instance. So I can use this UI to set the rules. Or it exposes a REST API and you can use whatever program you want to call the REST API to see how your application is doing, set new rules, or trigger the scale up and scale down.
This reminds me of a job I once had where we would run a backup during the night and that would have been real handy because during the backup, we have a spike that lasts for a few hours and we want it to complete within a certain window. You’re saying that I could crank up the number of instances, plow through that code, and then shut it back down.Absolutely, you can do that programmatically or you can use the dashboard.
How often do you recommend running load test?In general, I would recommend running load test by presenting average load against your staging and production environment very regularly, as often as you push new code. And also if you have traffic that is more seasonal, so say you’re running an e-commerce site and an important holiday is approaching, I would consider it very healthy to start preparing well before the season starts and start iterating on your testing so you can find your capacity limits before your customers do. That’s something we always try to tell our customers—run tests as often as possible because you don’t want to end up in a situation where you put something in production and realize once it’s in production that it’s failing or having a performance regression. So it’s very important to keep on top of your performance.
How do I know how many concurrent users to test?Usually people have some idea of the traffic levels they’re receiving to their website or web app from some analytics tool like Google Analytics, and there are simple formulas to convert the hourly sessions and also the session duration, to convert that to concurrent users. We have a formula for that on our blog that you can look up and use. One thing you could also do is compare your live production environment to your simulated test environment and run your analytics package on both and verify the load potentials are similar.
We have one last question for you prompted by your demo. Is the Load Impact Chrome extension the best way to create a testing scenario? What are the ways that I can load up a script to test?The Chrome extension is a very good starting point because it allows you to quickly record a browsing session to give you a scenario that you can keep playing with to make it more dynamic and realistic. Other options we have is a proxy recording feature so that you can set up a proxy and send traffic through it from whatever device you want basically like a mobile phone, for example, and then you record the traffic and convert it to a user scenario. Both those recorders are a very good way to get started.
What do I have to do to integrate New Relic into my Bluemix application?If you’re using Bluemix and bind the New Relic service that’s available in the catalog to your Java Liberty app, you don’t have to do anything else. That’s it. You just have to bind the service to the app and the build fact that powers the Liberty for Java on Bluemix; it instruments automatically. It will generate credentials for New Relic for you so that you can just single sign on directly to the dashboard and you’re ready to go.
Does this only apply to Java apps or does New Relic also monitor other types?Of course, Java’s still very popular, but New Relic supports Java as well as five of the other most popular web application languages including .NET, Node, Ruby, PHP, and Python.
That’s great! You were showing during your demo historical data and one of our listeners asked how far back does New Relic retain historical forms and analytics data?With the service that you combined from Bluemix, you get a standard account automatically created for you, and with that, you get one week of data retention so that you can do analytics and troubleshooting back as far as one week. With an expanded license of New Relic, we’ll save the data for months.
Can you also archive that out if you want to get a holiday period for observation later once the crush is over?Yes, absolutely. We do provide a RESTful API to enable you to export the data and consume it or store it.
Date/Time 07/27/2017 2:00 pm – 3:00 pm ET Register now! JSON Web Tokens (JWT) are a popular option in the authentication space, but there are some inherent risks. While you gain flexibility by using a JWT, you lose the ability to revoke a token once it’s issued. To minimize the time between an administrator locking […]
This week IBM introduced a new solution that will revolutionize microservices – Microservice Builder. This turnkey solution provides your business with an end-to-end user experience to develop and deliver microservices, hybrid and Docker containerized apps. To help you better understand the new solution and how it can help your company simplify its software delivery pipeline, […]