Deployment extremely slow

Hey all,

I currently run all of my web sites on a Tomcat7 server on a Centos6 VPS. (2 CPU, 2GB RAM). The technology I use is GWT, and a MySQL backend for data. I do not have performace issues with that at this time.

I am evaluating technologies since I need to do significant reworking on my primary website. Good time to swap to something new, and that may be around much longer.

I downloaded Eclipse Neon, JEE version, and did the very basic demo app using the maven archetype. Just a text box and a button and a call to send the text to the server and return it. I do a LOT more on GWT.

So, the app is now on Tomcat7 and using the latest JDK from Oracle (1.8.92). The problems I am encountering are: the app takes minutes to load. App frequently says that cookies need to be enabled (They are). App does not actually work, when I click the button to initiate the procedure, a blue line goes across the top of the screen then freezes at the same point, every time. The behavior is web browser independent.

So, I am guessing either the setup I did was messed up, the server is simply not enough to deal with what may be a much more resource heavy technology, or, Vaadin just sucks for performance to an unreasonable level. I am thinking it’s number 1.

I checked the RAM on the server, and it claims it is only at 50% usage. I cannot check the CPU usage.

Any ideas???

Sorry for the late reply, vacations. You are right, Vaadin is not that slow by default, something with your setup is broken. Have you tried other servers, e.g. Jetty? Is there any way you can run a profiler on either the browser or the server?

I have a vps, so I can probably run a profiler.

But as long as I know it is not THAT slow, I can justify setting up a VentOS 7 box here to test and get the configuration figured out.

I run Apache to serve SSL and Tomcat for the main web sites and REST.

I have never run a profiler, while I have maintained servers, I am not significantly experienced with setup troubleshooting. I have, but I am mo expert. Writing software is where my expertise lies.

Any profiler you recommend? Will have to read up on it and gain familiarity.

Thanks!

Oracle JDKs include VisualVM, which I’ve heard is OK. Personally I use JProfiler though. I am sure that your issue is a configuration one, but as I haven’t used that stack I can’t really help with troubleshooting. As for Vaadin performance, take a look at
http://demo.vaadin.com/sampler
. That is a Vaadin app, and should give you some indication on performance.

“Heard is ok” tells me to read up on JProfiler lol. Which I definitely will do.

The question isn’t really whether or not Vaadin CAN go fast. I can absolutely see that it can. It is just a question of how much horsepower do I need TO make it go fast?

I tried learning Ruby On Rails, just to see that it is just dog slow. Upon researching in more detail as to server requirements, it turns out that apparently people just beef up the servers to an unreal degree. Like 100 times the servers. They just throw more servers at it. Which for a company like Facebook is not that big of a deal. For a startup, which I intend, it would be a bigger deal.

That said, even if Vaadin takes 100 times the servers, I much prefer it’s capabilities and am already greatly experienced with GWT. So I could happily build a single super beefy server for it in order to get things off the ground. Just need to get a feel for how much beef to set up. That also allows me to estimate appropriate pricing for customers.

It definitely sounds like the realistic expectation would be a slight bit slower than GWT (due to more server side focus) but not otherwordly slower. Maybe 5% to 10%, not the 500% of Ruby on Rails. If that is the case, it would be very good news for me.

Performance is a tricky thing. You are correct in saying that Vaadin is slightly slower than GWT in use (development time is much, much better though). There is a point where we don’t typically recommend Vaadin as the tech anymore and you need to switch to something lighter (pure client-side with REST, for example). What that point is depends on your application. The majority of our clients build intranet apps, which Vaadin is very well suited for. It’s when you have public apps with thousands of cocurrent users where things get more difficult.

What kind of load are you expecting, and what complexity are your apps?

Very minimal load. Especially to start. 1,000 total users. Typically not concurrent.

I have already built the REST side, and am planning apps for iOS and Android. I already have built the admin tools with C#. But from what I could see on vaadin online, the vaadin technology translates well to mobile phones as is. That would get me off the ground with both iOS and Android and also redo our web interface in one swoop. That would be phenominal.

Then I can follow up with more feature rich apps in Android and iOS based on traffic analysis. Right now, iOS is by far our most used OS to visit our web site, so probably iOS app first.

But I was an Objective C guy, now they want Swift… little boogers. I learned Swift to a basic level, but not perfected yet…

No issues with that aount of users. Have fun developing, let me know if you run into any other issues :slight_smile:

Is 20k concurrent users still in the Vaadin wheelhouse?

If so, thats pretty much any intranet software for most Fortune 500 companies. Or a huge chunk.

Thanks again!

With the correct architecture and a (small) cluster, yes.

Sweet. That is as big as I would get. And with a Fortune 500 they easily have a budget for even a significant cluster.

Thanks a huge amount. Especially for your time.

No problem, glad I could help :slight_smile:

I set up a new server.
Software:

  • CentOS7
  • Tomcat 8
  • Java SDK 8
  • Java EE 7
    Hardware:
  • CPU: AMD Phenom II 1100T (6 Cores, but old technology)
  • HD: 2TB non-SSD hard drive (slow)
  • Memory: 8GB

All software is the latest updates.

Basic Vaadin runs extremely fast, to the point of being instantaneous. I would consider the hardware setup significant in comparison to anything you can rent online for a reasonable amount of cost. BUT, the total cost of the server hardware was probably around $500. So anyone with basic level technical skills can just build their own webserver. For simple stuff, I don’t see security as being that big of a deal. If a contract comes along with significant security risk, I would price it accordingly enough to build in the cost of a top server guy.

In conclusion, I would say that Vaadin is an extremely good choice for any startup. For a larger enterprise environment, I would still recommend Vaadin except for extreme cases that would require extreme performance and security (think banking software, and C++).

Since you had tried to help me, I figure you can potentially use this information with clients.
I have not yet flushed out performance with more detail level things, such as JSON and whatnot. I haven’t even looked into whether or not you can even do REST with Vaadin (server side). If not, I still have mine using Jersey. Without even looking, I bet I can just port it directly to Vaadin…

Have a great day, hope that helped a little.
Regards,
DB

Thanks for the update! As for REST, Vaadin does not include any helpers for it, but since everything runs serverside you are free to use whatever library you prefer to create them. I typically just use the built in features of whatever Java EE stack I happen to run on. Also, I disagree with Vaadin not working for banking; we have a very strong track record on security :wink:

I was mainly thinking the concurrent users thing more than security. Maybe Vaadin can handle the higher load. But it can clearly handle a significant load.

I already have REST written in Java using Jersey and also use Jackson. I have started writing a new implementation in Jersey as an entirely separate project. I have not decided on some details. For example, if most of Vaadin runs server side, it may be faster to just have the REST in the same project to use the same data access layer. I don’t want to have double caches eating up memory, but on another note, since I am running my own physical server, I can easily upgrade the memory anyways. My VPN has 2GB, my new build with “laying around parts” has 8GB. For 100 bucks I can up it to 16GB and make it super fast memory. I am actually leaning towards having double the cache and separate processes. Good neighbors have good walls, and I can then run performance tools on each individually. Then I can also build another server and run each on an independent server much easier since they are not intertwined. Hell, I have old computers laying around…

Yes, thousands of concurrent users is something you’d need to give some care to, mostly because of memory consumption. But it seems you have things well in hand… Let me know if there is anything else I can help you with.