• Forum
  • Doc
  • Screenshots
  • Download
  • Donate
  • Contributors
  • Contact
  • Follow @phpfreechat
  • DEMO
  • Board index ‹ Version 1.x branch ‹ Contributions (v1.x)
  • Change font size
  • FAQ
  • Register
  • Login

Container Class: Shared Memory Container

Post a bug fix, a new feature, a theme ...

Moderators: OldWolf, re*s.t.a.r.s.*2

Post a reply
6 posts • Page 1 of 1

Postby Bernhard J. M. Grün » Sun Feb 26, 2006 2:42 pm

Hello,

this is my first contribution for phpFreeChat.
I wrote a nice shared memory container class. It should speed up the storage process such that more people can chat without higher load for the server.
My container class uses the PEAR class "System/SharedMemory" to store the data. This pear class is able to store into the following structures: ApacheNote, APC, eAccelerator, File, Memcached, Sharedance, SHMOP, SQLite, System V and Turck MMCache. I think this makes it possible to also work on Windows hosts.
I tested and developed my container class with 0.8 pre (SVN revision 309) but it should also work with 0.7.

You can download it from: http://h0t.de/pfc/Memory-Container.tar.gz

Bernhard
Bernhard J. M. Grün
Member
 
Posts: 13
Joined: Thu Feb 23, 2006 3:42 pm
Location: Püttlingen, Saarland, Germany
  • Website
  • ICQ
Top

Postby Bernhard J. M. Grün » Sun Feb 26, 2006 8:29 pm

Updated version...
Including a demo now.

Download at: http://h0t.de/pfc/Memory-Container-20060226-02.tar.gz

Bernhard
Bernhard J. M. Grün
Member
 
Posts: 13
Joined: Thu Feb 23, 2006 3:42 pm
Location: Püttlingen, Saarland, Germany
  • Website
  • ICQ
Top

Postby Bernhard J. M. Grün » Tue Feb 28, 2006 2:13 pm

Updated again...
Just reformated the code to be conform to the rest of the pfc sourcecode.
This is - most likely - the version that will be published with next pfc release.

Download at: http://h0t.de/pfc/Memory-Container-20060228-01.tar.gz
Bernhard J. M. Grün
Member
 
Posts: 13
Joined: Thu Feb 23, 2006 3:42 pm
Location: Püttlingen, Saarland, Germany
  • Website
  • ICQ
Top

Postby phpfreechat » Thu Mar 02, 2006 10:31 pm

I get this message when I load for the first time the shared memory demo :
Code: Select all
Notice: unserialize(): Error at offset 0 of 1048576 bytes in /home/kerphi/pfc-0.8/lib/pear/System/SharedMemory/Shmop.php on line 102

Notice: unserialize(): Error at offset 0 of 1048576 bytes in /home/kerphi/pfc-0.8/lib/pear/System/SharedMemory/Shmop.php on line 102

Notice: unserialize(): Error at offset 0 of 1048576 bytes in /home/kerphi/pfc-0.8/lib/pear/System/SharedMemory/Shmop.php on line 102

Notice: unserialize(): Error at offset 0 of 1048576 bytes in /home/kerphi/pfc-0.8/lib/pear/System/SharedMemory/Shmop.php on line 102

Notice: unserialize(): Error at offset 0 of 1048576 bytes in /home/kerphi/pfc-0.8/lib/pear/System/SharedMemory/Shmop.php on line 102

However it works well !
Nice job, it will be integrated into next 0.8 release.
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby phpfreechat » Thu Mar 02, 2006 10:48 pm

I just integrated your great contribution into official pfc source code.

However there is strange formated code :
Code: Select all
    $this->_memory->set
    ($c->container_cfg_sm_messages, $content);

Why a line jump after the "set" word ?
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby Bernhard J. M. Grün » Thu Mar 02, 2006 11:05 pm

Well this could be a "problem" (wrong configuration) with astyle. I'll check that if it is really needed.

Bernhard
Bernhard J. M. Grün
Member
 
Posts: 13
Joined: Thu Feb 23, 2006 3:42 pm
Location: Püttlingen, Saarland, Germany
  • Website
  • ICQ
Top


Post a reply
6 posts • Page 1 of 1

Return to Contributions (v1.x)

Who is online

Users browsing this forum: No registered users and 21 guests

  • Board index
  • The team • Delete all board cookies • All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
Sign in
Wrong credentials
Sign up I forgot my password
.
jeu-gratuit.net | more partners
Fork me on GitHub