Ivyware TargetCore Routing kernel Implemented in C++ since 2002 Melbourne, AU
Ivyware

Ivyware/TargetCore

Walkthrough — hub, connection, message

One address.
Any transport.
Every message routed.

A hub owns an address on the virtual network, keeps a priority queue, and runs pump threads that hand each message to a MAP handler. Watch all of it happen, one call at a time — the code beside the diagram is the API you would actually write, in four languages.

The bench

CLIENT PEER Root.Sender P2PeerConWsa ECDH·GCM chat HUB ADDRESS Root.MyHub P2PEERHUB PORT :9000 listen P2PeerMsgQue HEAD = LOWEST PRI VALUE msg "status" pri 7 · NORMAL msg "audit" pri 12 · LOW msg "chat" pri 2 · HIGH PUMP POOL 0 1 2 THREADS MSG MAP "status" → On_Status CONTINUE "chat" → On_Chat HANDLED CON → On_ConAccept CONTINUE return msgHANDLED

Caller code


        

Event log — P2Pevent

Same hub, different wire

Transports

A connection is just a typed transport bolted to the hub. Swap the class and the routing above is unchanged — the address, the queue, and the MAP stay exactly as they are.

P2PeerConWsaTCP sockets over the network
P2PeerConPipeNamed pipes between local processes
P2PeerCon232RS-232 serial to attached hardware
P2PeerConDmxDirect memory exchange inside one process

What the kernel gives you

Design properties

Addressing

Names, not endpoints

A hub cannot join a network without a valid hierarchical address. Routing reads the dotted path, so moving a service between processes or machines changes its connection class, not its callers.

Concurrency

Pumps, not thread-per-peer

Connection state changes and messages are pumped through shared threads — one pump per thread, a ceiling set when the hub is created, and none reserved per peer. Concurrent clients are bounded by system resources rather than by a thread you spend on each of them.

Payload

Messages that describe themselves

A message manages its own private heap and holds a hierarchical, field-addressed structure — native types, strings, blobs, XML, images — resized as you fill it. That structure is Msgcore: the kernel routes the store, it does not define one.

Load balancing

Change context mid-handler

P2PeerContext() and P2PeerContextSwap() re-pump the message you are holding into a different pump, from inside the handler, in one call.

Security

Key exchange and encryption

Ephemeral ECDH P-256 to HKDF-SHA256 to AES-256-GCM, one key per connection, with no algorithm negotiation. Peer authentication is on by default, and the login proof is bound to the exchange it arrived on. Watch the handshake.

Diagnostics

Everything serialises

Every kernel object can be serialised into a message, which is what makes reporting and logging inside a live distributed network tractable at all.

Surface

No macros required

TargetFacade wraps the kernel in one header and one init object, with lambdas for handlers and one Listen/Connect pair for every transport. TargetCom puts the same hubs one CreateObject away from PowerShell, VBScript, VBA and C#.

Same program, four languages →

Licence

Open source, soon

TargetCore will be published under the Apache 2.0 licence on GitHub. The integration libraries and reference applications are already free downloads with full source.

The pieces

Component model

Seven object families do the work. The full reference — including the map macros and the state each family owns — is on the architecture page.

TargetCore object families
ObjectResponsibility
P2PeerHubOwns an address, a connection registry, a priority queue and the primary pump. The unit of deployment and re-use.
P2PeerTargetHolds the system, connection and message maps. Register one with a hub to extend its behaviour or add another pump.
P2PeerConManages the state of one inter-hub or third-party connection, and translates addresses as messages cross it.
P2PeerioDoes the physical I/O and the protocol translation — binary, ASCII, XML, HTML, FIX — plus key exchange and encryption.
P2PeerMsgThe unit of exchange. Hierarchical, self-sizing, cloneable, and addressable by field and path name — a Msgcore store with an address on it.
P2PeerMsg_MAPBinds message names to handlers, with normal, reflected, acknowledged and exception-catch variants.
P2PeventEvents and exceptions. Throwable as ordinary C++ exceptions, or attachable to a message and routed across the network.