Recent

Author Topic: ParallelVarFiler version 1.0  (Read 4731 times)

aminer

  • Hero Member
  • *****
  • Posts: 956
ParallelVarFiler version 1.0
« on: December 10, 2012, 01:00:37 am »

Hello,


ParallelVarFiler 1.0

Authors: Peter Johansson and Aminer Moulay Ramdane


Parallel Variable filer and streamer for Delphi and Freepascal that can be used also as a hashtable and that uses ParallelHashList (Parallel Hashtable) with O(1) best case and O(log(n)) worst case access that uses lock striping and lightweight MREWs(multiple-readers-exclusive-writer) , this allows multiple threads to write and read concurently. also ParallelHashList maintains an independant counter , that counts the number of entries , for each segment of the hashtable and uses a lock for each counter, this is also for better scalability.

Description:

Collect different types of variables and save them into one file or stream. TParallelVarFiler reads and writes on files, streams and Strings. You can collect Strings, Integers and Dates, in fact everything that can be stored in a variant. In addition you can collect Streams.

And please look at test.pas a parallel variable filer example - compile and execute it...


You can download ParallelVarFiler from: http://pages.videotron.com/aminer/

Language: FPC Pascal v2.2.0+ / Delphi 7+: http://www.freepascal.org/

Operating Systems: Win , Linux and Mac (x86).

Required FPC switches: -O3 -Sd -dFPC -dWin32 -dFreePascal
-Sd for delphi mode....

Required Delphi switches: -DMSWINDOWS -$H+

For Delphi 5,6,7 use -DDelphi

For Delphi 2005,2006,2007,2009,2010+ use the switch -DDELPHI2005+



Thank you,
Amine Moulay Ramdane.



aminer

  • Hero Member
  • *****
  • Posts: 956
Re: ParallelVarFiler version 1.0
« Reply #1 on: December 10, 2012, 01:36:00 am »

Hello,

How can you store mutiple data inside an map it to a key ?.

You can simply use Parallel Variable Filer for this and stream your mutiple
data variants and map them to a key...


As you have noticed ParallelVarFiler is powerfull and you can use it from mutiple threads
and it will scale on multicores


Thank you,
Amine Moulay Ramdane.

aminer

  • Hero Member
  • *****
  • Posts: 956
Re: ParallelVarFiler version 1.0
« Reply #2 on: December 10, 2012, 02:35:42 am »

Hello,

I have updated ParallelVarFiler to version 1.01, i have
corrected a bug in the getlist() method of parallelhashlist.

You can download ParallelVarFiler version 1.01 from:

http://pages.videotron.com/aminer/



Thank you,
Amine Moulay Ramdane.

aminer

  • Hero Member
  • *****
  • Posts: 956
Re: ParallelVarFiler version 1.0
« Reply #3 on: December 10, 2012, 03:52:28 pm »

Hello,

I have updated ParallelVarFiler to version 1.02, i have
added a GetKeys() method to ParallelVarFiler, please
look at the test.pas example inside the zip file to know
how to use it...

You can download ParallelVarFiler version 1.02 from:

http://pages.videotron.com/aminer/



Thank you,
Amine Moulay Ramdane.



aminer

  • Hero Member
  • *****
  • Posts: 956
Re: ParallelVarFiler version 1.0
« Reply #4 on: December 10, 2012, 03:59:35 pm »

Hello,


Now you know that ParallelVarFiler can be used as a parallel hashtable, and it can scale very well on multicores,  next time i will show you how to use ParaellVarFiler as a client-server in-memory
database using TCP/IP and doing with it something like remote procedure calls , ParallelVarFiler is fast and can be powerful as a tool.


Thank you,
Amine Moulay Ramdane.
 

aminer

  • Hero Member
  • *****
  • Posts: 956
Re: ParallelVarFiler version 1.0
« Reply #5 on: December 10, 2012, 05:05:59 pm »

Hello,

I have said that i will show you how to use ParallelVarFiler as a multithreaded
client-server in-memory database and doing how to do also with it remote procedure calls,
for exemple if you have a small to medium database you can use ParallelVarFiler as an
in-memory database since ParallelVarFiler is very fast and can scale very well on multicores ,
hence you can use it to lower the trafic of you website, when i client  for example does a
databse query on ParallelVarFiler ,  ParallelVarFiler will return a strict minimum of information,
for exemple it will not return the graphic files etc. inside the ParalleVarFiler in-memory database ,
but when the custumer will receive in his client browser the database keys as Hidden Fileds, the
custumer will after that click on the item to see the graphic file of the item selected, and ParallelVarFiler
will access the items in O(1) best case or in log(n)  , so it will be very fast, and with this kind of method
i think you will lower the trafic on the webserver and it will be fast.



Thank you,

Amine Moulay Ramdane.     


aminer

  • Hero Member
  • *****
  • Posts: 956
Re: ParallelVarFiler version 1.0
« Reply #6 on: December 12, 2012, 08:26:27 pm »

Hello,

I have updated ParallelVarFiler to version 1.03, i have
added two methods ParallelVarFiler, update() and updatestream(), and i had modified the SetData() method inside
parallelhashlist to update the pointer and return atomicaly the previous pointer so that we can free it, please look at the test.pas example inside the zip file to know who to use update, delete etc...

You can download ParallelVarFiler version 1.03 from:

http://pages.videotron.com/aminer/



Thank you,
Amine Moulay Ramdane.

aminer

  • Hero Member
  • *****
  • Posts: 956
Re: ParallelVarFiler version 1.0
« Reply #7 on: December 12, 2012, 08:35:12 pm »

Hello,

I have updated ParallelVarFiler to version 1.03, i have
added two methods to ParallelVarFiler, update() and updatestream(), and i had modified the SetData() method inside
parallelhashlist to update the pointer and return atomicaly the previous pointer so that we can free it, please look at the test.pas example inside the zip file to know how to use update, delete etc...

You can download ParallelVarFiler version 1.03 from:

http://pages.videotron.com/aminer/



Thank you,
Amine Moulay Ramdane.

 

TinyPortal © 2005-2018