Skip to main content

Ralsina.Me — Roberto Alsina's website

Posts about crystal (old posts, page 5)

New Project: FaaSO

Be­cause yes, all self­-host­ed FaaS so­lu­tions suck this week­end I wrote the be­gin­nings of a new one, called Faa­SO.

Is it go­ing to be great? Prob­a­bly not, but it's go­ing to do ex­act­ly what I need it to do. Be­cause the best part of rein­vent­ing the wheel is that by the sec­ond left el­bow of Kali, this wheel is go­ing to be ex­act­ly the shape I like.

Faa­SO has very strict de­sign con­straints:

  1. It needs to be easy to use. I need to be able to write a funko (func­tion in Faa­SO par­lance) in a minute and de­ploy it with one com­mand, and I won't have to con­fig­ure any­thing for that funko to work.
  2. It will run in a sin­gle ma­chine, it will de­ploy in a min­ute, and it will be ready to take new de­ploy­ment re­quests right away.
  3. It will have some sort of se­cret man­age­ment API
  4. It will sup­port mul­ti­ple lan­guages, be­cause I want to use dif­fer­ent lan­guages.
  5. It will have very lit­tle mag­ic. It will not lock you in­to need­ing it.
    • You should be able to take a funko and make it a sep­a­rate app in a minute
    • You should be able to con­trol what you are run­n­ing, and how it run­s, and mon­i­­tor it and so on with­­out go­ing through the tool if you wan­t.
  6. It will be small. My cur­rent goal is un­der 1500 LOC.
  7. It's aimed at de­ploy­ing one ten­ant. It will not pro­tect one funko from a hos­tile funko run­ning in the same sys­tem. It will not pro­tect you from your­self.
  8. In the same way, it will be as se­cure as I can make it against ex­ter­nal threat­s, but it's not go­ing to pro­tect you from some­one with ac­cess to the same sys­tem.
  9. It will be light. I am writ­ing it in Crys­tal so it's na­tive code and runs with very lim­it­ed de­pen­den­cies and lit­tle over­head.

Can I do all that? Maybe. The cur­rent pro­to­type does about half of what I wan­t, so there is on­ly an­oth­er 90% of the work left :-)

If you want to check the pro­to­type, it's here, I am not look­ing for con­trib­u­tors now be­cause I want a free hand on sud­den re­design.

There is some doc­u­men­ta­tion about how it works here and some brain­dump about the se­cret man­age­ment as well as the ini­tial brain­dump about de­sign

Version 0.1.3 of Hacé is out

A new release of Hacé my make-like tool backed by Croupier is out!

New in this version

Features

  • Set vari­ables from the com­mand line
  • Al­low pass­ing out­put files as ar­gu­ments
  • Au­to mode works bet­ter
  • Han­dle bo­gus ar­gu­ments bet­ter
  • Made --question more verbose, and only report stale tasks matching arguments
  • New -k option to keep going after errors.
  • Switched to croupi­er main, sup­ports de­pend­ing on di­rec­to­ries
  • Au­to­mat­i­cal­ly build bi­na­ries for re­lease
  • Gen­er­al house­keep­ing
  • Build it­self us­ing a Hace­file in­stead of a Make­file
  • Re­ject if two tasks share out­puts (lim­i­ta­tion of croupi­er for now)

Bugs Fixed:

  • Warn about un­known tasks used in com­mand line
  • Tasks with out­puts passed wrong tar­get to croupi­er
  • Com­mand out­put was not vis­i­ble in the log.

Full Changel­og: v0.1.2...v0.1.3

Croupier v0.5.2 released

A new release of Croupier my Crystal library for tasks and dataflow programming is out!

Ver­sion 0.5.2 of coupier, a crys­tal li­brary to do dataflow ori­ent­ed pro­gram­ming.

Changes:

  • Bugs fixed when us­ing au­to mode with de­pen­den­cies that are di­rec­to­ries.

Full Changel­og: v0.5.1...v0.5.2

v0.5.1

A new release of Croupier my Crystal library for tasks and dataflow programming is out!
  • Add sup­port for tasks de­pend­ing on di­rec­to­ries
  • New fast_dirs mode in TaskManager for cheaper directory checks
  • Add progress call­back
  • Add sup­port for pass­ing blocks to Tasks:
Croupier::Task.new output: "fileA", inputs: ["in­put.txt"] do
  puts "task1 run­ning"
  File.read("in­put.txt").downcase
end

Full Changel­og: v0.5.0...v0.5.1

Croupier v0.5.0 is out

A new release of Croupier my Crystal library for tasks and dataflow programming is out!

What's Changed

  • New TaskManager.auto_mode? property
  • Yield on spawn to make con­cur­ren­cy more use­ful
  • More ef­fi­cient in­put han­dling
  • Fix dead­lock­ing bug in par­al­lel run­ner
  • Warn or er­ror when tasks are next in line but not ready

Full Changel­og: v0.4.1...v0.5.0


Contents © 2000-2024 Roberto Alsina