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 have a system that the backend currently relies on Python.
Basically it has a series of scripts that will go through a MySQL database and check for certain parameters across multiple tables and then perform actions such as send emails and text messages then amend relevant cells to say these issues were dealt with. There is then another script that sits and listens on a port for UDP packets, unpacks them validates them and if they pass validation inserts them into the database and check to see if the data triggers any alarms will send an email and tech message.
My question is am I doing this the most efficient way? As I am not sure how to have a system of checking to see if the scripts are running and if not relaunch them. All of them run infinitely 24/7. Would rewriting them in Java be more stable and efficient?
There is no real way to answer either question without knowing all aspects of the system.
If your system basically have 2 scripts written in Python that perform well I don't see any reason whatsoever to change that architecture. One more consideration that I would give you to ponder is that at least one of these scripts is a support script and the guys responsible for support mostly don't care much about Java to be able to troubleshoot the code.
As far as JAVA is concerned I am not sure that you would be better off with Java then you are with Python. There is no shortage of expertise out there in either language but given what the programs are used for I'd say Python would be a better choice. If you are concerned about performance though I would look at Cython as a possiblity.
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 have developed an application that usually runs headless as a server module.
However the tool would benefit greatly from two things:
pluggable viewers that see what is going on (easy enough)
pluggable modules by which I mean the tool can generate events and you should be able (from a client tool) to connect to the server tool and temporarily register an event subscriber which can manipulate the server behavior based on the events (in realtime, so the events are not async)
The first can easily be achieved with a http server or the likes but the modules require a persistent connection. My language of choice is java but I'd rather not go for RMI but instead opt for a language-agnostic protocol. Any ideas which protocol would be uniquely suited for this situation and which might already have an implementation in java?
Another couple of options might be Akka (www.akka.io) actors in Java and/or Camel as event distribution mechanisms. I'm an Akka guy myself.
To me, you'd write your Akka event handlers in Java and those would be your modules.
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 intend to create a webapp in which members of an organization will sign in, filter and search for events, and sign up to attend events. I'm just making this for one organization, but I'll most likely make it open source when I'm done.
I have my own hosting space on GoDaddy, but then I found Google's App Engine and figured it would be more efficient.
I also plan on using Twitter Bootstrap and HTML5 Boilerplate (maybe?). UI is important to me. I'll also make an iPad app with the same function that uses the same data sometime soon.
So Python or Java? What are the advantages and disadvantages for this application for each? I've learned the absolute basics of both languages but have not used either of them for the web.
I'd consider the Go Programming Language, but it doesn't look as community-supported.
TIA!
#Blender and #Barranka are right. Both languages are equally well supported on App Engine, with only very minor differences. The web client libraries you mention should integrate equally well with either, and you won't easily be able to port code to iOS in either language. (If you also plan an Android app, that might be a vote for Java, but you didn't mention that.)
So the answer is, pick the language you prefer. Both will work.
(If you don't have a preference, maybe lean toward Python, since it's higher level and supports rapid development a bit better, and Java's advantages (performance, static typing, etc.) aren't as important for what you want to build.)
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 want to make a Java game engine that would be simple to use mainly for it would have a higher level language interpreter. I though about using Lua language with the LuaJ intertpreter, but I've got some really slow results...
I need suggestions for what other Lua-like languages (With a Java interpreter available) exist that (with an interpreter) could execute faster (than LuaJ) on my Java application.
In the domain of game programming, Java itself is considered slow. I would suggest that you can start with code generation facility built on top of Java. I have worked extensively on Drools , Groovy and similar DSLs and can vouch they are "slow" for even a typical enterprise app. One problem is the dynamic interpretation layer built over java. You can see the typical performances in this comparison study at http://www.slideshare.net/michael.galpin/performance-comparisons-of-dynamic-languages-on-the-java-virtual-machine
If you can work on creating a language which generates code before compiling, you will get best of both world. This doesn't mean you will need to know compiler theory stuff from day one. You can simply create utility functions in Java which you can distribute as client library. However, you will need to know Reflections thoroughly to approach the solution in this way. As nobody changes the code in a running production server, you will be perfectly fine.
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 watching node.js and its apps for a year now and I would love to replace bigger parts of my good old Java code with node.js.
The problem I noticed with node.js is that
it looks like a chaos, from version to version things don't work anymore
bad documentation, really bad
no idea what libraries have been ported or will be ported any time soon
multi core managment, does it ?
uses 100% of the CPU power regardless of what it actually does (ie : pauses in loops). Thats not green and this is important to us.
Regarding security concerns I would put it behind a reverse proxy and only my old and real Java server would be able to use it.
update : funny this question gets closed because its not constructive. how can the question be constructive when I don't have any glue? Thats why also I am aksing here ! You moderators here really suck sometimes.
However, would you rather suggest to wait before moving to node ? Or do you think its time to move over ?
I'm writing loads of Java server side code and I would start building my own base framework and then port piece by piece!?
Even if the questions gets closed:
Actually, it works pretty stable and backwards compatible so far
Are you for real ? --> http://nodejs.org/api/
Again: http://www.nodejs.org
Node didn't scale with CPU or core numbers, you should let the OS scale node processes by just launching multiple instances
That is just wrong.
Even if Node still is "young" in comparison to other "server-side considered languages", it already found its place in a lot of spots. It can deal easily with huge amounts of users, it's an excellent web-socket server counterpart, its lightning fast when it comes to dispatching network traffic to a lot active connections and its ECMAscript, the most sweet sugar language ever made (the last statement is personal opinion).
There are probably hundreds of valid use cases for Node.js, obviously there is no specific task were it is a "must use", but thats the same rule for any language most likely. Its fun, its fast, dig into it.
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.
What are the main advantages (and disadvantages) of using of an Application Server, comparing to a standalone application? I'm interested in Java approach mainly.
With an application server, the developer should spend time writing business logic (which delivers added-value) rather than boilerplate infrastructure code (e.g. managing transactions, configuration, security, etc.). So to me, the main argument is that using an application server should boost the productivity.
Unfortunately, the learning curve until you can unleash this productivity boost is rather long. In the worse case, misusage of application server features can even result in a productivity loss.
Also a general problem with any approach that raise the abstraction level (same with MDA, etc.), is that when something goes wrong it's harder to understand how to fix or circumvent the problem. On the other hand, if you do everything yourself at a lower abstraction level, you know how to fix problem easily but you re-invent the wheel again and again.
This is a high-level view of the concept of application server. For details about technical features of Java EE application servers, refer to the Java EE documentation or the link in the 1st comment to your question.