I am trying to monitor CPU / Memory process and etc.
Are there studies or article on the approach of monitoring such systems?
For example..
Duration it stays above 80% before sending an alert.... and after an alert.. under what circumstances it will be resolved and etc.
Is more of an literature review rather than jumping into the implementations aspect.
Project is written in Java
If you want to use a Standard API for Java you can use Java Management Extensions JMX to monitor various server metrics. Oracle offers a good tutorial. There are various implementations and you should research them on your own. If you are already using Apache ActiveMQ in your applicaiotn you could try their built in support. I have heard good things from people I work with about the Sigar version (I am not affiliated with them in any way).
Related
I am an Engineering final year student. I am doing project in cloud computing. I have confident idea about the concept. But i don't know how to simulate the concept in cloud. For PG student level Which cloud computing simulation environment is easy to use? Kindly give your
valuable suggestion. ( Now i am implementing the concept in java )
Try taking a look at OpenShift, its free and very easy to use if your familiar with Unix/Git. I host my blog there on a Java/Unix/MySql stack and have been very satisfied.
Firstly, I recommend you to understand the difference between an IaaS and a PaaS. Wikipedia is always a good place where you can find this information. Maybe you could compare both cloud computer models.
You will see that on PaaS is much easier start with a service since you don't need to install, neither to configure anything. Usually, you just need a button to make available a specific service and not a lot of steps to deploy your application.
You should look for the "How to start" of different PaaS providers. You can start for this How to start tutorial and after this, look for similar guides and compare the most important providers. You could see that it is really easy start working on this cloud model.
Agree: PaaS might be a good starting point. I don't have any experience with Java though, a quick Google search: http://www.cloudbees.com/ might be something.
If you want to go a bit deeper, you should try out Amazon's EC2. I believe they have done a very good job, plus they offer a free tier for one year.
If you want to build cloud computing simulations in Java, take a look at CloudSim Plus. It is a modern, full-featured, highly extensible and easier-to-use Java 8 Framework for Modeling and Simulation of Cloud Computing Infrastructures and Services.
It is an actively maintained, totally re-designed, better organized and largely documented project. It has a large number of exclusive features and is the only cloud simulation framework available at maven central.
Some of its main characteristics and features include:
Vertical VM Scaling
that performs on-demand up and down allocation of VM resources such as Ram, Bandwidth and PEs (CPUs).
Horizontal VM scaling, allowing dynamic creation of VMs according to an overload condition. Such a condition is defined by a predicate that can check different VM resources usage such as CPU, RAM or BW.
Parallel execution of simulations, allowing several simulations to be run simultaneously, in a isolated way, inside a multi-core computer.
Listeners to enable simulation monitoring.
Classes and interfaces to allow implementation of heuristics such as
Tabu Search, Simulated Annealing,
Ant Colony Systems and so on. See an example using Simulated Annealing here.
I'm going to develop an on-line IVR application using Java (without PBX).
In the software requirements there are some mathematical calculations and database communication which I prefer to implement on Java side.
As you know, different technologies are ready to integrate with Java, such as JTAPI, Zanzibar OpenIVR, Moho, VoiceXML, CCXML, Jive, Prophecy, Voicent, Voxeo etc.
Now the question is: What is the best solution? Which one is easiest to reach? Which one have the best efficiency? Do you recommend Open Source frameworks? Is there any Windows API for handling IVR systems?
If you're going to do VoiceXML with Java, you should take a look at Rivr, an open-source VoiceXML dialogue engine.
Rivr let you code your callflow naturally in the Java language. Thus you can reuse all the available Java tools (e.g. debugger, unit testing framework, coverage test tool) to develop the callflow. You also benefit from all your IDE features too (refactorings, source navigation, version control, etc).
The API is very simple. You can code a complete callflow with a single method. No need to define "states" or to manipulate templates or XML files.
Integration with server-side logic is trivial since you are only coding for the server side.
There is far too little information here to provide a direct answer, but I'll try to give you some basics.
The standards for IVR application development is VoiceXML for dialog (caller interaction) and CCXML for call control. The latter is not as commonly available. There are also numerous proprietary solutions. Your choice of an open standard versus a proprietary solution should be more about vendor/solution lock in. Even with the open standards, you'll likely use custom enhancements and have some amount of lock in, but portability will be easier. You can code directly to the telephony boards (challenging and usually poorly documented if you are someone new to telephony) or work with solutions that provide end to end capability. I find very few people porting IVR applications so I would focus on supportability of your application, features and ease of use in your decision.
Platform choices run the spectrum. You have premise (onsite) and hosted solutions. You mostly have high end enterprise solutions and low end solutions. There are very few middle ground solutions. Features (telephony and integration capabilities) vary dramatically.
From a telephony perspective, take nothing for granted. In particular, transfers. There are many ways to transfer a call. How it is done will be constrained by your connection. An analog line to the CO (phone company) can have multiple mechanisms and the one in place will typically be dictated to you. Not all telephony platforms will support what you need. Hangup detection, at least on analog lines, can also catch the novice out. Hosted solutions will typically allow you to avoid most of these problems. VoIP solutions are even more complicated due to compatibility between devices (yes there are standards, lots of them, with lots of optional parts and then there are custom flavors).
For windows specifically, you can use Lync, but it is complicated...though many of the solutions you will explore will be complicated.
In short, there is no best solution. Your knowledge of the technologies, requirements and budget are going to drive the decision. I've generally worked with enterprise IVRs in on premise and hosted configurations that are typically fronting large call centers. I have come in contact with many of the open source solutions. Anything on premise is likely to be complicated because of the system and telephony configuration. Hosted solutions have typically done most of that for you.
I know that those are "de jure standards". But you should also take Asterisk(with AGI/AMI) as a consideration for your project. If you decide to try Asterisk and Java, take a look of astivetoolkit.org it may be very helpful.
Ricky from Twilio here.
For me, picking the best tool for a particular problem is one of my favorite tasks a developer. One technique to figuring this out is blocking off a day and spending an hour or two with each potential option. A few question I'll typically explore:
Which tool is the easiest to get started with?
Which tool has the best documentation?
Which tool has an engaged community that I can learn from?
I'm sure there are a ton more questions depending on your scenario you'd want to explore (Does it fit within my budget? Can I use it with the technologies I already know and love?).
If you're looking at building an IVR, we have an API that could help. We just dropped some new tutorials including a non-trivial, production ready IVR application using Java.
I am new to this topic. I had decided to develop a parallel processing framework for cloud data processing applications in java for my project. the framework has to divide the given sequential java code and process that sub codes in different virtual machines in the cloud. the framework has to dynamically allocate and deallocate the resources according to the load. My problem is how to develop the framework.
Is there any libraries available to schedule the java code into different virtual machine in cloud? please inform me if anything is available.
Terracotta and Gridgain are excellent solutions. Those cited by yerlikayaoglu (Hadoop and hazelcast) are excellent too in their domain but they are all 4 very different and depend on the use case. That's for the map/reduce problem
An other one is the allocation/deallocation of virtual machines. It depends on your cloud provider and some other thing. You can have a look at jClouds
There are solutions such as Hazelcast, Hadoop etc. You can look this projects.
Have a look at Hadoop, a framework which allows basically the same thing, and supports automatic code deployment over the cluster.
If you want to do real time processing you can take a look at storm.
Also Akka provides nice remote actors API for scala and java.
I am trying to use a a java-prolog layer on top of my current agent-based simulation. I am running Mac OS X Snow Leopard and Netbeans 6.9 and tried to use JPL from swi-prolog however I haven't managed to run a test successfully due to problems with the libraries and their paths. I need a very fast implementation and I was wondering if anyone has any benchmarks or personal experience with bidirectional java-prolog interfaces.
In 2007 I ran the classic Prolog benchmarks (programs such as queens, tak, qsort, nrev and so on) against four Prolog implementations written in Java: tuProlog, JIProlog, JLog and JavaLog. The overall fastest implementation was JLog. All details can be found in an article accepted at SAC 2008.
I'd suggest you have a look also at jTrolog, which was officially born after I measured the performance of the other Java-based Prolog engines. Perhaps PrologCafe may be of some interest, too.
Note, however, that I am not informed about the maintenance state of any of them. Choose carefully if you need some kind of support by their respective authors.
Are you looking for a way to exchange messages efficiently between a java process and a prolog process?
I might recommend Google's Protocol Buffers, which provides a language-neutral and efficient means for exchanging messages between different systems...
http://code.google.com/p/protobuf/
http://www.swi-prolog.org/pldoc/package/protobufs.html
I'm curious if there are any Java abstractions that are similar to .Net's AppDomain.
In particular, I'm curious because I've found that with our Coldfusion/J2EE server we need to restart it every few days due to a slow memory leak that we haven't been able to easily track down yet. This can wreck our long-running processes and we'd really like a way to slowly just push people to new JVMs as they age past a certain time period/memory threshold.
From my limited .Net experience I'm pretty sure that this is one situation that IIS and AppDomains are able to manage fairly seamlessly by recycling AppDomains that come under memory pressure. Please let me know if I'm way off on AppDomains helping in this scenario.
Any suggestions?
I think Yiannis's answer here is a little misleading. Simply saying "no, you can't" is not the whole story. The question is focused on unloading Java classes in a server process to remove leaky code from the JVM process without a process restart. The OP is not asking for the process-like memory isolation feature that an AppDomain gives, but the ability to unload classes in a running JVM. I say process-like, since under the hood an AppDomain is not a process, but enjoys some of the isolation aspects that a first-class process is afforded by the operating system. The isolate JSR mentioned is referring to this 'process-like' isolation. Unloading java ClassLoaders and thus classes, without cycling the OS process hosting the JVM is possible. A couple of methods are mentioned here: SO 148681. It is not trivial, or elegant to do this in Java, but it is possible.
Unfortunately, no.
The analogous concept in the Java world is the Isolate, that appeared first in the JSR 121. This was an API for a future JVM feature that would allow safe separation and communication between different applications running in the same JVM. After the JSR was published (around 2004) one research team in Sun worked in the Barcelona project. This project tried to implement the Isolation API in Sun's HotSpot 1.5 VM. After two years, they released a prototype for SPARC/Solaris. Windows/Linux versions were never released due to stability problems.
Recently, SUN has introduced a limited version of the Isolation API to J2ME, focusing of offering "multiple processes" in environments that didn't actively offer them. Recently, we also asked Sun for their status in implementing the Isolate API to standard JVMs and their response was that they plan to release a JVM with limited support. They plan to offer the ability to load/unload Isolates but without the ability to communicate between them.
Also, there has been an old reserach efford to build an Isolates-compatible JVM version, called JanosVM (java 1.1) but I doubt that it can be of any use today.
Hope this helps...
Recycling of individual JVMs on the basis of time or specific criteria such as growing memory consumption and memory use threholds is a capability of the advanced versions of the App Server I work with, WebSphere. If your App Server does not have that capability, then crafting some shell scripts to give something like that function should be doable.
This works quite nicely assuming:
a). Requests from users are sprayed around the a larger set of JVMs.
b). That all requests are stateless or there is some state replication capability. Replication is a capability of WebSphere and WebLogic, I'd guess that other app servers have the capability too.
In such environments there's no need to "slowly" move people to other servers. We just need to know that we can safely stop any one serve/JVM and that these sessions will pick up on another instance.