Skip to main content

Ralsina.Me — Roberto Alsina's website

Need a flat DB? Use TDB!

No, do not use gdb­m. Prob­a­bly not bdb ei­ther.

TDB al­lows for con­cur­rent writes. So, if you want to store some da­ta in a file in your ap­pli­ca­tion/­tool/­com­mand/what­ev­er, and there is a chance that you need con­cur­rent writes... TDB is re­al­ly the on­ly rea­son­able choice I know.

You can even have dis­trib­uted TDB­s.

I found out about TDB while writ­ing a per­sis­tant cache for a lit­tle tool (a qmail plug­in). Since by its na­ture it would have con­cur­rent writes all the time, I was aim­ing for some­thing like mem­cached, or its disk-based ver­sion... but TDB solves the prob­lem nice­ly and ef­fort­less­ly.

So, if you need a flat DB (a.k.a anony­mous blobs with a sin­gle in­dex, a.k.a a hash in a file)...

Big news in my life

Rosario is preg­nan­t. Yipee! :-)

She is now about 6 weeks preg­nan­t, and all three of us are do­ing fine (but she's hav­ing bad morn­ing nau­se­a... should go away in an­oth­er 6 week­s... but that does­n't seem to be any help ;-)

The first echog­ra­phy is sched­uled for Sep­t. 15, ex­pect pic­tures of the tiny bean-­like alien in­vad­er.

It's the first grand­kid on her side of her fam­i­ly, so it's be­ing pre­emp­tive­ly spoiled by all her/his/its aunts/­grand­par­ents/what­ev­er. Our house is be­ing pre­pared for a flood­ing of knit­ted out­fits and re­dun­dant child­ware by strength­en­ing the floor­board­s.

I am quite at a loss for word­s, and have not been use­ful for al­most any­thing for the last two weeks since we found out­... I am to­tal­ly spas­tic with hap­pi­ness.

On oth­er news, I was just start­ing to work on pre­par­ing my stu­dio... which will now be made the child's bed­room. Do I care? No! It's just an ex­cuse to ac­tu­al­ly build the of­fice in the roof I want­ed all along (so I can work with my cat­s, too :-), so ev­ery­body win­s.

Linux Installation Kung Fu

I de­cid­ed to try Arch Lin­ux on my note­book. The rea­sons don't mat­ter.

How­ev­er, there was this prob­lem about the CD drive be­ing bro­ken, and the lack of a flop­py drive.

So, how did I do it?

I had a par­ti­tion I could de­stroy (/de­v/h­da3)

I in­stalled qe­mu.

Then, I start­ed qe­mu us­ing the whole HD and a CD ISO im­age (boot­ing from the CD!):

qemu -hda /dev/hda -cdrom arch-0.7.1.iso -boot d

Then, very care­ful­ly I in­stalled it on hda3 and did not in­stall GRUB.

Copied the ker­nel and ini­trd im­ages to /boot on the oth­er lin­ux in­stal­la­tion.

Edit­ed grub.­con­f, adding the Arch en­try...

And it worked.

Keep in mind that if you make a mis­take, this will com­plete­ly de­stroy all your da­ta. But if you are care­ful, and have enough space, you can in­stall your next Lin­ux while you use your cur­rent one.

Now, is that cool or what? :-)

Cool toys: Synergy

In the last week or so I have been re­or­ga­niz­ing my workspace. Or rather, Rosar­i­o's workspace, and that meant mov­ing some fur­ni­ture my way.

One of the things I got is a long desk­top, with room for two PCs (it was used in the class­room in Conec­ti­va, and I got it as part of my sev­er­ance pay­men­t).

So, I put my desk­top on it, a key­board and mouse of the tray be­low, and my home serv­er on the oth­er side of it.

That home serv­er has been head­less for a loooong time.

But since I have room in the table, I hooked a mon­i­tor, key­board, mouse set to it, and thought "maybe it will work as a guest ma­chine", for when some­one comes to work or stay at my place.

Then I thought, there must be some way to use one key­board and mouse to drive both ma­chi­nes, and start­ed look­ing for KVM switch­es and stuff.

Then I thought... maybe there is a way to do it by soft­ware... and yeah! En­ter syn­er­gy ...

You run a serv­er on the box with the key­board, and a client on the oth­er­s. Ex­plain the re­la­tion­ship be­tween them in the sim­ple con­fig file... that's it.

Now I can slide the mouse off a screen to the oth­er com­put­er's, and you even share a clip­board!

Re­al­ly, re­al­ly, re­al­ly nice stuff. Works flaw­less­ly.

And since I am a bit weird in my ways, now... how can I make this work as a xin­era­ma so­lu­tion, where all the apps are in my note­book, and the oth­er is just a dis­play server?

Right now, I am start­ing a full screen FreeNX ses­sion point­ed back at me, so ev­ery­thing is on the same box. But I can't move win­dows be­tween both mon­i­tors.

I think with some cre­ative think­ing this can work. X app dis­play mi­gra­tion...

Ideas for SMTP plugins

The on­ly cur­rent soft­ware I wrote that some peo­ple ac­tu­al­ly use is called RA-­Plu­g­in­s. It's a se­ries of prog­gies you plug in your SMTP server's con­ver­sa­tion, and do di­verse things with it, like re­ject­ing mes­sages that fail cer­tain cri­te­ri­a, check­ing the sta­tus of the re­cip­i­en­t's ac­coun­t, what­ev­er.

In­ject­ing this stuff in the mid­dle of SMTP is good be­cause it means you will re­ject the mes­sages be­fore they get in­to your serv­er. But... I am run­ning out of ideas, so... have any you can spare? :-)

You can see the cur­rent plug­in list here and the on­ly ideas I have left are:

  • A plug­in that calls back to the sender's email serv­er and tries to email him, ala mil­ter-sender to catch forged sender­s.

  • A plug­in to au­­towhitelist in spa­­mas­sas­sin those ad­­dress­es to which you send mail.

  • A plug­in to keep an ac­­count of how many con­nec­­tions you hold to each IP, and lim­it them. (Not cur­ren­t­­ly pos­si­ble)

If you un­der­stand what I wrote, and have any ideas... feel free to post them as com­ments and/or email me with them!


Contents © 2000-2023 Roberto Alsina