~/talk

How I put .NET into Firebird database engine

Talkat Dotnetos Conference 2021 · 2021-10-05..10-06· [databases]
slides:none on file

Plugin embeds the .NET runtime into Firebird so stored procedures and functions run inside the database address space and transaction context, using C++/CLI shim plus an AssemblyLoadContext and self‑contained .NET Core 3.1 in a fbnet external engine folder. Hot‑reload is simulated by loading assemblies from byte arrays rather than true unloading. Performance tuning uses unsafe memory marshalling, Reflection.Emit, value tuples and ref returns; measured results show 1.11 µs per function call and a stored‑proc scenario ~42 ms vs 46 ms (1.09x), trading some speed for stability.

AI-written summary · about

  1. 0:00Start
  2. 6:53Prerequisites
  3. 8:54Start
  4. 13:02AssemblyCache
  5. 14:03Value Tuple
  6. 21:48DelegateBuilder
  7. 25:19Caching Type for comparison
  8. 25:50Enum for Type
  9. 26:56Dictionary with delegates
  10. 29:23Local.NET Core loading
  11. 31:48Specific code
  12. 36:19Unsafe and void
  13. 38:31Less indexing, RO structs, ref, in
  14. 40:10C++/CLI pieces without managed
  15. 41:57Split "generation" from "invocation"
  16. 43:36Less Arguments instances
  17. 45:31Switch to Reflection.Emit
  18. 47:26Hot-reload revisited
  19. 49:15What's next?
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.