views:

197

answers:

3

Hi

I am stuck while making a programming decision,

I am a .Net developer, I am currently building an application for my client that receives data from a third party application, it has to then perform operations on the values and send it to a webservice/servlet which then displays data to a webpage, The catch here is that the data being sent to the user(voting options, count etc) on the webpage must be updated every 2 seconds at the latest,

I have lots of confusion making some decisions,

1) The data provider (third party app) recommends Java but doesnt enforce it, while I am good at .Net(C#), would you recommend building the app in C# or Java. in terms of optimisation and speed, which would be better? what do you guys recommend?

2) aftr receiving data from third party, me and my colleague are having mixed thoughts, I would prefer that as soon as data is received, we should write it to a db (since they are only a few fixed fields being sent each time), and then get the webservice/servlet to retrieve the data and then make calculations on it, my justification is that we would also have a track and historical data and user thought pattern if we save it, while m,y colleague says that saving it to db will delay the application considerably and that we should directly poll data from the app, he also reckons that the db will become massive in no time and slow, we tried doing this but it is causing a 8 second delay (for some reason tomcat is retrieving data only after every 7 attempts if its a webapp and saving it every second if it is a java console app., ) my thoughts are that if we save to db and retrieve from there, we can get the console app to write to app each second and then retrieve data using the webservice every second or so depending on what we want.

In this scenerio, what do you guys reckon is a good approach, should we save to db or not save to db?

3) Say even if we did save to db, would you reckon using berkeley or sqlserver make a difference? i would prefer using sqlserver for .net an berkeley for java

I know its a pretty big question and would be pretty boring but any help/suggestions will be much appreciated, please help us get more clarity with these issues stack overflow.

Thanks for your time!

Regards.

+4  A: 
  1. You know C#, then use it. If no other constraints of technologies, use what you know best.

  2. Don't think of performance until you've tried both scenarios. Do a proof of concept, your way and your coleague's way, see the performance differences and whether the historical data advantace worths the performance difference.

  3. Use SQL Server for C#. You may need to consider licensing into consideration (you know better the context of the project anyway).

Cătălin Pitiș
+2  A: 

If you're comfortable with .NET, why would you spend time with Java? My concerns against Java are irrelevant, but in any case you'll be spending time learning Java, probably falling into the same pitfalls that any beginning developer falls into with any tool or technology.

I say, if you're comfortable with .NET, do it in .NET. The end result won't be a lot different, but you'll get there faster.

Then, making the calculations and using the database as a form of "cache" is different from keeping a track record. You can return the results from the third-party app and still store the history in a database. If it's too slow, queue it.

Dave Van den Eynde
A: 
  1. Use the language you know best as long as it is OK for your client.

  2. Ask your client if the data has to be persisted, if it doesn't do no persist it. If you have to persist it you can do it asynchronously with no impact on the online processing.

  3. I don't know the differences, but the answer depends on what you want to do with the persistent data (how long do you want to keep it, do you need backups, are you willing to pay for a solution)... So if you know what you want to achieve you can choose the right tool, and maybe it won't be a database...

pgras