SNMP4J-Agent: SampleAgent vs TestAgent - snmp

The documentation of SNMP4J-Agent tells, if you want to write your own SNMP agent you should sub-class BaseAgent.
And this is done in TestAgent class in the org.snmp4j.agent.test package.
But in org.snmp4j.agent.example there is another class SampleAgent which doesn't derive BaseAgent but, still implements an agent.
Could anyone tell me the difference between these two implementations?
And also in order to write your own agent, which is the better code to learn from.

Finally!! found the answer in this mailing list..

Related

Caching in wso2 esb

We are using wso2 as our esb layer, and we have a use case wherein we require to store login attempts of the user so what is the best way to implement this kind of caching in wso2 as cache mediator is not suitable for this purpose. And which all caching frameworks are supported by wso2?
Thanks
Unfortunately, your use case is very difficult to understand, using the information given in the question. Hence, it is hard to give a comprehensive answer. So please explain a bit about your requirement.
In the meantime, I would like to add following points.
As you mention it might be difficult to use Cache Mediator [1] for this purpose. It mainly uses for response caching using some message hashes.
I think in general out of the box mediators which come with WSO2 ESB might not suitable for your requirement (Please kindly not that I'm making this statement based on my vague idea about your requirement). So sometimes you might want to write your own class mediator to suit your requirement. If you need some getting started document on how to write a class mediator [2] would be a good starting point.
So please elaborate your requirement and it will be really easy for us to give a comprehensive answer to this question.
Thanks,
Upul
[1]. https://docs.wso2.com/display/ESB490/Cache+Mediator
[2]. https://docs.wso2.com/display/ESB490/Class+Mediator

Creating master agent and sub agent using snmp4j-agentx

I am doing internship in a company. I have been asked to find a way to implement snmp agents in one of their systems using java. I tried to find a free MIB compiler for java but failed. Hence I am trying to do that using SNMP4J-agentX library (because they specifically said they need master and sub agents). I have never worked with it before so I am having difficulty trying to implement it. There is a sample master agent and sub agent in the library package. I dont understand how i can modify it to include variables from my own mib file. Or if anyone have a simpler sample master agent or sub agent code, it would be very helpful if you can share it. I am only a little familiar with the internal working of an agent. So please if anyone can help please do so from a relatively basic level.
Many thanx in advance.
Adding your own MIB objects (so called ManagedObjects) to your SNMP agent with SNMP4J-AgentX works in the same way as for SNMP4J-Agent. The only exception from this are AgentX shared tables, but these are advanced concepts you generally do not need when you start using AgentX/SNMP.
Thus, I recommend reading the SNMP4J-Agent-Instrumentation-Guide.pdf to learn how MIB objects are registered and instrumentated based on your requirements.

WSO2 as SCA: will it be possible?

hello again, WSO2 community.
My last question about your architecture for my research is not a technical question, but a future-oriented one instead.
I was thinking about the OSGi approach the Suite has, that is one of the most interesting abstract things about SOA in general and WSO2 in particular I have found. An OSGi is sure a puzzling puzzle.
Thinking about pieces connected together reminded me about Service Component Architecture: a mean to see all the pieces as a whole easier.
Well, my question, son of my thoughts, is: "Why not to enable SCA for WSO2, when all the pieces have Carbon as a common denominator?" Carbon seems to be a nice candidate to be SCA.
The architecture could have only one instance of Carbon underneath, and WSO2 components above. The user should be able to interact with Carbon through only one interface and see all the pieces and their installed feature.
Is it possible? If it's not, why?
I hope I've been of some use through all the way here, and I thank you for having accompanied me to the end of my journey!
I hope there will occasions to collaborate or simply sharing ideas again!
It is conceptually similar to what it does with OSGi and Endpoint References in Carbon App model. Possibly can look at SCA Assembly as an alternative wiring model.

Model checking Paxos

I have implemented consensus algorithm (based on Paxos). I have added some random test cases and it seems fine. But want to do testing via model check? Couldn't find correct article for it. Please share how to do about model checking in Paxos
Thanks
You could use the Spin Model checker to check an abstract description of the system.
For Java based implementations you can use Java Path Finder.
There is also mace, where you can implement and test distributed systems like Paxos, and it has some support to include C code.
Regards, Christian

How do I make a voting poll in AppleScript?

I would like to make a voting poll in AppleScript, I would like to customize the values and I would like the system to tally the results and email the final result to me at: dirtbikeflyboy917#gmail.com.
Please reply ASAP!
Thanks!
Alas, you don't describe your requirements in nearly enough detail to get useful advice. (Web-based? Desktop-based? To run on one machine, or on many? For public or private use? Does it need to be secure? What information does it need to display to users? Etc.)
BTW, there are plenty of free online poll creators available; have you investigated any of those?
There are better ways to do this rather than in Applescript.

Resources