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
Related
I am currently developing an application that parses and manipulates MIME messages wherein these messages are a central part of the domain model. Although I have already implemented the required functionality, for the moment, for parsing these messages, it seems unnecessary trying to reinvent the wheel would I need to add additional MIME features in the future. I could simply use an available library such as MimeKit which probably does the job much more efficiently and seems like the more robust way to go with. At the same time I feel hesitant to this idea for a couple of reasons:
I am fairly new to software architecture but what from what I've gathered online the consensus seems to be that the domain objects should not have any external dependencies since they model a domain that is specific to the business. And so if the business rules change it wouldn't be a good idea to have your domain model be dependent of an external library. However, since MIME is a standardized protocol this shouldn't be a problem, but that leads to the second point.
Although MIME is a standardized protocol, it has come to my knowledge that the clients from which my application receives these messages does not always fully conform to the RFC specifications. I have yet to come across a problem regarding the MIME format of the messages but with that in mind I feel as though there's no guarantee that I won't stumble across problems down the line.
I might have to add additional custom functionality regarding the parsing of the messages. This could however be solved by adding that functionality on top of the imported classes.
So my questions are:
Would it under normal circumstances be a valid alternative to use an external library for standardized protocols as a part of the domain model? It doesn't seem right to sully my domain- and application-layer with external dependencies.
How should I go about this problem with regards to my circumstances? Should I create an interface for the domain model so that I can swap it out with another implementation if needed in the future? This would require isolating the external dependencies in a class and mapping all the data to fit the contracts for the application layer which almost seems like more work than implementing the protocol myself. Or should I just implement it myself and add new features successively just to make sure that I have full control of the domain model?
I would highly appreciate your input.
Your entire question boils down to the following flawed thinking:
I am fairly new to software architecture but what from what I've gathered online the consensus seems to be...
Why let consensus make your decisions for you?
Who are these people who make up this "consensus"?
How do you know they have any idea what they are talking about?
Trusting the consensus of unknown sources seems like a terrible way to make decisions for your project.
Do you want to write software that solves real problems? Or do you want to get lost in the weeds of idealism and have your project fail before it even gets out of the design phase?
Do what makes sense for you.
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
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.
I'm writing a simple measurement application which will be use bluetooth to talk to the device.
My question is where to put bluetooth connection initialization code? To Model or to Controller?
From my understanding of MVC, Model is what an application is - data models and all logic which applies to the data. And the Controller is some kind of glue between Model and View.
But for me it seems that it would be better to put connection code to the Controller since maybe in the futre there will be new version of the device which will use USB or something else.
What do you think what fits better in my case?
Best Regards,
Marcin
depends on the environment, but we follow the "thin controllers, thick models" principle. Having said that, a library of connection functions would fit in neither.
In the environment I work in, device connection functions would be best suited to a library (then you can have multiple libraries covering all connection types you may want to use in the future, as they are developed) which is then utilized in the appropriate place.
This would also allow re-use at a later stage in different projects/software if required.
A library would ideally have generic functions ( e.g. connectToDevice() and getFile() rather than getApplicationSpecificPhotosFromDevice ), with the app specific stuff happening in the controller and underlying model that uses the library to retrieve or submit data.
I am looking for a library which I can plug into a distributed application which implements any gossip-based membership protocol.
Such a library would allow me to send/receive membership lists, merge received membership lists, etc... Even better would be if the library implemented a protocol with performance O(logn) performance guarantees.
Does anyone know of any open source library like this? It doesn't need to meet all of the aforementioned requirements; even something partially implemented would be helpful.
Take a look at this on google code:
http://code.google.com/p/gossip-protocol-java/
I happen to stumble upon it yesterday whilst looking for java based gossip implementation. It's more a reference implementation for someone to build upon, but it gives the general idea, and after reading through the code you'll definitely be able to build your own or branch what's there to add any features you need.
HTH
Have you looked at Apache Zookeeper? I'm not sure if it's what you're looking for.
ZooKeeper is a high-performance
coordination service for distributed
applications. It exposes common
services - such as naming,
configuration management,
synchronization, and group services -
in a simple interface so you don't
have to write them from scratch. You
can use it off-the-shelf to implement
consensus, group management, leader
election, and presence protocols.
C# bindings are also available.