Changes between Version 37 and Version 38 of LibrariesUnderConstruction


Ignore:
Timestamp:
Feb 16, 2009, 9:13:02 PM (14 years ago)
Author:
viboes
Comment:

Moving Boost.LUID to LUD

Legend:

Unmodified
Added
Removed
Modified
  • LibrariesUnderConstruction

    v37 v38  
    4949---------------------------------------------------------------------------------------------------
    5050== Boost.!AsynchronousExecutors ==
    51  * '''Author(s):''' Vicente J. Botet Escriba
     51 * '''Author(s):''' Vicente J. Botet Escribá
    5252 * '''Version:''' 0.4
    5353 * '''State:''' Quite Stable
     
    181181== Boost.!ConstantTimeSize ==
    182182
    183  * '''Author(s):''' Vicente J. Botet Escriba
     183 * '''Author(s):''' Vicente J. Botet Escribá
    184184 * '''Version:''' 0.1
    185185 * '''State:''' Stable
     
    294294---------------------------------------------------------------------------------------------------
    295295== Boost.!InterThreads ==
    296  * '''Author(s):''' Vicente J. Botet Escriba
     296 * '''Author(s):''' Vicente J. Botet Escribá
    297297 * '''Version:''' 0.4
    298298 * '''State:''' Quite Stable
     
    338338
    339339---------------------------------------------------------------------------------------------------
     340== Boost.LUID ==
     341 * '''Author(s):''' Vicente J. Botet Escribá
     342 * '''Version:''' 0.0.0
     343 * '''State:''' Prototype
     344 * '''Last upload:''' 2009 Fev 16
     345 * '''Categories:''' [#DataStructures Data Structures]
     346 * '''Links:''' [https://svn.boost.org/svn/boost/sandbox/luid Boost Sandbox]
     347 * '''Description:'''  Boost.LUID simplifies the generation of locally unique identifiers in a wide context.
     348
     349Locally Unique Identifier or LUID is a special type of identifier used in software applications in order to provide a reference number which is unique in a given context (hence, "Locally" in opposition to "Globally" or "Universally"). Each generated LUID is guaranteed to be unique in its context.
     350
     351LUID could have many applications. Some examples follow: creating unique identifiers in a database tables, network messages may be identified with a LUID to ensure that this messages are associated to a given session, transactions may be identified by LUIDs.
     352
     353Note. Please let me know other applications of luids you can have.
     354
     355 * Reduced identifier size
     356
     357An attractive feature of LUIDs when compared to alternatives is the minimal size used by this identifiers, that depends on the number of instances a given context can have (usually 4 bytes). This allows to use them in protocols fixing the size of the references exchanged to less that 16 bytes(as it is the case of UUID and GUID). Usually LUIDs are represented by unsigned integers and have an upper bound value.
     358
     359 * Usable as random access index in constant time
     360
     361Another aspect, and not less interesting is that the access to the information they identify can be done in constant time.
     362
     363 * Recovering unused identifiers
     364
     365A first implementation could consists in a monotonic counter.
     366
     367The drawback of having a small size is that the number of unique identifier is more limited. This limit will finish by been reached if the application runs a long time. To palliate to this, we need a mechanism to recover the unused identifiers once the identified information is removed. Depending on the application the recovered identifiers should be discarded, reused immediately or frozen during a given duration or a number of times.
     368
     369Usually they are reused in a first reusable first reused order (fifo), but depending on the implementation this could not be always the more efficient policy. So the user can either constraint this fifo order or let undefined this aspect.
     370
     371 * Managing the lack of identifiers
     372
     373In any case we need to manage with the overflow case, i.e. when there are no more free identifiers. The user could prefer an exception, return an invalid value, use errno, or call to a user defined function which could try to recover from this situation, by re dimensioning the upper bound for example.
     374
     375 * Ensuring coherency on reusable identifiers
     376
     377All this seams to work up to the user do not release the same identifiers twice. As this is an expensive aspect, but usually the applications has its own way to do it. If this is not the case the application could ask to the luid generator to ensure that.
     378
     379 * Synchronization on multi threaded or multi process applications
     380
     381The generation of new LUIDs and the recovering of unused LUIDs must be synchronized. So LUID are better adapted to systems where these operations are done in a reduced scope. Depending on this scope: single thread, multi-threaded process or a node,i.e. multiple process, the synchronization mechanisms vary. In a single thread scope no synchronization is needed. Synchronization on a multi-threaded process can be ensured using a thread mutex.
     382
     383In addition the synchronization can be ensured internally by the generator, or externally by the user, i.e. the user has already a synchronization mechanism.
     384
     385LUIDs are not adapted to distributed system (multiple nodes generating and recovering luids) because it needs a coordination between the different nodes which will take too much time. UUIDs and GUIDs are more adapted to this situation. Anyway if the size constraint can not be avoided, one of the nodes could play the master role and the others behaves as slaves. Master and slaves need to work together. This library do not pretend to take in account this use case but, could be the base of such approach.
     386
     387 * Persistency
     388
     389Another aspect is the lifetime of the information to be identified by the luids. It can be the lifetime of the process, the host machine lifetime or persists to a shut down of the host machine using the file-system.
     390
     391 * Optimization
     392
     393The last aspect will be the optimization. Different application have different needs, some have space constraints, and mot of the others have speed constraints.
     394
     395---------------------------------------------------------------------------------------------------
    340396== Boost.Mirror ==
    341397 * '''Author(s):'''  Matus Chochlik
     
    412468---------------------------------------------------------------------------------------------------
    413469== Boost.!RendezVous  ==
    414  * '''Author(s):''' Vicente J. Botet Escriba
     470 * '''Author(s):''' Vicente J. Botet Escribá
    415471 * '''Version:''' 0.0.0
    416472 * '''State:''' Draft
     
    433489--------------------------------------------------------------------------------------------------
    434490== Boost.Synchro ==
    435  * '''Author(s):''' Vicente J. Botet Escriba
     491 * '''Author(s):''' Vicente J. Botet Escribá
    436492 * '''Version:''' 0.0.0
    437493 * '''State:''' Draft
     
    450506---------------------------------------------------------------------------------------------------
    451507== Boost.!ThreaderJoiner  ==
    452  * '''Author(s):''' Vicente J. Botet Escriba
     508 * '''Author(s):''' Vicente J. Botet Escribá
    453509 * '''Version:''' 0.4
    454510 * '''State:''' Quite Stable
     
    539595---------------------------------------------------------------------------------------------------
    540596== Accumulators.Ext ==
    541  * '''Suggested by:''' Vicente J. Botet Escrib
     597 * '''Suggested by:''' Vicente J. Botet Escribá
    542598 * '''Categories:''' [#MathAndNumerics Math And Numerics]
    543599 * '''Description:''' Adding sliding, dependable and cyclic accumulators to Boost.Accumulators.
     
    602658---------------------------------------------------------------------------------------------------
    603659== !ConstraintsProgramming ==
    604  * '''Suggested by:''' Vicente J. Botet Escrib
     660 * '''Suggested by:''' Vicente J. Botet Escribá
    605661 * '''Categories:''' []
    606662 * '''Description:''' Constraints programming is a programming paradigm where relations between variables are stated in the form of constraints. Constraints differ from the common primitives of imperative programming languages in that they do not specify a step or sequence of steps to execute, but rather the properties of a solution to be found. This makes Constraint Programming a form of declarative programming.
     
    620676---------------------------------------------------------------------------------------------------
    621677== !DenseSet ==
    622  * '''Suggested by:''' Vicente J. Botet Escrib
     678 * '''Suggested by:''' Vicente J. Botet Escribá
    623679 * '''Categories:''' [#Containers Containers]
    624680 * '''Description:''' Implementation of dense set of integers using intervals.
     
    626682---------------------------------------------------------------------------------------------------
    627683== Frames  ==
    628  * '''Suggested by:''' Vicente J. Botet Escrib
     684 * '''Suggested by:''' Vicente J. Botet Escribá
    629685 * '''Categories:''' [#InputOutput Input/Output]
    630686 * '''Description:''' Library based on an extension of the Archive concept making it bidirectional.
     
    744800}}}
    745801
    746 ---------------------------------------------------------------------------------------------------
    747 == LUID ==
    748  * '''Suggested by:''' Vicente J. Botet Escriba 
    749  * '''Categories:''' [#DataStructures Data Structures]
    750  * '''Description:''' Locally Unique Identifier or LUID is a special type of identifier used in software applications in order to provide a reference number which is unique in a given context (hence, "Locally" in opposition to "Globally" or "Universally"). Each generated LUID is guaranteed to be unique in its context.
    751 
    752 LUID could have many applications. Some examples follow: creating unique identifiers in a database tables, network messages may be identified with a LUID to ensure that this messages are associated to a given session, transactions may be identified by LUIDs.
    753802
    754803---------------------------------------------------------------------------------------------------
    755804== Quartets  ==
    756  * '''Suggested by:''' Vicente J. Botet Escrib
     805 * '''Suggested by:''' Vicente J. Botet Escribá
    757806 * '''Categories:''' [#Containers Containers] [#DataStructures Data Structures]
    758807 * '''Description:''' Quartet are half an octet, i.e. 4 bits taking values from 0..15, and usually represented by chars '0'-'9' 'A'-'F'.
     
    763812---------------------------------------------------------------------------------------------------
    764813== !SpreadSheet ==
    765  * '''Suggested by:''' Vicente J. Botet Escrib
     814 * '''Suggested by:''' Vicente J. Botet Escribá
    766815 * '''Categories:''' []
    767816 * '''Description:''' Allows to manage with the underlying concepts of a Spreadsheet but without displaying them.
     
    809858---------------------------------------------------------------------------------------------------
    810859== STM  ==
    811  * '''Suggested by:''' Vicente J. Botet Escrib
     860 * '''Suggested by:''' Vicente J. Botet Escribá
    812861 * '''Categories:''' [#ConcurrentProgramming Concurrent Programming]
    813862 * '''Description:''' Transactional memory (TM) is a recent parallel programming concept which reduces challenges found in parallel programming. TM offers numerous advantages over other synchronization mechanisms.
     
    880929== Data Structures ==
    881930 * [#Boost.Fsm Boost.Fsm]
    882  * [#LUID LUID]
     931 * [#Boost.LUID Boost.LUID]
    883932 * [#Boost.Msm Boost.Msm]
    884933 * [#Quartets Quartets]