
Research
Security News
Malicious npm Packages Use Telegram to Exfiltrate BullX Credentials
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Exploring the potential benefits of implementing APIs in the style of the Actor Model, even in single-threaded programming environments such as Javascript.
ActorSystem
createSystem()
system.actorOf(IActorFactory) -> ActorRef
Actor
actor.tell()
- fire & forget messageactor.ask()
- ask & await async response from an actoractor.stop()
- send a message instructing an actor to terminateActorContext
context.stop(IActorRef)
- allow an actor to be stopped via a refcontext.gracefulStop(IActorRef)
- allow an actor to be stopped via a ref with confirmation (for sequencing etc)context.actorOf(IActorFactory)
- allow an actor to create more actorscontext.parent
- allow an actor to access it's parent (in order to send it messages)context.self
- allow an actor to access it's own ref (in order to send it's self messages)context.become(newHandler)
- designate a new handler for future messages http://doc.akka.io/docs/akka/current/scala/actors.html#Graceful_Stopcontext.actorSelection(lookup: string)
- allow actor lookups via paths, such as /system
/deadletter
etc receive(payload, message, sender)
sender.reply()
for replying directly to a message
mappedMethods
define 1 function per message name
handle cancellation of pending message should a new one override it
pass state into mapped methods for encapsulated state management
sender
- allow every message access to an ActorRef that allow communication with the sender
receive (payload message sender)
switch payload
case 'ping' sender.reply 'pong'
default sender.reply 'missing'
// callsite
actor.ask 'ping'
|> resp console.log 'resp:' + resp
actorOf(...)
Stop
, context.stop()
or PoisonPill
Terminated
is sent to watchersbecome()
- designate a new handler for future messagesactorOf()
only ever creates a new actor, and it creates it as a direct child of the context
on which this method is invoked (which may be any actor or actor system)./deadletters
all messages sent to stopped or non-existing actors are re-routed here/system
is the guardian actor for all system-created top-level actors, e.g. logging
listeners or actors automatically deployed by configuration at the start of the actor system.FAQs
Actor model (style) API in JS
The npm package aktor-js receives a total of 21 weekly downloads. As such, aktor-js popularity was classified as not popular.
We found that aktor-js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.
Security News
AI-generated slop reports are making bug bounty triage harder, wasting maintainer time, and straining trust in vulnerability disclosure programs.