As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I've been reading up on both GAE and GWT, and it seems that if you are deploying GWT apps to GAE then the following APIs are unnecessary:
PageSpeed
Channel API
Since GWT is already super-optimizing all client-side code, and includes all the necessary AJAX mechanisms to produce a "single page web app", then it seems to me that both of these can be ignored when deploying a GWT app to GAE.
My understanding of both these APIs is that PageSpeed helps optimize client-side code (GWT already does this), and that the Channel API is utilized for long-polling (which GWT obsolesces).
If I am incorrect, please help me understand why. Or, help illustrate scenarios where a GWT app would still benefit from these APIs. Thanks in advance!
I don't think they are entirely irrelevant.
PageSpeed: To be honest I don#t have much experience with PageSpeed. GWT does a lot of optimization to make sure that loading resources is fast (disclaimer: if you are using ClientBundle). As a result you might not see much of a speed increase when you activate PageSpeed for your GWT app. However according to the documentation it says:
PageSpeed Service will not serve stale HTML to your users. Typically
95% of the bytes needed to render a page are cacheable, but the HTML
itself is not. PageSpeed Service speeds up loading of your page by
caching the cacheable parts of your page (amongst other techniques).
This includes resources such as images, JavaScript and CSS. Please
refer to the information on controlling what resources PageSpeed
Service caches.
So you probably can achieve caching of static resoruces yourself by configuring the web-server serving them to cache them, however I guess PageSpeed will do that for you out of the box. Furthermore it seems that Google will prefetch the resources and then serve them from their servers which might be optimized for serving static resources compared to GAE.
I would recommend to try it out and see how much it helps.
Channel API: Channel API might be quite useful for your GWT app. Long-polling has a different use case compared to traditional AJAX calls. For example if you want to create a web based chat app in GWT, you can use the Channel API to support "real-time" communication between the clients and the backend.
So Channel API definately has its use case although 90% of the times you will probably use normal AJAX calls.
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I need some help on how to choose a technology for developing mobile apps. I have decided to use phonegap (cordova library) and Jquery mobile with HTML and complete my device APIs and UI parts.
Now I am in a dilemma, on which technology to use to connect to a database -
1. PHP
2. .NET
3. JAVA
I heard/read PHP is light-weight and is easy to work with but .NET is more robust and secured. Now, I am unsure of what exactly security here means? Does it mean PHP is not a secured way to handle database operations?
Can anyone please guide me on how to decide on a technology and take my development to a higher level?
I can give you more inputs as required. :)
Many thanks.
If you never ever touched any of these technologies you should use the easiest one.
Your priority should be like this, I will rank then from according to their usability/simplicity:
1. PHP
Good:
By far simpliest of them all. In a matter of days you can learn more then enough to create your basic server. No matter do you want to handle only REST calls or do full a page creation on a server side.
It has largest overall support and you will easily find hosting, if you already don't have it. It works on all current desktop OS's like Windows, Linux and MacOS.
Bad:
Not that much. If I have to think of any I would say that it is a smaller brother of Java and .NET.
2. .NET
Good
My favorite, more secure (but not that much secure) then PHP. It requires much more time to handle and use right. Like with Java I prefer its syntax over PHP. Still more readable syntax then Java, specially if you delve into something more complex.
Bad:
But, as it is a Microsoft technology it will run only on a Windows platform. Skipp it if this is a turn off for you.
3. Java
Good:
Almost best of both worlds. Better and more powerful syntax then PHP and unlike .NET you can run it on any available platform. Like .NET it requires more time to master correctly then PHP.
Bad:
Java is usually used in large corporate projects and you will not find that much help over some basic stuff and usage. Even if you master it correctly you will still need to delve into Java EE if you want to create anything decent and robust, basically it is a largest time sink if you only need to create one server application. Other problem is memory consumption, that is why you will see much less available Java hosting platforms the it is case with .NET and PHP.
Conclusion
If you don't have that much time and you are not sure you are ever going to use it again then stick to PHP. If you are planing on using this technology for a longer period then stick to .NET. And finally if you are going to use it in a longer period but Windows platform is a turn off then stick to Java.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I want to develop an application where server pushes a lot of data to client. (20 kb every 20 milliseconds) 500kbps. All of the data are double/float values.
I am trying to answer the question, if there is something inherent to desktop apps (Java Swing app) which will make it a better option for this use case as compared to a web app where data will be pushed over http.
Is there something about Java swing app and how data transfer takes place there from server to client, that makes them faster as compared to web apps (tomcat as app server .. JS at client side).
And how answer varies, if I say that web server and application are on the same local network.
My vote is desktop, but I'm bias (when the only tool you have is a hammer...)
My first thought is threads and custom networking. You get the added benefit of push and pull protocols as you need (yeah you can get this in a web environment to, but Java was designed for this, AJAX has been bent this need)
I'd also push a diverse and customisable UI toolkit, but one might argue that you can achieve this using HTML, but I've, personally, found the Swing toolkit faster to get running & easier to maintain, IMHO.
The downside would have to the need to install the app on each client machine and deal with updating
That's my general opinion anyway, hope it helps
The other question is, what does the app need to do?
It is highly unlikely that the UI will be displaying 1000 meters all at once. The users will most likely be looking at small number of meters at a time. The UI only needs to be updated for the meters that are displayed on the screen. This should cut down on the load considerably. Assuming that networking and cache database components will be about the same for both web as well as desktop app, the real differentiator then becomes how fast the charts/graphs can be rendered, and how often or how many people will be inclined to use it.
MadProgrammer's suggestion of prototyping make sense. The test data gained from the prototypes would answer the performance question.
Web based will be more useful/valuable because it can be used from any desktop, tablet or smartphone. I am assuming that it is desirable to get the data in front of as many users as possible, anytime and anywhere. Also, I don't think human eye can detect 20ms updates. You could probably make that longer and users would not even notice it. Movies are about 25 frames a second, i.e. 40ms/frame.
How many concurrent user are you anticipating? I don't think that should affect the solution as both can be made scalable.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I am going to work on an complex application.Application is about to create lakhs of form dynamically, on those form rules can be apply dynamically and transactions of that forms.
For this application points that must be keep in mind are below:
1.Fast Loading:
1.1 Intial application load time must be smaller.
1.2 As there are lacs of forms then controls many in count of lakhs of lakhs with all properties.So while fetching forms from DB it should be fast.
2.Control Richness:
Which ever frame work used, It should be rich in controls, Control like:Date, Date Time Picker, Grid,TextBox,TextAera,Combox etc.
3.Browser Comapibilty
It should be compatible with all browser.
4.Resolution Indepedance
Application should be resolution independent.i.e It should work for every resolution and for every browser.
5.Mobile Compatibility
For this purpose I just started with a demo application.For this I selected GWT2.0.3 + gwt-ext,Hibernate
Hibernate is satisfying all the need regarding back end.But I am not satisfied with GWT as there loading issues,Browser issuse.
So I just need assistance for selecting frame work.Please also suggest me about the pattern
i.e. MVP,MVC.
I also searched abut spring framework But not much aware of it.
So please suggest me regarding this.
I am surprised you found issues with GWT. Personally I feel, it is one of the cleanest front-end implementations. (did you face issues integrating it with hybernate maybe?)
Anyways, another framework that is java style based (extends gwt and is richer) is Smart GWT that you can look into. I did a detailed comparison here which answers your questions - GWT,Smart GWT,GWT-ext comparison
If you are not looking for a java style based front end, you should look at jQuery too. http://jquery.com/. It even has a version optimized for touch http://jquerymobile.com/
EDIT -
1) You could even look at flex, which is a flash based. http://www.adobe.com/products/flex/
2) Also, if web based forms is the major area, look at Grails http://www.grails.org/
Point 1. Since you consider using Hibernate try "Extra‐lazy" collection fetching and lazy attribute fetching. The elements of the collection are accessed from the database as needed. I think it is a configuration issue to start up faster.
You will probably get faster startup if you use JDBC instead, but Hibernate will cut a lot of development time.
Also the JavaScript files containing your client application may take a lot of initial time to load, so split your application in smaller parts.
and 2. GWT covers your Control Richness issues and gives you a fairly reasonable Browser Compatibility. Gives you everything you have in a desktop Java Application.
About "all browsers": You can not have GUI Richness and Netscape 1.0 compatibility. JavaScript was not invented before Netscape 2.0
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I am currently using BlazeDS and covet the features of LCDS, but am never going to ask my customers to pay the $$$. Therefore I am considering starting to build these capabilities myself, using third party tools (dpHibernate?) or switching to GraniteDS.
Since, we are coming up on the two year anniversary of the last time this question was asked, I thought I'd ask it again.
Since that time, Spring-Flex has added Hibernate serialization support to BlazeDS to avoid lazy init exceptions. There is also a new BlazeDS configuration option to serialize read-only properties.
On the other hand, the Tide capability of GraniteDS seems to be maturing.
Plus the servlet 3.0 spec has been out for a while and maybe the additional support for NIO makes a difference for those who need push-type messaging.
So what's the latest?
As of today (February 29, 2012), the GraniteDS community is still very active, the product evolves with new features on a regular basis and you can get developer and production support if you run into technical issues (see here) or just want a kind of insurance for critical deployements.
GraniteDS' messaging is based on asynchronous servlets, it is mature (introduced late 2007), proven in demanding production environments and much more scalable than the BlazeDS messaging stack (based on classical servlets).
I've never used GraniteDS in production, but in my opinion it will always have more goodies than BlazeDS..unless some company will decide to make money from BlazeDS, like adding features, offering paid support & professional services. I think that Farata Systems is doing that but probably they are doing custom development for various clients..and not adding features into the mainline.
So probably from a productivity point of view GraniteDS can be a good choice - before choosing it I will double check if the community is quite active, if you receive answers to your technical question on their forums and most important if it's easy to understand the GraniteDS source code in case you run into technical difficulties.
Related to messaging I assume that if you wish a professional solution you will not choose niether BlazeDS not GraniteDS - there are dedicated solutions on the market. If not both should be ok (BlazeDS has a little bit more options from what I know).
By professional solutions I mean LCDS, Lightstreamer, Kaazing (and probably more). Some important features from LCDS which are not included BlazeDS: reliable messaging, message throttling, the ability to deploy the solution in architectures where DMZ is a must (http://www.lightstreamer.com/architecture.htm), the ability to connect also to non Flex clients (HTML).
Actually we (Farata Systems) continue improving our open source offering that works nicely BlazeDS. The latest version (4.2) of our tool called Clear Data Builder can generate CRUD applications in minutes based on Hibernate or POJOs. We hooked up Spring framework too - all BlazeDS client's requests are processed by Spring's DispatcherServlet.
Here's the Wiki Page http://cleartoolkit.com/dokuwiki/doku.php. There are screencasts and a workshop at the bottom of the main Wiki page that takes you step-by-step through the BlazeDS with Hibernate process and you'll also see how easy it is to connect the Spring Security module. We support data synchronization, hierarchical data collections, transactional updates, pagination, and more.
Apparently, we need to make more noise to make this nice (and free) product more popular :)
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
We're creating a web system using Java and Servlet technology (actually Wicket for the presentation layer) and we need our system to be available nearly always as our customers will be quite dependent on it.
This has lead us to look for a good book focusing on the subject or another resource which explains how to set up a more redundant and fail safe architecture for our system.
A non exclusive list of questions we have at the moment:
How do you have one domain name (like http://www.google.com) which are actually served by several servers with load balancing to distribute the users? Isn't there always a point which is weaker in such a solution(the two [as there can't be more] DNS servers for google.com in their case)?
It seems like a good idea to have several database servers for redundancy and load balancing. How is that set up?
If one of our web servers goes down we would like to have some kind of fail over and let users use one that is still up. Amongst other things the sessions have to be synchronized in some way. How is that set up?
Do we need some kind of synchronized transactions too?
Is Amazon Computer Cloud a good option for us? How do we set it up there? Are there any alternatives which are cost effective?
Do we need to run in a Java EE container like JBoss or Glassfish?
Regarding GlassFish, centralized administration through the admin GUI is a big help for environments with more than one appserver instance to manage. "Always available" is overloaded. It can be service availability with no session retention on failure, or it can mean data availability with session information backed up. Of course, GlassFish can do both. A couple of resources that may be of help regarding GlassFish and high availability:
Guide to GlassFish High Availability:
http://www.sun.com/offers/details/glassfish_HAref_config.html
Setting up a GlassFish Cluster in 10 minutes:
http://blogs.oracle.com/jclingan/entry/glassfish_clustering_in_under_10
John Clingan, GlassFish Group Product Manager
The Liferay wiki has a high availability guide entry outlining an architecture that could serve as a starting point.
This is probably a simplistic approach, but I've implemented a similar kind of load balancing and high availability solution recently.
My application had Tomcat as the web container and MySQL database. I've fronted Tomcat with the Apache Http Server and used the Apache mod_jk2 module as the interface to handle load balancing and failover.
Plenty of resources are available on the web starting from the Apache documentation. Here are a few:
http://tomcat.apache.org/connectors-doc/reference/workers.html
http://www.redhat.com/docs/manuals/rhaps/jonas-guide/s1-load-balancing.html
http://tomcat.apache.org/connectors-doc/webserver_howto/apache.html
For MySQL, check out MySQL proxy for load balancing and failover. Its a good idea to have more than one database servers for load balancing and fail over. one set of databases can be for reads and the other set for writes. Depending upon the volume, you might want to allocate more/less servers for read/writes. Your database documentation might also help you in the configuration.
HTH.
A friend of mine says that Building Scalable Web Sites is the definitive book on the subject:
Scalable Internet Architectures by Theo Schlossnagle might also be of interest.
I just finished reading Architecting Enterprise Solutions: Patterns for High-Capability Internet-based Systems. Excellent introduction for me on scalability, availability, performance, security, and a whole lot of other aspects for Enterprise Systems