4 ms·
Honestly, why not do it once and for all in a strongly typed pure functional language, validate it, and then tweak the GC parameters to get the performance? Us
by pklausler 10y ago
Honestly, why not do it once and for all in a strongly typed pure functional language, validate it, and then tweak the GC parameters to get the performance? Use the safest and most powerful language that you can, if you can.
- jstimpfle 10y agoSome people don't believe in tweaking GC's. I've heard horror stories from people who tried it on the JVM. (And I have made terrible experiences with JVM's GC, but never tried tuning). Some people don't believe that extremist functional languages are needed (depending on the domain). Validation. Oh, well. I think you propose Haskell, and it might disqualify for an NTP daemon, for example in terms of debuggability (stack traces?).
- nathyong 10y agoA more relevant point that would disqualify Haskell is the fact that its runtime (or rather, the GHC's runtime) is nowhere near predictable enough for the realtime guarantees that time synchronisation software would require. A Haskell DSL that outputs some safer low-level code would be a more likely choice (for example http://hackage.haskell.org/package/atom http://hackage.haskell.org/package/atom), but Rust is both more popular and has more commercial support.
- jstimpfle 10y agoWhen opting for a DSL that compiles to low-level the "Haskell" part is less important. I've heard the idea of DSLs over and over again, but who actually does that? I know of course of sed, awk, regex, etc but what part of NTPsec is narrow enough in scope and large enough in volume to justify creating a DSL? (just asking -- I'm not familiar with NTPsec).
- nickpsecurity 10y agoCompanies that like consistently getting results. Example: http://ivorylang.org/ivory-introduction.html http://ivorylang.org/ivory-introduction.html
- deleted 10y ago[deleted]
- deleted 10y ago[deleted]
- staticassertion 10y agoI think this is addressed in the article when they talk about the potential pitfall of Go's GC.
- Ericson2314 10y agoYes, please use Haskell or Rust for this. Go is an awkward middle ground.
- qznc 10y agoThat would be a theorem prover like Isabelle or Coq. It is orders of magnitude more work.
- kelnos 10y agoFrom my understanding by reading the OP, it's not really performance that's the problem, it's just that there are some (fortunately very small) time-critical sections in the NTP code that cannot tolerate a GC pause. If the language runtime supports disabling GC in critical sections (like Go does), then it's doable. If not, the language is likely automatically disqualified.
- Peaker 10y agoGC could possibly expose a program to timing side-channel attacks.
- decebalus1 10y ago> strongly typed pure functional language > tweak the GC parameters to get the performance Care to give an example of such a language which allows for a guaranteed GC pause\resume configuration\declaration\etc in a critical section?
- comex 10y agoF# (i.e. the CLR) has this, although it's not pure: https://msdn.microsoft.com/en-us/library/system.gc.trystartnogcregion.aspx https://msdn.microsoft.com/en-us/library/system.gc.trystartn...