@thedevs · Post #2073 · 22.08.2023 г., 10:22
Thoughts on Elixir, Phoenix and LiveView after 18 months of commercial use. #article#elixir @thedevs https://thedevs.link/u1toL1
TGINSIGHT SIMILAR POSTS
Изворен канал @pythonotes · Post #425 · 20 апр.
Недавно делал быстрый прототип асинхронного приложения в котором требовалось вызывать много синхронного кода. Да, я знаю, что это не лучший дизайн, но нужно было быстрое решение на один процесс и без очередей. Поэтому я выполнял код в потоках. Выглядело это примерно так: from fastapi.concurrency import run_in_threadpool async def execute(data: DataRequest) -> DataResponse: try: result = await run_in_threadpool(sync_function, data) return DataResponse(data=result) except Exception as e: return DataResponse( error=str(e), success=False, ) В общем работает нормально. Для всех вызовов под капотом используется общий тредпул, всё работает предсказуемо. Но потребовалось изменить количество запускаемых в пуле потоков (по умолчанию создается 40 воркеров). Так как дело происходит с FastAPI, делается это через lifespan используя настройки anyio: import anyio @asynccontextmanager async def lifespan(app: FastAPI): limiter = anyio.to_thread.current_default_thread_limiter() limiter.total_tokens = 100 yield # если вдруг нужно вернуть обратно limiter.total_tokens = 40 Зачем менять количество воркеров? - уменьшить, если оперативки мало (один тред занимает ~8мб) - увеличить чтобы выдержать нагрузку Если есть предложения получше при тех же вводных - предлагайте😉 #async
Hashtags
Пребарај: #elixir
@thedevs · Post #2073 · 22.08.2023 г., 10:22
Thoughts on Elixir, Phoenix and LiveView after 18 months of commercial use. #article#elixir @thedevs https://thedevs.link/u1toL1
@thedevs · Post #1392 · 11.02.2019 г., 18:35
Benchmarking Go vs Node vs Elixir. #article#go#nodejs#elixir @thedevs https://kutt.it/WVQyLq
@githubtrending · Post #15106 · 30.08.2025 г., 13:00
#elixir#elixir#language_server_protocol#lsp Expert is the official language server for Elixir, helping your code editor understand and work with Elixir code better. You can easily install it by downloading the right version for your system or build it from source if you prefer. Expert supports the latest features through nightly builds and integrates smoothly with your editor, improving coding with features like error checking and code completion. Using Expert makes writing Elixir code faster and less error-prone, boosting your productivity and coding experience. It is open source under Apache License 2.0 and supported by sponsors, ensuring ongoing development and support. https://github.com/elixir-lang/expert
@githubtrending · Post #15032 · 06.08.2025 г., 11:30
#elixir#debug_adapter_protocol#elixir#language_server#language_server_protocol#lsp ElixirLS is a tool that helps you write and debug Elixir code more easily by providing features like code completion, go-to-definition, inline error reporting, and a powerful debugger that supports breakpoints and step-through debugging. It works with many editors and IDEs through standard protocols, making it flexible to use. It also integrates Dialyzer for static code analysis to catch bugs early and offers a server that helps AI tools understand your code better. Using ElixirLS speeds up development, improves code quality, and makes debugging simpler and more efficient. It supports recent Elixir and OTP versions and can be customized for your project needs. https://github.com/elixir-lsp/elixir-ls
@githubtrending · Post #15545 · 07.03.2026 г., 12:30
#elixir#agent#ai#artificial_intelligence#elixir#event_driven_architecture#functional_programming#orchestration#workflow Jido is a pure functional framework for Elixir to build autonomous multi-agent workflows. Agents are immutable data with a simple `cmd/2` function that transforms state purely and outputs directives for effects like signals or spawning, handled by OTP runtime. It formalizes patterns like standard signals, reusable actions, and hierarchies over raw GenServer, adding AI tools, strategies (ReAct, FSM), and supervision. You benefit by creating scalable, testable, fault-tolerant agent systems easily for production AI apps, saving reinvented code. https://github.com/agentjido/jido