Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - skruf

Pages: [1]
1
Projects and Discussion / Re: Multi-tenant db versus single-tenant db
« on: December 15, 2015, 05:53:47 am »
It's almost impossible to answer your question, sadly, because alot of critical information is lacking. The multiple vs single tenant question relies on several factors. We have no idea of the architecture of your system, how many clients, etc.

Do you have any numbers ? #clients, #connections, data? To put it super simply, skimming both the fiscal cost and time investments I'd usually say: Single (it's quicker and easier), if you are within the constrains of a single database server (and staying there), and NEED the added value of advanced data mining structures you can consider multiple. I have basic experience with multiple tenant sass applications and I stumbled upon a shit paper, but it describes mult. tenants ok:

https://sdqweb.ipd.kit.edu/publications/pdfs/KrMoKo2012-closer-multitenant-sass.pdf

To reiterate: Gather more info, dont listen to us. Look at the demands of the application and the chances you guys have for investment. Multiple tenant solution has a higher chance of yielding better returns, but it requires substantial effort to accomplish.

I'd highly recommend against a hybrid solution unless it's a research project. For once the silly buzzwords are viable; think of scalability (important as FCK if you're growing fast), availability, and MAINTAINABILITY. If you're keeping the application alive for years to come, being able to rely on the work of other people becomes increasingly important and maintainability is a huge factor.

2
.NET Framework / Re: [C#] Thread Safe Random and CryptoRandom
« on: December 14, 2015, 04:43:58 pm »
Cool share, thank you!

@skruf
I'm a bit rusty on my C#, but doesn't using a static class screw up unit tests? You can't mockup a static object if I recall correctly, no?

Not that rusty :) You are absolutely correct, there are several workarounds, such as adding Reset methods or using reflection to invoke the initializer, but those are ugly and ruins the tests imho.

However, the static class is about 9x faster than the locking method, which is nice :) (Atleast when I ran them just now:P)

3
.NET Framework / Re: [C#] Thread Safe Random and CryptoRandom
« on: December 14, 2015, 03:52:12 pm »
Cool, but the instance members of the  RNGCryptoServiceProvier are not thread safe you'll need to lock it. So something like
Code: (javascript) [Select]
lock (Global) Global.GetBytes
But in general just implement it as a static class with a lazy loder. so you can simply:

Code: (javascript) [Select]
static readonly ThreadLocal<Random> instance= new ThreadLocal<Random>(() => New Random(etc...)

Pages: [1]