Software Innovation
venerdì 8 agosto 2014
sabato 23 novembre 2013
Transaction in Cassandra (or other NOSQL repositories)
Transaction in Cassandra
(or other NOSQL repositories)
Yesterday i began to work with Cassandra system, but i found soon a important constraint: is not possible define transactions in this system.
Cassandra is distributed system without a central load balancer: this is a great idea cause it removes additional network latency and encreases fail over problems associated with load balancer.
The basic problem cause is not possible to define transaction is in a distributed system is not possible to know the right and unique sequence of transactional events on a specific set of rows.
It is really impossible to add transaction in this system?
there is a way for making it: all clients connecting to Cassandra know all the nodes bound to cluster. When a client create a transaction , the cluster creates a "agglomerate" containing a group of elements as (columnset, rowid): a kind of partial transaction log. This info is spammed out to the other clients. A agglomerate can belong just a unique Cassandra node of cluster. In this way a specific transaction is passing just for a single node of cluster and the node working on it can order the concurrent events about it.When a client open a new connection with a node receives all the agglomerates of the specific node and when the agglomerate is no more used ... it is removed ether in cluster node either in all clients. All this synchronization operations are concurrent so the total time for doing them are about similar to one of them.
if a client tries to send a transaction to wrong node , this node send a special info telling the the client must search the right node.
Another way to reduce synchronization time is introducing transactional logic.
In this second method a transaction is not defined as a set of indipendent basic operations instead it defines the operational logic in which atomic data change.
it this way a transactional logic is defined with a unique identifier before to open/close transaction itself. Every transactional logic is associated with a unique node of cluster and the cluster know which node must process that transaction. A special transaction logic analisys could help to understand if different transactional logics can work on same data.
mercoledì 12 dicembre 2012
Multilingual Query language
Multilingual Query language
I developped (using in scala programming language) a query language engine that permits to use multilingual sintax. You can add a property file in which you can confugure the keyword sintax in many languages.

Innovative concurrency model in a OS by Cristian Lorenzetto is licensed under a Creative Commons Attribuzione - Non commerciale - Non opere derivate 3.0 Unported License.
Innovative concurrency model in a OS by Cristian Lorenzetto is licensed under a Creative Commons Attribuzione - Non commerciale - Non opere derivate 3.0 Unported License.
martedì 6 novembre 2012
Innovative concurrency concepts in a OS
Innovative concurrency model in a OS
A traditional operating system handles the concurrency problem using the thread model. In the last years we need more and more to use many concorrent blocks in big software application, we need to handle simply the concurrency in the complex algoritms we developped and we have to maximize the CPU time. The presence of multiple CPUs in a home PC shows to everyone that the speedup offered using traditional OS is quite low. For this reasons the thread model begins to be insufficient for managing this needs.
I propose another concurrency model.
Every program loaded in a OS has a additional memory area , handled just by the OS in which there essentially a map.
Every row of this map contains
1) concurrency id (optional)
2) start of block address
3) end of block address
4) concurency start reference (relative pointer to other row)
5) concurrecy end reference (relative pointer to other row)
The concurency start reference tells what is the previous block triggering this parallel execution.
The concurency end reference tells what is the future block must wait the execution of that block.
When a compiler assembles a program , identifies the indipendent blocks in the code as possible concurrent blocks : every one could be just fews of instructions or a huge block. Then the compiler fullfils this map.
The compiler might identifies also the the concurrent memory access if it exist and in this case it might introduces a mutex automatically.
When the os loaded this program, it executes the program and launchs as many internal threads as many concurrent block set in the concurrency map.
In this model a developer has not to write a thread explicitly, because all is managed by the compiler and the os. The developer can explicitly tells to the compiler if he want a specific block or function to be concurrent (and eventually the priority of the execution).

Innovative concurrency model in a OS by Cristian Lorenzetto is licensed under a Creative Commons Attribuzione - Non commerciale - Non opere derivate 3.0 Unported License.
Every program loaded in a OS has a additional memory area , handled just by the OS in which there essentially a map.
Every row of this map contains
1) concurrency id (optional)
2) start of block address
3) end of block address
4) concurency start reference (relative pointer to other row)
5) concurrecy end reference (relative pointer to other row)
The concurency start reference tells what is the previous block triggering this parallel execution.
The concurency end reference tells what is the future block must wait the execution of that block.
When a compiler assembles a program , identifies the indipendent blocks in the code as possible concurrent blocks : every one could be just fews of instructions or a huge block. Then the compiler fullfils this map.
The compiler might identifies also the the concurrent memory access if it exist and in this case it might introduces a mutex automatically.
When the os loaded this program, it executes the program and launchs as many internal threads as many concurrent block set in the concurrency map.
In this model a developer has not to write a thread explicitly, because all is managed by the compiler and the os. The developer can explicitly tells to the compiler if he want a specific block or function to be concurrent (and eventually the priority of the execution).
Innovative concurrency model in a OS by Cristian Lorenzetto is licensed under a Creative Commons Attribuzione - Non commerciale - Non opere derivate 3.0 Unported License.
giovedì 25 ottobre 2012
Innovative MVC framework
I designed and implemented the prototype of a innovative pattern that separates the representation of information from the user's interaction with it. It changes deeply the classic MVC model for creating a new model that permitting to handles more complex view in simplier way.The focus of the new model is : reusability,modularity,indipendence of code, inter comunication and componibility among modules,seo request,automatic validation. It is designed for mimimizing the time for developping a website. In addition it is developped following the SaaSO model introduced in a previous article.It reduces the time to market and maximizes the reusability of the code. Anyway, the innovative ideas inside it remains secret.
Simple Application Container in PHP
Simple Application Container using PHP
I developped a set of scripts for similating a behaviour of a simple application server in PHP. It permits to write software simplier to read : the architecture of the software is ordered and it handles logging facilities and modules loading .
mercoledì 3 ottobre 2012
Distributed Versioning
Algorithm for distributed versioning
based on graph
I conceived a algorithm for managing versioning for a general graph (also ciclic one) in distributed way.
Definition of the problem: you have a network or a graph and you keep different information in every node of this graph. You wish to handle the historical changes for a specific node that can have got too source or target associations to others(relationships). For integrity of the information inside the node you want to archive also the relationships with others nodes. Hence , if a subnode of the main one changes , also the parent node changes version for keeking trace on all the possible modifications.
For solving this problem , i developed a new software. For having more details about it , you can contact me on googleplus.
Iscriviti a:
Post (Atom)