backalaika-developers Mailing List for Backalaika
Status: Beta
Brought to you by:
nandof
You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(18) |
Oct
(13) |
Nov
|
Dec
|
---|
From: Nando F. <nan...@ma...> - 2004-10-20 16:33:17
|
Backalaika is going to be cited soon: http://www.osnews.com/story.php?news_id=8611 |
From: Nando F. <nan...@ma...> - 2004-10-20 15:01:26
|
Dear Backalaikers, When the time comes to make the backup database, maybe we should use the Advanced Data Provider, which works with Firebird (Linux and Windows), MySQL (Linux and Windows), Sqlite (Linux and Windows), Npgsql - PostgreSQL (Linux and Windows), MS SQL Server (Windows), Oracle (Windows) and MS OracleClient (Windows): http://advanced-ado.sourceforge.net/ And something I haven´t yet looked into: http://sourceforge.net/projects/advanced-remote/ "Release early, release often." I am thinking of releasing Backalaika binaries soon, since it already works albeit in one computer and without scheduling. A few adjustments would have to be made before that (e.g. simplifying the XML file format), but the release feels near. What should the name be? Backalaika Techology Preview? Even a Longhorn Alpha has already been released in its current crippled status... Releasing Backalaika soon might heighten interest in it. Sorry to say this, but you guys are too slow. I don´t know how any open source app could ever be completed at this pace. My problem accessing CVS just vanished, it must have been my ISP. I hate them. Nando |
From: Nando F. <nan...@ma...> - 2004-10-14 16:23:29
|
Dmitry Melanchenko said: > I have solved the problem with cyrillic names. > Everything is very simple. > ZipConstants.DefaultCodePage = <DOS Code page>; must be added into > ZipService::ZipThem() as the first line. And that is all. No changes > in #ZipLib needed. Catch up on your reading Dmitry, I had already done that. If you check my last e-mail, this change is in the attached file. In the same e-mail I asked you to create a test to find out whether it works with ALL cyrillic characters. It does NOT work for all Portuguese letters. We are missing tilde: ãõ Dmitry Melanchenko said: > Also I wrote .build file to compile the project using NAnt. > This type of compilation is more useful then compilation in #Develop. > Because #Develop works with compiler command line arguments a little > bit wrong. I can send all changers to you or Put them under CVS on > sf.net. > Inform me about your decision :) "A little bit wrong" is not a meaningful description of any problems with #D compilation and I would like to know why we would need that. However, let's assume you know what you are talking about, so please do commit that to CVS, preferrably in its own folder. > Dmitry Melanchenko logged out. I hate it when you dump your conclusions on me like that and then just disappear. Nando |
From: Nando F. <nan...@ma...> - 2004-10-13 20:02:30
|
CHANGE HISTORY ============== nf 2004-10-12 - Implemented codepage choice. Dimitry, please test CodePage 866 for cyrillic characters. CodePage 850 gives me all accented Portuguese letters except tilde (ãõ). This has always been a problem between DOS text and Windows text. I think the library would need to support Windows codepages. Zip files have a field where you set the operating system, including DOS and NTFS. Because I have been unable to connect to CVS for 2 days now, I am attaching the changed files! Nando |
From: Nando F. <nan...@ma...> - 2004-10-12 11:03:25
|
Only now do I realize the existence of this, I think it was not working a few weeks ago: http://cvs.sourceforge.net/viewcvs.py/backalaika/v01/ Nando |
From: Nando F. <nan...@ma...> - 2004-10-11 00:28:22
|
Dear Backalaika developers, First of all, #Develop 1.0.1 has been released: http://www.icsharpcode.net/OpenSource/SD/download/ Uninstall 1.0 before installing 1.0.1. Even though you people have been too quiet recently, here is some food for thought: SharpZipLib FAQ http://wiki.icsharpcode.net/default.aspx/SharpDevelop.SharpZipLibraryFAQ SharpZipLib forum http://www.icsharpcode.net/OpenSource/SD/forum/forum.asp?FORUM_ID=16&CAT_ID=8&Forum_Title=SharpZipLib All of these old compression algorythms (zip, gzip, bzip2) are fine for most backup purposes (and they can be fast). But it would be great to offer more advanced compression too. The powerful 7-zip -- with a compatible license (LGPL) -- comes to mind: 7-zip http://sourceforge.net/projects/sevenzip/ This little open source app may not have the greatest user interface yet, but it already supports 11 compression formats! Using a newer compression format like 7-zip might even solve some modern problems such as encoding of filenames in Unicode, having zip files longer than 2 GB etc. Only problem here is that 7-zip is written in C++. But they have mentioned they want to start ports now... It would be cool if we could help them with a C# port. Nando |
From: Nando F. <nan...@ma...> - 2004-10-07 01:46:35
|
CHANGE HISTORY ============== nf 2004-10-06 - Implemented exclusion of subfolders from backup. - Implemented SeparateSubfolders: puts each subfolder in its own zip file. (Only for the first level of SUBfolders.) nf 2004-10-05 - Implemented compression level. Configurable in profile. - Extensions {ZIP,RAR,GZ,LZH,PAK,CAB} -- and files shorter than 48 bytes -- are stored instead of compressed. - Added CodePage to profile, but NOT to Zipper, because I don't know how. Possible tasks for now (in optimized order) ====================== - TOP PRIORITY: International characters in the names of files and folders, such as çãõéê, cyrillic etc., get different (wrong) when zipped. They must be getting encoded in an MS-DOS character set instead of a Windows character set. Find a fix. It has to do with the SharpZip library. Does it support other character sets for filenames? Does the ZipSharp application address this issue? (The code that calls the ZipSharp library is in the Zipper class in file ZipService.cs.) Dimitry: I propose ro rework SharpZipLib and setup filename codepage in profile setup Dimitry: SharpZipLib uses Encoding.ASCII... or Encoding.GetEncoding(DefaultCodePage) in ZipConstants.cs. Both header and file content converts using one codepage - DefaultCodePage. But File name must be packed using DOS codepage like 866 and File Content must be packed using Default Windows codepage like Win-1252 Nando: where are you reading all that from? Dimitry: ZipConstants.cs lines 381-385 and 411-415. To fix this problem we should add special functions to ZipConstants.cs to convert names Nando: Would you care to do this job? Dmitry Melanchenko: I think yes Nando: These changes should be contributed to #ZipLib huh? Dmitry Melanchenko: yes Dmitry Melanchenko: I will contact with somebody from #ZipLib - When zip file size reaches more or less 2,24 GB, the following exception is thrown by #ZipLib: Specified argument was out of the range of valid values. Parameter name: Offset Which should we do to correct this? 1) Switch to some other compression 2) Contribute changes to #ZipLib so its zip classes support larger files 3) Make Backalaika start a new zip file when necessary (this would be OK for most people, but what about that user who wants to back up his HD full of images of DVDs?) 4) ? |
From: Nando F. <nan...@ma...> - 2004-10-04 15:22:05
|
CHANGE HISTORY ============== nf 2004-10-03 - Meet our competition: http://www.theaardvark.com/sitback.shtml - Using same timestamp for all zip file names. Ensuring zip file names will be unique in each job by adding numbers at the end: How about DateTime-Kind-Number.zip (28 chars if Number has 2 digits) - Temporarily using this directory structure for storing backups: Backups // only 1 folder ProfileName // multiple (zip files go here) Still under ZipServer. When backups are stored in BackupServer, we can think of inserting "Media001" or something below the "Backups" folder. - Added to the XML file a field int NumberOfZipsInThisBackup - Instead of one XML file per zip, making a single XML file per backup job, containing info about the backup job, including a map between each zip file and its BaseFolder. nf 2004-10-02 - Refactored backup process so it zips each FolderToInclude in its own zip file. It also creates an XML file to accompany each zip file. - DiskFileList now contains *only* files that need to be backed up. - Added "Computer" property to ProfileSingle, and limited ProfileName to 12 chars, thus breaking compatibility with existing profiles -- please create new ones. - Created Computer class (in file ProfileSingle.cs) nf 2004-10-01 - Incremental and differential backups implemented. Both only back up files that are marked with the Archive attribute. Differential backups leave the attribute set, while Incremental and Full backups reset it after the backup is complete: http://searchstorage.techtarget.com/ateQuestionNResponse/0,289625,sid5_cid419862_tax286189,00.html - Backup temporary extension = .zip.tmp - Erase empty ZIP file if there was nothing to back up at this time - Word "additive" replaced by "incremental" everywhere. This broke profile compatibility, but is definitive. nf 2004-09-30 - HORRIBLE BUG fixed: Full file path (including drive) was being written to zip, instead of relative path! Now you can actually unzip your backups! - OO-Refactoring: moved all DiskFileList-related functions from ZipService to DiskFileList. ASSIGNED TASKS ============== to everyone: Test backups by extracting them in all zip utilities your computer has and report here: • Windows: understands the format since HORRIBLE BUG was fixed! • ZipSharp: works fine (same DLL...) • WinRAR: extraction and test OK to Prasanna: Test cases for ProfileSingle class Possible tasks for now (in optimized order) ====================== - TOP PRIORITY: International characters in files and folders, such as çãõéê etc., get different (wrong) when zipped. They must be getting encoded in an MS-DOS character set instead of a Windows character set. Find a fix - Read ZipBuilder.cs in the Texts folder (comes from the ZipSharp utility) - In FileServerBackup, fix buffer allocation for large files. This must be responsible for an "Out of Memory" error I got when backing up 6000 files. Also study how objects could be disposed of when compressing. - In Windows 2000 (but not in Windows XP), folders created by Backalaika have restricted permissions, so they could not be moved to another machine until I changed the permissions. See if Backalaika can set liberal permissions for those folders (this should be a configuration option in BackupServer). - Modify the zip algorythm so it will store (instead of compress) files with extensions such as jpg, zip, rar, ai etc. The list of extensions should be configurable (i.e. loaded from a text file). - Activate the "Subfolders to exclude" list in the backup algorythm - In ProfileSingle, create a boolean property "One zip file per subfolder" - Learn how tests are integrated in SharpDevelop. - Write tests for any class. Nando has ideas for the ProfileSingle class. - Fix something from the TODO task list generated in SharpDevelop. - Minimize BackupServer and FileServer to the system tray. - Even though it is called a "server-activated object", FileServer.Backup is created lazily, i.e. only when BackupServer accesses it. Likewise BackupServer.ProfilesList is only created when Admin accesses it. This seems to create a problem: the whole combo would only work on the day the administrator remembered to start the GUI :) What is the solution? Is BackupServer gonna have to connect to itself? Or is there a more elegant way? - Why the hell is it that ProfileSingle can't be remoted without generating serialization exceptions!? |
From: Nando F. <nan...@ma...> - 2004-10-02 14:26:57
|
Detailed requirementes and design ideas for backup and restore ============================================================== // BackupServer shall store a list of struct Computers { string ComputerName; // max 8 characters! string Host; int Port; // positive number string OldNames; // Allows ComputerName to be changed and // old backups to be mapped to it } A backup profile can only refer to 1 computer. A backup profile can contain multiple BaseFolders in that computer. Multiple profiles can refer to a computer. Visualization of this: Computer Profile1 BaseFolder1 BaseFolder2 Profile2 BaseFolder3 BaseFolder4 Backups will be stored by BackupServer, whose XML configuration should be like this: struct BackupServerSettings { string BackupsFolder; int BackupServicePort; struct PortRange { // for connecting to ZipServers int MinPort; int MaxPort; } } Directory structure for storing backups: BackupsFolder // only 1 Media001 // multiple folders, each representing one DVD-R or whatever ProfileName // multiple (zip files go here) Because ProfileName here becomes a directory name, it shall not contain spaces nor be longer than 10 chars, and cannot contain filename-unfriendly chars. This *validation* must be added to the ProfileSingle class. There will be *one zip file for each BaseFolder* defined in a profile. This is important because e.g. if a profile defines a backup for both my C: and D: drives, their contents won't get mixed in a single .zip file. (The alternative was to have *one zip per profile*. We would need to store absolute pathnames (including drive letter) into the zip, which is weird and not what a user would expect when using a common zip utility.) The *name of each zip file* will be DateTime-Kind.zip where DateTime is the backup moment in the form 2004-12-31T15.30.45 and Kind will be 4 letters: Full or Diff or Incr. *Advantages* of this filename scheme - Unique filenames (as long as 2 backups aren't started in the same second) - Short filenames *Disadvantage* - Does not describe the contents of a zip file (which would be hard to do in so few characters anyway) To allow easy, automated restoration of such backups, we need an XML file to accompany each zip file, providing more information about it. Each XML file will have the same name as the zip file it refers to, except for the .xml extension. The struct for this XML looks like this: struct Job { string ComputerName; // defined above string ProfileName; // idem string BaseFolder; // idem BackupKinds Kind; // Full, Differential or Incremental DateTime JobTime; // same DateTime that goes into file name } These XML files will allow us to... Restore by ComputerName AND JobTime ProfileName OR BaseFolder This is to say: - We can do a restore if user inputs only ComputerName and a date - We can do a finer (smaller) restore if user additionally inputs either a BaseFolder or a ProfileName (in the latter case, all zip files referring to this ProfileName get restored, resulting in multiple BaseFolders being restored). Am I missing anything? Anyone with me? Nando |
From: Nando F. <nan...@ma...> - 2004-10-02 10:52:33
|
Fabio Piemontesi from South Africa, Ian Mills from Canada, Choube Mehul from India, Jean Milne from England, Dmitry Melanchenko from Ukraine, meet our new developer, Prasanna Srinivasan from Hyderabad, India (GMT+5:30). First a little change history for everyone: - Backup temporary extension = .zip.tmp - Erase empty ZIP file if there was nothing to back up at this time - Word "additive" replaced by "incremental" everywhere. This broke profile compatibility, but is definitive. New developers, I just added all of you to the project so everyone has CVS write access. To tell you the truth, I was more inclined to wait for a little code contribution and evaluate it before adding you to the project. But since Prasanna is having problems with anonymous CVS access... In order to check out the latest code snapshot from CVS, a Backalaika developer needs 2 variables: CVSROOT and the module name. CVSROOT is ============================================ :ext:USE...@cv...:/cvsroot/backalaika ============================================ where USERNAME is your SourceForge.net login. Inside this there is a module (a subfolder) which contains our files. The module is called: v01 Also, anyone can download the code as "anonymous" with :pserver: authentication: :pserver:ano...@cv...:/cvsroot/backalaika Prasanna, 0) Don't worry about module names not being autodiscovered by your CVS client. This is normal in sourceforge AFAIK. 1) But from your error message I think you have a network problem, not a CVS problem. Please check your firewalls or reinstall your CVS client (I remember after installation you used it before rebooting...) 2) I don't see the module name "v01" in your CVS command. 3) You could try as "anonymous" instead of as "venkii_s". 4) Anyway you must be able to connect as a project developer now, with :ext: authentication. Prasanna Srinivasan wrote: > I am not sure what is wrong with my Box or network. > But still i am not able to access the CVS. I am > attaching the errors so that you can suggest. I am > feeling bad, since this should become a stupid cause > for not participating in your project. > > regards > Prasanna > > In C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\: "C:\Program Files\TortoiseCVS\cvs.exe" "-q" "-Q" "co" "-c" > CVSROOT=:pserver:ven...@cv...:/cvsroot/backalaika > > cvs [checkout aborted]: connect to cvs.sf.net:2401 failed: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. > > Error, CVS operation failed |
From: choube m. <cho...@ya...> - 2004-10-02 08:31:58
|
you can send those books to cho...@ya... but if they are large zip them and send. mehul. --- Ian Mills <ian...@sh...> wrote: > Hey Choube Mehul > Welcome to the group. I hope you aren't here to > steal all the work from the project too haha j/k ;) > I have a bunch of C# ebooks that I can send you if I > like. There is one in particular that I used... I > can't remember the name of it at the moment > though... > > To learn C#, I did all the projects from this course > http://www.cs.arizona.edu/classes/cs386/spring04/index.shtml > It is done quite well. > > Anyways, if you have msn or icq, here are mine: > ian...@ho... > icq: 43981830 > > Add me, then I can send you the book(s) you desire. > > Ian ________________________________________________________________________ Yahoo! India Matrimony: Find your life partner online Go to: http://yahoo.shaadi.com/india-matrimony |
From: Nando F. <nan...@ma...> - 2004-10-01 22:01:18
|
Backalaikers, Fabio Piemontesi from South Africa, Ian Mills from Canada, Choube Mehul from India and Jean Milne from England, meet our new developer, Dmitry Melanchenko (23 years old) from Dnepropetrovsk, Ukraine, with experience in SQL and web programming in Perl! Today I implemented *additive* and *differential* backups. For those who don't know what these are: Both kinds back up only those files that are marked with the Archive attribute in FAT or NTFS filesystems. Additive backups leave the attribute set, while Differential and Full backups reset it after the backup is complete. Backalaika is going to happen! Nando PS: When you check out files from CVS, please find out what to focus on by reading TODO.txt first. |
From: Nando F. <nan...@ma...> - 2004-10-01 02:50:54
|
Backalaikers, Fabio Piemontesi from South Africa, Ian Mills from Canada and Choube Mehul from India, meet our new developer, Jean Milne, from England! Also, Prasanna, from India, has not subscribed to the list yet, but will soon. And more developers are coming soon, and after that there will be more developers, and more, and -- BWAHAHAHAHAHAHAH I am happy today because I found a huge bug and smashed it: Full file path (including drive) was being written to zip, instead of relative path! So now you can actually unzip your backups! :-D I also did some OO-refactoring: moved all DiskFileList-related functions from ZipService to DiskFileList. Backalaika is going to happen! Nando PS: When you check out files from CVS, please read TODO.txt first. Below is an excerpt from TODO.txt: ASSIGNED TASKS ============== to Prasanna: test cases for ProfileSingle class Until Friday, October 1st, we must have ======================================= - Full backups in a single machine. - Differential backups in a single machine. Using the "archive attribute" in FAT filesystems, it is possible to make a second backup containing only files which were changed in the interim. - New "Each folder in its own zip file" option in ProfileSingle, working. Possible tasks for anyone to assume now or in the near future ============================================================= - Test backups by extracting them in all zip utilities your computer has, and report here: • Windows: understands the format since relative path BUG was fixed! • ZipSharp: works fine (same DLL as Backalaika...) - Currently, FileServer does the whole backup and stores it locally. Instead, BackupServer shall fetch each ZipEntry individually and assemble backup in a folder configured by the user. - Read ZipBuilder.cs in the Texts folder (comes from the ZipSharp utility) - In FileServerBackup, fix buffer allocation for large files. - Learn how tests are integrated in SharpDevelop. - Write tests for any class. Nando has ideas for the ProfileSingle class. - Fix something from the TODO task list generated in SharpDevelop. - Minimize BackupServer and FileServer to the system tray. - Even though it is called a "server-activated object", FileServer.Backup is created lazily, i.e. only when BackupServer accesses it. Likewise BackupServer.ProfilesList is only created when Admin accesses it. This seems to create a problem: the whole combo would only work on the day the administrator remembered to start the GUI :) What is the solution? Is BackupServer gonna have to connect to itself? Or is there a more elegant way? |
From: Nando F. <nan...@ma...> - 2004-09-29 18:29:41
|
Backalaikers, All 3 tiers are connected, but very hard to debug. An exception generated anywhere in the chain, e.g. FileServer OR BackupServer, is forwarded and only appears in Admin! In order to find out where the exception comes from, you have to: 1) Start the suspicious project in M$ CLR Debugger 2) Go to menu Debug / Exceptions... 3) Set "When the exception is thrown" to "Break into the debugger". It is also convenient to register M$ CLR Debugger as a Just-In-Time debugger for the CLR. This can be done in Tools - Options - Debugging - Just-In-Time. After this, when an exception happens, a window gives you the option of using the debugger. But this does not solve the exception forwarding problem. If I am a debugging idiot, would someone please explain an easier way to do it, provided you spoiled rich children don't force me to buy Visual Studio. Right now it seems to me that the proper remedy for this is to write tests! Time for XP... Fabio, The task list in #D was getting flooded with warnings about duplicate references. I finally found out what it was: Both BackupServer and FileServer projects had references to the remoting assembly in the GAC. These were not needed. After deleting them, it is now possible to build all 3 projects at once by pressing Alt-F8. Nando |
From: Nando F. <nan...@ma...> - 2004-09-28 23:17:23
|
I myself wrote: > I complained in a previous message that the server-host only *contains* > the remoted class, without any knowledge about it, since it is the > client that creates an instance. But the singleton pattern contains a > static variable which holds a reference to the single created instance, > if any! This has the potential of solving that problem. If the > server-host could get that reference and use it... I am going to try > this today starting with the TempRemotingTest demo. It doesn't work. Even if the class is a singleton, the server sees its own instance of the service class, not the client's. The code is in the TmpSingletonTest folder in case anyone wants to find out where I messed up. Anyway, have I mentioned that Add Profile, Edit Profile and Delete Profile are WORKING remotely (since yesterday), and that FileServer will soon be integrated too? Ian, get psyched! As leader of our international team, but without any pressure, here is what I think we should focus on: Until Friday, October 1st, we must have ======================================= - Full backups in a single machine. - Differential backups in a single machine. Using the "archive attribute" in FAT filesystems, it is possible to make a second backup containing only files which were changed in the interim. Possible tasks for anyone to assume now or in the near future ============================================================= - Learn how tests are integrated in SharpDevelop. - Write tests for any class. Nando has ideas for the ProfileSingle class. - Fix something from the TODO task list generated in SharpDevelop. - Minimize BackupServer and FileServer to the system tray. ============================= Tasks for distant future only ============================= 1) Use of Backalaika in more than one computer ============================================== Keeping in mind that FileServers are accessed through "tcp://Computer:Port/uri": - ProfileSingle shall include new properties "Computer" and "Port". - "Computer" should be validated so it can't begin with "http:" or "tcp:". It also cannot contain "/" or ":". In fact, there's a lot of characters it shouldn't contain :) - If more than one profile references the same "Computer" but with different ports, Admin user should be notified of a possible problem. - BackupServer scans ProfilesList and realizes the time has come to make one scheduled backup. The info it needs to access the correct FileServer is right there in the profile. - When Admin is creating the list of folders to be backed up, it can ask FileServer directly -- no need to go through BackupServer for this. So Admin is now a client for FileServer, only for the purpose of obtaining all of its folders. 2) 3) Support for multiple volumes and partially used media. The user could make a list of partially used CDs (with their remaining free spaces) and have the program create backups that just fit into those media. 4) Backup database. Store in a database a list of all files which were backed up, and into which media. Create the functionality to search the database. 5) Database re-creation. If for any reason the database is lost, it can be recreated from backup media. 6) Differential backups based on the database (instead of the archive attribute). And additive backups (these are slightly different from differential backups.) 7) A GTK# user interface. This would allow the program to run on Linux (under Mono, the free implementation of .NET for Linux) and Windows. 8) Support for the Zip, GZip, Tar and BZip2 formats (already in the SharpZip library). 9) Support for file permissions (which exist in Linux but not in Windows). |
From: Nando F. <nan...@ma...> - 2004-09-28 12:19:32
|
Fabio Piemontesi wrote: > Nando, I don't agree with the phrase, "SingleCall is stateful". I meant "SingleCall is stateless", but it was 2:00 in the morning. Having slept over my question, "why use the singleton pattern", I have come up with at least one good reason: I complained in a previous message that the server-host only *contains* the remoted class, without any knowledge about it, since it is the client that creates an instance. But the singleton pattern contains a static variable which holds a reference to the single created instance, if any! This has the potential of solving that problem. If the server-host could get that reference and use it... I am going to try this today starting with the TempRemotingTest demo. *A few design ideas* *==================* Only after backup is working (very soon now): Keeping in mind that FileServers are accessed through "tcp://Computer:Port/uri": - ProfileSingle shall include new properties "Computer" and "Port". - "Computer" should be validated so it can't begin with "http:" or "tcp:". It also cannot contain "/" or ":". In fact, there's a lot of characters it shouldn't contain :) - If more than one profile references the same "Computer" but with different ports, Admin user should be notified of a possible problem. - BackupServer scans ProfilesList and realizes the time has come to make one scheduled backup. The info it needs to access the correct FileServer is right there in the profile. - When Admin is creating the list of folders to be backed up, it can ask FileServer directly -- no need to go through BackupServer for this. So Admin is now a client for FileServer, only for the purpose of obtaining all of its folders. Comments? Nando |
From: Fabio P. <fpi...@ho...> - 2004-09-28 09:27:03
|
Wow, this is becoming a great international team. It wont be long now before Backalaika will be represented on every continent ! So, Choube, greetings from Fabio. Thanks for joining the team. Hope to catch up with you online soon. So Nando, as the leader of this GLOBAL TEAM, I hope you arent feeling any PRESSURE... ;-) Fabio _________________________________________________________________ Get the latest polyphonic ringtones at MSN Mobile Fun! http://ringtones.msn.co.za/ |
From: Fabio P. <fpi...@ho...> - 2004-09-28 08:49:10
|
>When we talk about remoting, server-activated objects have two possible >activation modes (or WellKnownObjectMode values): Singleton and SingleCall. >These are at opposite ends of a spectrum. SingleCall is stateful: the >remote object is only accessed once, the next time it >will be a different object. Singleton means only one object is created and >accessed by all clients. Nando, I don't agree with the phrase, "SingleCall is stateful". I agree that with SingleCall objects, every remote method call is serviced by a new object instance. Then how can SingleCall be stateful then? If a previous method call saved some state information in one or more fields of the SingleCall object, they will be lost. Singleton objects are stateful. As you said, once a Singleton object is created, all clients get the same reference (although note that this will only occur if the object is given infinite lifetime, or it's lease is renewed). >I think singleton remoting would be appropriate for us. I do agree. >Fabio, FileServerBackup inherits from MarshalByRefObject, this means you >also intend it to be server-activated. Yes, FileServer.Backup is intended to be server-activated. The fact that it inherits from MarshalByRefObject only means that the type is intended to be accessed across application domain boundaries. This does not specify whether it will be client or server activated. What specifies this is how we configure the .NET remoting infrastructure using RemotingConfiguration class. >But there's a difference between *singleton remoting* and *a class written >in the singleton pattern*. >Can you explain why the singleton class pattern is needed for >FileServerBackup then? I ask because I have never seen anyone say that >*singleton remoting* requires a *singleton type*, nor > any examples >suggesting it. Yes, as long as type to be remoted inherits from MarshalByRefObject, it is suitable for singleton remoting (if .NET remoting infrastructure is configured accordingly). Type does not have to be a singleton type (type implementing Singleton design pattern or anything else for that matter). Let me think about this some more ;-) Fabio _________________________________________________________________ Get the latest polyphonic ringtones at MSN Mobile Fun! http://ringtones.msn.co.za/ |
From: Ian M. <ian...@sh...> - 2004-09-28 03:18:37
|
Hey Choube Mehul Welcome to the group. I hope you aren't here to steal all the work from = the project too haha j/k ;) I have a bunch of C# ebooks that I can send you if I like. There is one = in particular that I used... I can't remember the name of it at the = moment though... To learn C#, I did all the projects from this course = http://www.cs.arizona.edu/classes/cs386/spring04/index.shtml It is done quite well. Anyways, if you have msn or icq, here are mine: ian...@ho... icq: 43981830 Add me, then I can send you the book(s) you desire. Ian |
From: Nando F. <nan...@ma...> - 2004-09-28 02:52:29
|
New idea for a task that can be done right now: - Minimize BackupServer and FileServer to the system tray. Anyone? Fabio, I am very happy to see your updates in CVS! Good updates too! I noticed sometimes you use the <description> tag in XML documentation, but the text within doesn't appear, because that tag is meant to be a description *to a term in a list*. So I took the liberty of changing a few to the <remarks> tag. In #D you can test XML documentation by pressing CTRL-Q, but remember to save first -- sometimes #D hangs when I close the documentation window. Also, great idea to have a change history in each file. Should newest changes be on top? I am putting them on top but I don't care, so if you have a preference just state it. Speaking of cosmetic changes, Fabio and Ian win: I admit that tab indentation is superior to space indentation for our purposes, and that opening braces {} in a new line may often make code more readable. In time, my humble classes will comply. On the other hand, please go to Options - Text Editor - Markers and Rulers - enable show column ruler at column 80... When we talk about remoting, server-activated objects have two possible activation modes (or WellKnownObjectMode values): Singleton and SingleCall. These are at opposite ends of a spectrum. SingleCall is stateful: the remote object is only accessed once, the next time it will be a different object. Singleton means only one object is created and accessed by all clients. I think singleton remoting would be appropriate for us. But there's a difference between *singleton remoting* and *a class written in the singleton pattern*. I read the excellent article on the singleton pattern you linked http://www.skeet.org.uk/csharp/singleton.html This author is golden. Here is more by him http://www.yoda.arachsys.com/csharp/index.html Fabio, FileServerBackup inherits from MarshalByRefObject, this means you also intend it to be server-activated. Can you explain why the singleton class pattern is needed for FileServerBackup then? I ask because I have never seen anyone say that *singleton remoting* requires a *singleton type*, nor any examples suggesting it. Nando |
From: Nando F. <nan...@ma...> - 2004-09-28 00:00:47
|
Dear Backalaikers, There is now a fourth subscriber to this mailing list: Choube Mehul, an Indian developer who has been working with C, C++, Linux and CVS for 3 years. Mehul asks if you, Fabio and Ian, could recommend a book about C#. Mehul will probably start coding with us soon -- in a week he will already have internet connection at home and will certainly know everything about C# :-) Fabio must have gone to the beach during the weekend or something. But I have been studying and working hard on remoting and things are looking better: if you build the projects, you already can start BackupServer, then start AdminGUI and *CREATE* remote backup profiles. You can't *edit* profiles yet, but by the time you read this, I will probably have fixed it. So I guess the 3 tiers will be working soon. Why did I have so much trouble? Remoting starts generating lots of serialization exceptions (whose reason I was unable to find) when you call, on the remote object, methods which take as argument the ProfileSingle class, which is a complex type. The ProfileSingle argument simply wouldn't reach the remote ProfilesList object. I finally worked around this by serializing the argument to string and passing the string instead. Possible tasks for anyone to assume now or in the near future: - Do not implement new features while we are still debugging the basic beast - Fix anything from the TODO task list generated in SharpDevelop - Learn how tests are integrated in SharpDevelop - Write tests for any class. I have ideas for the ProfileSingle class. Nando |
From: Nando F. <nan...@ma...> - 2004-09-26 04:38:40
|
I have successfully connected AdminGUI to an instance of the ProfilesList class in BackupServer. Now a few new problems appear because the classes being remoted are complex. But I am glad to have new problems. CVS awaits you -- I miss you guys. Nando |
From: Nando F. <nan...@ma...> - 2004-09-26 04:18:41
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> <title></title> </head> <body bgcolor="#ffffff" text="#000000"> <h1>Debugging with SharpDevelop</h1> <p>Currently, debugging is not supported by Sharp Develop. Here we will show three different approaches to debugging your code:</p> <h2>1 - the minimalist approach</h2> <p>If you really need to do some debugging, you can use cordbg.exe, which is included in the .NET SDK, to debug your application.</p> <p>When you get the message "This application has generated an unhandled exception.", follow these steps:</p> <ul> <li> Press <em>'cancel</em> on the above dialog. A new dialog will pop up.</li> <li> Run <strong>cordbg.exe</strong> from your .NET Sdk \bin directory, with the process id listed on the new dialog. You should have a commandline something like this: <strong>C:\Program Files\Microsoft.NET\SDK\v1.1\Bin\cordbg.exe</strong> !a 0xfff27fc1 where <em>0xfff27fc1</em> is the process id.</li> <li> Press <strong>Retry</strong> on the dialog. This will cause cordbg to emit debugging info.</li> <li> You can use the text highlighter on the console window to highlight and copy the text in the console window.</li> <li> When you're done, type <strong>q</strong> at the console prompt.</li> </ul> <p>If you add the location of cordbg.exe to your path and then restart Sharp Develop, you can skip steps 2 and 3. Clicking the cancel button in the first dialog will fire up a cordbg console automatically. [ver 0.95]</p> <h2>2 - How to Debug with a GUI</h2> <p>At first I hated SD for not bringing along a debugger of its own, but then I realised a good debugger ships with the SDK.</p> <ul> <li> Run <strong>C:\Program Files\Microsoft.NET\FrameworkSDK\GuiDebug\dbgclr.exe</strong></li> <li> Choose <em>Debug - Program</em> to Debug in the Menu.</li> <li> In the appearing dialog, enter the path to your .net program and press OK.</li> <li> Run the program pressing the <em>play</em> button <em>></em>.</li> <li> Break the program using the <em>pause</em> button <em>||</em>.</li> </ul> <p>The sourcecode at its current position should appear. Now you can right click on <em>Miscellaneous Files</em> and open source code files. In there, you can add breakpoints, watches, etc. It's pretty comfortable.</p> <h2> 3 - How to Debug with a GUI (the easy way)</h2> <ul> <li> Add a new Tool (<em>Tools->Options->Tools->External Tools->Add</em>)</li> <li> Title it <em>Debugger</em> or something like that</li> <li> In <strong>Command</strong> search for <strong>DbgCLR.exe</strong> (usually in <em>C:\Program Files\Microsoft.NET\SDK\v1.1\GuiDebug\DbgCLR.exe</em>)</li> <li> In <strong>Arguments</strong> type "${<span id="id275" style="display: none;">add a one or paragraph summary or description of what's discussed here; put yours after 'Summary:' <div class="TopicTipStats">09.06.2004 22:39:21 - kbit</div> </span><a onmouseover='TopicTipOn(this, "id275");' onmouseout="TopicTipOff();" href="http://wiki.sharpdevelop.net/default.aspx/SharpDevelop.TargetPath">TargetPath</a>}" (<strong>NOTE: type the quotes too!</strong>)</li> <li> Hit the OK-Button</li> </ul> <p>Now you can start the debugger with a single click!</p> </body> </html> |
From: Nando F. <nan...@ma...> - 2004-09-25 22:33:48
|
Dear Backalaikers, PLEASE NOTICE ============= I have renamed my BackalaikaProfile class to ProfileSingle... as opposed to my ProfilesList class. Proposals to Fabio ================== - Rename the ServerFile class to DiskFile? (The class has been moved to its own file.) Proposals to everyone ===================== - Due to .NET limitations for writing Windows services, perhaps we should permanently think of BackupServer and FileServer hosts as Windows.Forms apps, whose icons stay in the System Tray. They should have means of minimally editing their configuration (port number etc.) so they can be reached through the LAN. If we programmatically configure remoting, there will be no need for default .NET configuration files, which will be replaced by OUR configuration files. Remoting programmatically is very different from remoting with configuration files. I tried configuration files for a while and hated it. I prefer C# code to XML because once you load the XML file there is no way of knowing what the hell is happening and exactly why things don't turn out the way you expected them... I've got a working little demo of programmatic remoting (more or less like Fabio's previous demo). It is temporarily on the CVS server. As the program stands now, first the server outputs: Starting server... Using TCP channel 7777 set StringField = Nando rules Server ready, waiting for clients. get StringField = Nando rules The client should receive: Nando rules Hit ENTER to exit... Then you start the client, and the client outputs: Starting client... Using TCP channel 1234 Getting object from tcp://localhost:7777/MyUri Client ready The server says: MyRemoteClass initialized without any parameters passed. Hit ENTER to exit... By now, if you look back at the server, there are two new lines: set StringField = MyRemoteClass initialized without any parameters passed. get StringField = MyRemoteClass initialized without any parameters passed. This means the server was accessed, but it created a new object instead of sending the first object. Even though it is working, this is the one annoying thing. The remote object is instantiated when the client accesses the server. It would be useful if the server could create the object and populate it and the client would get THAT object instead of a new one... I wonder if this is by design or if there is a way to do what I want. Because I intend to use this with the ProfilesList class, which stays on Backup Server but can be accessed from an AdminGUI anywhere, this is a singleton object! From what I read, it is created once, then it is always the same object for all clients that access it. So it would make sense to have the SERVER create the object. Now there's a real challenge. I know it would be easier to work around this, but challenges are challenging :))) Nando |
From: Nando F. <nan...@ma...> - 2004-09-24 05:28:35
|
Dear Fabio and Ian, The exact directory structure I had imagined didn't work out with SharpDevelop, but now we have a similar structure that does work very well and allows us to share sources among the 3 projects. I know a couple of files (e.g. Backup.cs) are probably going to be moved to another folder very soon, but the structure is there, and it is clean. The 3 projects (under only 1 combine) compile and have been configured to output binaries just outside the sources folder, so that binaries don't get committed to CVS. It's up on folder v01, inside our usual CVSROOT: :ext:/USERNAME/@cvs.sf.net:/cvsroot/backalaika There is also a "Texts" folder with some notes for you to read... - the new directory scheme - updated feature list - why M$ V$ cannot be used - TODO.txt is about a couple of alterations to the code (renamed classes) I am removing the old CVS module. By the way, I realize now how far I was from XP when I got carried away and wrote that loooong Profile class whose features won't be used for a while... My job here is done for today. Let us use this mailing list to announce our changes. Now we can use CVS to work concurrently. I advise you to commit often -- I know I will. Regards Nando |