I would like to know whether a net server game for a game like packman can be held on google application engine easily? In terms of response speed.
I want to set a server which can manage the game tables in which the games will be held.
Each table will have two players only.
I don't understand if I can upload a java applet to GAE and how I'm doing so.
Any other suggestions about other free servers which can be suitable for a real time action games?
Thanks
GAE supports only short-lived connections (about 30sec max). Which means you can not have a permanent connection open between your client and GAE server. This effectively prevents push notifications from server to client, which are needed in most gaming setups.
To alleviate this limitation, Google introduced Channel API which enables you to push messages from server to client. However you need to use their javascript library on the client side. You could write an applet which calls javascript to access this library but this could be a bit of a kludge.
All-in-all, due to this limitations, GAE could prove not to be the right fit for your needs.
Update:
There is another reason why GAE is not fit for real-time communication between users: a client request to GAE app can be served by any server that Google chooses. Two users communicating could be connected to two different servers, even in different data centers (maybe even on different continents). To pass data between them you'd need to store all messages to datastore (slow) or to memcache (unreliable and possibly slow because it would need to propagate between servers/datacenters).
You can use permanent backend for fast responces and break through 30 response limitation. You manually can define instances of backends. If you set it to be permanent - it is always will be on. And you can use your own implementation of in memory cache for fast data storing. Not sure, but maybe performance of data store will be ok for you.
If DataStore ok and you don't have requests that can take more than 30 seconds - use fronend with high performance settings.
Yes you can upload applet. Just put it somewhere in war folder and make reference to it from your jsp/html
Well, if you need java, free for startup your project - I don't know alternatives to GAE
Related
I'm going to start by admitting that I have little experience in this domain outside of measuring response times using Chrome Developer Tools.
I need to provide baseline performance measurements for a web application that is hosted in WebSphere. This is a Java-based web app, and is primarily accessed from mobile devices (iPhones, used in areas with varying connectivity).
My management wants response times for specific actions and/or pages in the app I worked on. What is the best way I can capture this data? Ideally, I'd like to be able to seperate response times for different pages in the app, and also by user session (so that we can isolate different users with different levels of connectivity).
Can this be done from WebSphere? Or does this need to be completed on the client end? I've found WebSphere's PMI module, however I don't know if this will allow me to isolate stats based on specific users and user actions?
Thank you!
To get a realistic view of the performance that mobile users of the web app will experience, you probably should use a mobile device test framework. I have never used such tools, but Dr Google returns a bunch of helpful-looking pages when queried with "mobile device performance testing tools". :-)
As you mentioned, WebSphere PMI provides many types of measurements about the performance of various aspects of the application server:
https://www.ibm.com/support/knowledgecenter/SSEQTP_8.5.5/com.ibm.websphere.base.doc/ae/rprf_dataorg.html
including measurements specific to web applications, with some average response time metrics:
https://www.ibm.com/support/knowledgecenter/SSEQTP_8.5.5/com.ibm.websphere.base.doc/ae/rprf_datacounter10.html
But those measurements will generally be aggregated at some level much higher than individual users or user sessions, since they are intended to provide information about the overall performance of the system.
Also measurements taken in the app server will not include the transport time for the request and response to travel between the mobile device and the app server, or the time for the response to be rendered and displayed by the mobile device. So those metrics will not reflect the actual user experience.
We are a group of 6 students in the last year of our studies.
We have to add new features on an existing web application. One of the most important feature and in our opinion the hardest one to implement is the following : the web application has to be functional even when offline.
As for, you must be able to consult data, make changes to the data, and when your device will be able to connect again, the app must try and synchronize with the online database. The current application use the following technologies : apache tomcat / mySQL / Hibernate / JavaEE / JavaScript / Ajax / xHTML & HTML5.
Considering that the main devices that will use the application are mainly digital tablet, smartphones (windows and android, not iOS for now), and windows PC ; my main question is the following one :
How can you do this kind of thing ?
I've done some research and it seems like you have to do a 'second' application, which will use mainly HTML5 to consult data while offline and JavaScript to control what the user is doing and what he can do. But we have no idea about the synchronization. It seems like SQLite could be of use as well
I know this is a general question but we are in the phase where we try and make sure everyone understands what the next steps will be. Thanks for your help and explanations.
Solution-1 : custom solution
There are api available to store data locally called indexDb in javascript which may help to store data.
For synchronisation i found that service workers may help.
Solution-2 : ready made tool
You can also try pouchdb but for this i think at server side you have to take apache couchdb database. I have not used it but would like to try this once.
Take a look at the Service-Worker API. Service worker is a programmable network proxy, allowing you to control how network requests from your page are handled. It's the next generation of giving users an offline experience after the App Cache.
The Service worker - in combination with local storage or even better WebSQL or a polyfill like localforage could be a way to realize that kind of application.
Downside: Service-Worker require SSL, no way around that. Second, only latest chrome and firefox support these technologies.
You might lookup PWA Progressive Web Application as a keyword, which describes / and uses exactly that kind of technologies.
I have a java application which is used many computers in my office network. This is a java swing application, and when there is an update most of the time I have to update each computer. Currently there is a mechanism to update these applications automatically but it seems like it is not working properly, that is I have a simple table in the database which hold the released versions number and when the application starting it checks its' versions against the database. If it is not tally then it downloads the whole application from the FTP server which we have installed in our network.
Recently thought to create a server to do this task. But, I don't know whether it is a good practice to do.
My idea is, there is a server which can get the md5 hashes of each file in the FTP server and send that hash list and file list to its' clients. When the clients (my swing application) get this lists it compares those hashes against its' files and if there is a mismatch client can download that file from the FTP server.
Please tell me that is this a good method to do for updating a java application?
You should use Java Webstart.
It's designed for exactly this scenario: automatic downloading and update of an application from the internet and/or intranet.
It even does clever stuff like application versioning and ensuring that new files only get downloaded when they are needed through intelligent caching.
Another option:
Since this is in an internal network. If you don't want to use webstart (best option).
Create a small front end application that use a URLClass loader and always load it on the fly. Since this is an internal network unless the application is huge. It should take less then a couple of seconds to launch.
I have the same server side application running on multiple machines.
I would like to provide a way to push changes to all the applications. I'm more interested in state/property changes to the objects themselves, and not so much replication of files, etc.
So I'm envisioning an admin console, where I would change some property, and have the change affect each applications state.
I am currently looking into JGroups, which is a toolkit for reliable multicast communication. In this case, each application would listen in on the same multicast group, and the admin console would send changes to the group.
Are there any other solutions/techniques available?
There exist alot of techniques, corba, rmi etc etc. However if you want a fully distributed system with no central server, I would personally recommend JGroups.
If you have a central server you can either
Let the server push the changes to all clients. The server must be aware of all clients, either directly or by having the clients register themselves.
Let clients poll the server.
Other simple solutions might including, polling a central database or a central file.
A quick Google search turns up: http://www.hazelcast.com/product.jsp. Which looks promising but I have no experience with it.
For the more complex scenarios I can't recommend terracotta enough.
Essentially terracotta distributes parts of your heap to the network, meaning that your applications share parts of the heap. Changes made by one app in the shared heap will be visible to the other applications sharing the heap. The main drawback is that terracotta needs a dedicated server since it's a hub and spoke design.
Apache ZooKeeper from the Hadoop project may also be interesting. I have no experience with it, but from the webpage I conlude it offers a hierarchical datamodel. Each application interested in changes can watch for changes in a specific node and act upon the changes.
http://zookeeper.apache.org/doc/trunk/index.html
We use a back-office accounting system with an SQL db2 database. Our sales, service and management all have Blackberries. I have started to write some HTML web scripts that go through BES sever so staff can access and update data (sales summaries, late orders, AR approvals).
The next level seems to be using the native blackberry applets to manage data. For instance we could use an application that notifies head of A/R when a substancial order is being prepared for a customer who is behind in payments. This would require a form of push notification (message and/or email) from server, an entry in Blackberry database, a screen to view list of unapproved orders, a way to approve/reject orders that would update local database and backoffice server.
Questions
what language? Java J2ME with blackberry classes seem most obvious, but is there any viable rapid development tools on this platform?
what database on Blackberry? Is there a choice?
what is appropriate technology to push and pull data (sockets, http?)
can we hire a regular Java guy with a year or two exp, or do we need a Blackberry specialist
is synchronizing data an issue. If blackberry is out of range, will missing messages be synchronized automatically or do you have to control this programically?
thank you
Blackberry apps are Java using a proprietary API. It's derived from J2ME but you have to use the BB APIs in order to do anything interesting. A lot of BB developers use the Eclipse plugin. Compared to Android and iPhone BB dev is a bit clunky.
BB's running OS 5 and higher have SQLite on the device. All devices have a "Persistent Store". The store gives you broad support if your users have older devices.
Now of course on your backend you can use whatever database you want :)
BB's can do http, sockets, wifi (depending on the device). Things like carrier-tcp can be unreliable on older devices and with certain carriers. However since you have a BES, you can use the MDS service which tends to be reliable (provided the BES is running).
You can also get notified from push messages which are sent to the BES. This is useful for low-latency.
I guess most people can learn this, but I recommend finding someone with specific BB knowledge. In my experience I've found the platform pretty tricky to do things well. I've had to experiment a lot to get things working.
Push messages are 'fire and forgot' but there is a 'reliable push' mechanism I haven't used. In general wireless apps have to be good about not depending on network reliability.