Wikipedia:Reference desk/Archives/Computing/2009 September 15

= September 15 =

Scalability of two-tier versus three-tier architectures
I'd be grateful for insight into the relative merits of a two-tier versus a three-tier architecture, from the point of view of the scalability of an IT application. Why might one approach be superior to the other? Consider, for instance, an Oracle Application Express (two-tier) versus J2EE or .Net three-tier architectures, for an application which might today serve 1,000 concurrent users, but next year 2,000 or 10,000.

I can (at least intuitively) understand the benefits of logical separation of elements of the application, per Multitier architecture, both in terms of modularisation of code and in the ability to provide distinct platforms for each of the tiers. And so I can see that there is some benefit, from the scalability perspective, in being able to ramp up the hardware provided to a distinct layer, based on an understanding of the pinch points in the system. But as a general proposition, can one approach be thought to be better than the other in its ability to scale, measured, I guess, in terms of cost of hardware deployed?

And - whilst we're on the subject - would I be right or wrong in postulating that a three-tier architecture will tend to need more tin than a two-tier architecture, all other things being equal?

I assure you this is not a homework question: I'm struggling to get an insight into what are for me rather abstract concepts, and I have an obscure interest which needs to be satisfied. thanks. --62.49.21.172 (talk) 00:23, 15 September 2009 (UTC)
 * It's really going to vary based on the application and the use-case. The real benefits of a three-tiered architecture come more from a project-management and logistics standpoint, rather than a purely hardware/software consideration.  By separating the different predicted bottlenecks, it's possible to assign teams to work on independently optimizing those cases.  However, the actual bottleneck in a given application is going to depend on the precise interplay of each transaction with each tier of the software architecture.  And, it's possible to measure the cost per unit of hardware in each sub-area, which can be evaluated by the budgeting people as a tradeoff against end-user experience and overall system performance.  As far as the "most tin", it's again going to be a case-by-case situation; but the system which uses the least number of nodes is also going to be the most tightly-knit, hardest to maintain, and least redundant system.  Modularity is useful in these deployed platforms for maintainability, more than performance; in truth, if it were possible, the entire system could be most efficient as a single layer application.  (The challenges of scaling then strictly rely on whether a single node can clone all the required data, and whether data hazards result from this).  But, the single standalone-node is the penultimate in pure parallelization - every single unit of the deployed system is a miniature, exact replica of the rest of the system.  "Scaling" simply means duplicating these units.  Upgrading or modifying, however, becomes a near-impossible task, propagating changes dynamically to n independent nodes.  Nimur (talk) 02:21, 15 September 2009 (UTC)

Installing Pygame on Ubuntu Hardy Heron
Hi,

I've been given a laptop with a fresh install of Ubuntu (8.04, Hardy Heron) I'm a total linux newbie, but have spent a few days getting a feel for Ubuntu (and liking it a lot, I might add), and wanted to try doing some game dev on it. Python + pygame seems like a good way to go, and the system came with Python 2.5.2 installed. I've been reading through the docs on the pygame site on how to install it, and mostly it seems to come down to doing a "sudo apt-get install python-pygame", but whenever I do that I just get 'package not found'

As I said, I'm very new to the whole Linux thing, so I might be looking in the wrong repositories or something (I don't really know how to change that yet, but I get that you can) I tried using Ubuntu's add/remove software manager, and searching the 'all apps' category, but nothing came up for pygame.

Any help would be appreciated!

--67.171.37.222 (talk) 03:09, 15 September 2009 (UTC)


 * You're probably not going to like this answer, but one friend of mine tried getting started with Pygame, struggled for a day, switched to XNA Game Studio with Windows, and was immediately far happier. Tempshill (talk) 04:35, 15 September 2009 (UTC)


 * Is this a new install? The package is in fact called python-pygame (at least in 9.04) so the problem probably that you don't have the repository (universe) enabled. Open System/Admin/Software Sources and tick the first 4 checkboxes in the dialog, then press close and then reload. It should find the python-pygame package now. BTW, Synaptics (System/Admin) is a lot better at searching for packages than Add/Remove software. --antilivedT 06:42, 15 September 2009 (UTC)
 * You, sir or madam, as the case may be, are a genius. Thank you! Worked like a charm, and pointed me to a great package manager I wasn't even aware of --67.171.37.222 (talk) 07:05, 15 September 2009 (UTC)

Escrow for virtual items either items from games or computer code?
I have been searching for days and google only turns up garbage. Does anyone know or know how to find escrow systems that would be good for selling virtual items over the internet such as item from games or source code for freelance coding? Normal escrow sites only deal with physical items or domain names and have $25 minimum escrow fees, and then source code escrow sites charge about $1000 minimum fees and are designed for only working with large companies and enslaving them with long-term contracts. Are you ready for IPv6? (talk) 05:18, 15 September 2009 (UTC)

Converting between SVY21 and WGS84 Coordination system
hello. Im on this project currently. To convert between the 2 coordinate system (SVY21 and WGS84) i found quite a bit of information. But just cant figure out how does SVY21 work. Any kind soul can help me with that? your aid will be greatly appreciated. —Preceding unsigned comment added by Razorsaber (talk • contribs) 05:56, 15 September 2009 (UTC)
 * SVY21 is a transverse Mercator projection. Our article on the subject may be of help. decltype (talk) 06:03, 15 September 2009 (UTC)


 * SVY21 is a geodetic datum (EPSG 6757), a geographic coordinate system (EPSG 4757) and SVY21 / Singapore TM (EPSG 3414) is the projected coordinate system decltype mentioned. The EPSG registry seems to be down at the moment, but here are the well-known text representations for the geographic and projected systems. What is it that you can't figure out? If you'd just like an introduction to coordinate systems, i'd recommend EPSG's Geodetic awareness guidance note.&mdash;eric 18:35, 15 September 2009 (UTC)


 * Oh, sorry for giving an inaccurate answer. decltype (talk) 19:25, 15 September 2009 (UTC)

db2 and sql
is there any difference between db2 and sql?if its there then please help me.... —Preceding unsigned comment added by Kc28kc (talk • contribs) 10:35, 15 September 2009 (UTC)
 * IBM DB2 is a Relational DataBase Management System (DBMS, a software package to handle databases) whereas SQL is a query language (a set of comands for extracting and manipulating data through a DBMS, unless you are talking about the Microsoft SQL Server - which is another DBMS). I know that's not very helpful but I don't know much more --ReluctantPhilosopher (talk) 13:28, 15 September 2009 (UTC)


 * "SQL was developed at IBM by Andrew Richardson, Donald C. Messerly and Raymond F. Boyce in the early 1970s" from Structured Query Language. --Jc3s5h (talk) 17:03, 15 September 2009 (UTC)


 * Do you mean mysql? Rbmj (talk) 19:07, 15 September 2009 (UTC)

The history and architecture of the ARM microprocessors
I would like learn about the ARM processors, how and when they began, including the architecture of the processor. A lengthy and detailed response will do. —Preceding unsigned comment added by 196.2.2.228 (talk) 15:34, 15 September 2009 (UTC)
 * Have you read ARM Holdings and ARM architecture? You can then start on some of thge people mentioned like Furber and Wilson. Dmcq (talk)

History glitch in Internet Explorer 8?
I have the problem at home, and apparently it's here at the library too.

I figure this computer must have the new version because the URL is gray except "wikipedia.org" is black.

I use the back button a lot but it seems that history repeats itself. Instead of going back, the back button seems to go forward before going back. I'm pretty sure I'm not clicking on the forward button by mistake. Vchimpanzee ·  talk  ·  contributions  · 17:53, 15 September 2009 (UTC)


 * Does this happen with one particular URL, or every URL you have seen? Do you end up, in fact, at the same page you started with, or do you end up one page back in the history?  Comet Tuttle (talk) 21:58, 15 September 2009 (UTC)


 * It doesn't happen that often. I did get stuck in an endless loop one day with just two pages. Vchimpanzee ·  talk  ·  contributions  · 18:12, 17 September 2009 (UTC)


 * I'm in an endless loop right now. And I see the Forward button "flashing". That doesn't happen.


 * I clicked on "Inbox" in my email. That stopped the loop. Vchimpanzee ·  talk  ·  contributions  · 20:06, 17 September 2009 (UTC)


 * It happened again. This time I got an error message because I had deleted the email I was going "back" to. It should have just gone back to where I was before I looked at the email I deleted. Vchimpanzee ·  talk  ·  contributions  · 20:11, 17 September 2009 (UTC)


 * I ended up in a loop. I don't know how. It wasn't email. It was Wikipedia. Vchimpanzee ·  talk  ·  contributions  · 18:04, 28 September 2009 (UTC)

JAVA repaint problem
This JAVA program works fine, except that the repaint method doesn't work. Why is this and how can I fix it?

--204.184.214.2 (talk) 19:01, 15 September 2009 (UTC)
 * While you're waiting, you might like to take a peek at Reference desk/How to ask a software question. --Sean 20:34, 15 September 2009 (UTC)


 * Absolutely - I agree with Sean's comment above.  Fortunately, I managed to track down your bug (I think).  First of all, you extend JFrame, but you also initialize a new JFrame, "game".  Instead, your class should call the super method, and you do not need a "game" instance variable.  (See how to use super to extend classes).  Also, you add your JCanvas to the JFrame; but (surprisingly) this is not correct.  In Java Swing, (unlike AWT), always add to contentpanes - not to JFrames.  (See why).  Read about Swing top-level containers here - in your code, you want to add to the JFrame "game" (or the JPanel "panel")'s content pane.  I've also boiled down some code for you to see how to do this properly.  Nimur (talk) 23:34, 15 September 2009 (UTC)

. Hopefully you will understand this simple code, and see the changes you need to make to your own class. Primarily, you want to use the Container object, obtained by the getContentPane method of the JFrame (or JPanel) that you plan to hold the drawable Canvas area. Watch out; you're secondary issue is that you're mixing up a JFrame instance called "game" with a TowerDefense object ("this"), which is also a JFrame. Nimur (talk) 23:33, 15 September 2009 (UTC)


 * (ec)If i remember correctly (and that pretty iffy for Java) JFrame.repaint does not actually repaint its contents. You do something like frame.getContentPane.repaint or declare a member variable for your canvas object and use canvas.repaint.&mdash;eric 23:36, 15 September 2009 (UTC)
 * The above depends on whether the JFrame's child(ren) are lightweight or heavyweight objects. There's more details here: Mixing Heavy and Light Components.  Repaint on the JFrame should cascade to the OP's JFrame content pane and its child JCanvas object, in this case - if the JCanvas resides on the Content Pane (but if the JCanvas resides on the JFrame, all bets are off).  Nimur (talk) 23:41, 15 September 2009 (UTC)

Here's my code after making the changes you suggested (with all the irrelevant parts removed). It still doesn't work. What else should I change? --204.184.214.2 (talk) 18:35, 17 September 2009 (UTC)

--204.184.214.2 (talk) 18:36, 17 September 2009 (UTC)
 * Did you follow Sean's and Nimur's advice, and read this? --NorwegianBluetalk 20:53, 17 September 2009 (UTC)


 * You only call your repaint method when actionPerformed is called. Is this what you wanted?  (Do you understand how Swing ActionListeners work?  This is the official Java Book on Swing Action Events, available free online).  Notice how in my example code, I called this.repaint in the constructor.  You aren't ever actuating the repaint function!  You either need to fire some ActionEvents, or set up a thread to schedule repaint calls, or some other method to ensure you are actually calling your painting code.  I'm not sure what your various game object classes implement, but I think you intend those objects to fire ActionEvents.  This is potentially functional; it might or might not be good architecture depending on your game application's needs (ActionEvents are supposed to be fired when buttons are clicked, e.g. - but if you want, you can fire them when the game state changes, too).  However, my guess is that your objects are never actually sending action events to the event listener.  You might seriously consider a separate thread scheduling repaint, independent of any UI events, to guarantee that the paint code is called (even if no game events have occurred).  This will ensure that there's always a fresh version being painted on-screen.  Nimur (talk) 21:37, 17 September 2009 (UTC)

Websites That Will Translate Letters -- Not Just Text From The Internet
Hello,

I've recently come across a few letters in a family archive that are in Dutch, Polish and Italian. Are there any places I can post scans of these to have them translated?

Thanks in advance for any help,

--Grey1618 (talk) 22:58, 15 September 2009 (UTC)
 * If they're not too long, you might find people on the Language Reference Desk who will do it. Otherwise, you'll probably have to type in the text.  --Sean 00:11, 16 September 2009 (UTC)


 * You mean places where you can hire human translators? Yes, a web search should find tons of them instantly.  You could also try something like craigslist to find someplace local.  There is no Babelfish for handwritten texts, and anyway if these are family letters that might contain private info, you are better off hiring someone under terms of confidentiality, than posting scans on the internet to be spread all over. 67.122.211.205 (talk) 07:53, 16 September 2009 (UTC)